Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Internals of how @bradygaster/squad-cli stamps its version, how `squad upgrade` works (what it preserves vs overwrites), and how to probe the npm registry for the latest version from a coordinator prompt.
.claude/skills/github-squad-version-check/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 54% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 30% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 142% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 18% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 47% | 0% |
Confidence: medium Discovered by: Data Date: 2026-05-26 Validated in: Issue #1173 recon (bradygaster/squad)
Reusable knowledge about how @bradygaster/squad-cli stamps its version into squad.agent.md, how squad upgrade works, what it preserves vs. overwrites, and how to probe the npm registry for the latest version from a coordinator prompt.
@bradygaster/squad-clisquad (registered via package.json#bin.squad)Source file: dist/cli/core/version.js
Three functions:
getPackageVersion()Walks up from the compiled JS file to find package.json. Returns pkg.version. Works from both dist/cli/core/version.js and a bundled root cli.js. Returns '0.0.0' as fallback if not found.
stampVersion(filePath, version)Mutates squad.agent.md in three places:
<!-- version: {version} --> (must be on the line immediately after frontmatter ---)- **Version:** {version} Squad v{version} Called by: both init and upgrade — after copying the template to the destination.
readInstalledVersion(filePath)Reads the stamped version back from squad.agent.md:
/<!-- version: ([0-9.]+(?:-[a-z]+(?:\.\d+)?)?) -->//^version:\s*"([^"]+)"/m'0.0.0' on any errorsquad upgrade BehaviorSource file: dist/cli/core/upgrade.js
squad.agent.md — full overwrite from template, then stampVersion()overwriteOnUpgrade: true in TEMPLATE_MANIFEST: casting JSON files, template .md files, copilot-instructions.md (if @copilot enabled)templates/workflows/; non-npm projects get type-aware stubsrunMigrations() after file copyteam.md, routing.md, decisions.md, ceremonies.md (user-owned)agents/*/history.md (individual agent memory).squad/config.json — never touched; stateBackend survives intactselfUpgradeCli()):Detects npm/pnpm/yarn via npm_execpath and npm_config_user_agent. Runs:
npm install -g @bradygaster/squad-cli@latestpnpm add -g @bradygaster/squad-cli@latestyarn global add @bradygaster/squad-cli@latestUse @insider tag for insider builds.
compareSemver(a, b) utility (in upgrade.js):Returns -1/0/1. Handles pre-release: strips pre-release for base comparison, then treats pre-release as less than release (e.g., 0.9.5-insider.1 < 0.9.5). Can be ported directly if needed in prompt logic.
.squad/config.json — What It Holdsjson{ "version": 1, "stateBackend": "worktree" }
Other optional fields added by the coordinator at runtime:
defaultModel — global model override for all agent spawnsagentModelOverrides.{agentName} — per-agent model overrideThe file is read-only from the upgrade path's perspective. Only the coordinator writes to it (for model preferences).
Use this one-liner from inside a coordinator prompt to fetch dist-tags:
npm view @bradygaster/squad-cli dist-tags --jsondist-tags[channel] (e.g., dist-tags["insider"]).The CLI (self-update.ts) writes latest version info to an OS-specific path with a 24h TTL.
One-liner to read the upstream cache:
node -e "const p=require('path'),o=require('os');const b=process.env.APPDATA||(process.platform==='darwin'?p.join(o.homedir(),'Library','Application Support'):p.join(o.homedir(),'.config'));const f=p.join(b,'squad-cli','update-check.json');try{const d=JSON.parse(require('fs').readFileSync(f,'utf8'));const age=Date.now()-d.checkedAt;if(age<86400000)console.log(JSON.stringify(d));else console.log('STALE')}catch{console.log('MISS')}"Output semantics:
{"latestVersion":"X.Y.Z","checkedAt":N} → cache hit; use latestVersionSTALE → cache expired (older than 24h); treat as no dataMISS → cache missing or corrupt; treat as no dataOS-specific cache path:
%APPDATA%\squad-cli\update-check.json~/.config/squad-cli/update-check.json~/Library/Application Support/squad-cli/update-check.json.squad/.cache/version-check.jsonUsed by coordinator for insider/preview channels (the upstream cache only stores latest).
Schema:
json{ "checkedAt": "2026-05-26T14:13:28.492Z", "currentVersion": "0.9.6-insider.2", "channel": "insider", "channelVersion": "0.9.7-insider.1" }
TTL: 24 hours from checkedAt. Gitignore: .squad/.cache/ is listed in .gitignore — cache files are never committed.
| Purpose | Path | |---|---| | Version utilities | dist/cli/core/version.js | | Upgrade logic | dist/cli/core/upgrade.js | | Init logic | dist/cli/core/init.js | | Template manifest | dist/cli/core/templates.js | | Copilot install helper | dist/cli/copilot-install.js | | squad.agent.md template | templates/squad.agent.md.template | | Session init reference | templates/session-init-reference.md | | All templates | templates/ |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→pass | 9,775 | 9,944 | +2% | 1 | 1 | 0% | 1,801 | 3,503 | +95% | 0 | 0 | — |
case-02 | fail→pass | 31,236 | 21,872 | -30% | 1 | 1 | 0% | 3,828 | 5,883 | +54% | 0 | 0 | — |
case-03 | fail→pass | 22,550 | 18,650 | -17% | 1 | 1 | 0% | 4,283 | 5,554 | +30% | 0 | 0 | — |
case-04 | fail→pass | 5,827 | 4,543 | -22% | 1 | 1 | 0% | 1,029 | 2,486 | +142% | 0 | 0 | — |
case-05 | fail→pass | 31,783 | 9,225 | -71% | 1 | 1 | 0% | 2,684 | 3,160 | +18% | 0 | 0 | — |
case-06 | fail→pass | 13,600 | 8,166 | -40% | 1 | 1 | 0% | 2,208 | 3,256 | +47% | 0 | 0 | — |
case-07 | pass→pass | 17,102 | 7,728 | -55% | 1 | 1 | 0% | 2,663 | 3,019 | +13% | 0 | 0 | — |
case-08 | fail→pass | 33,265 | 6,608 | -80% | 1 | 1 | 0% | 1,855 | 2,807 | +51% | 0 | 0 | — |
case-09 | fail→pass | 17,874 | 9,708 | -46% | 1 | 1 | 0% | 2,998 | 2,941 | -2% | 0 | 0 | — |
case-10 | fail→pass | 18,969 | 8,429 | -56% | 1 | 1 | 0% | 3,443 | 3,070 | -11% | 0 | 0 | — |
case-11 | fail→pass | 19,931 | 5,634 | -72% | 1 | 1 | 0% | 3,506 | 2,893 | -17% | 0 | 0 | — |
case-12 | pass→pass | 13,885 | 14,167 | +2% | 1 | 1 | 0% | 2,412 | 4,199 | +74% | 0 | 0 | — |
case-13 | fail→pass | 10,642 | 4,148 | -61% | 1 | 1 | 0% | 1,632 | 2,394 | +47% | 0 | 0 | — |
case-14 | fail→pass | 17,077 | 9,024 | -47% | 1 | 1 | 0% | 2,602 | 3,169 | +22% | 0 | 0 | — |
case-15 | fail→pass | 9,525 | 4,270 | -55% | 1 | 1 | 0% | 1,831 | 2,411 | +32% | 0 | 0 | — |
case-16 | fail→pass | 15,727 | 7,326 | -53% | 1 | 1 | 0% | 2,490 | 2,851 | +14% | 0 | 0 | — |
case-17 | fail→pass | 14,504 | 2,828 | -81% | 1 | 1 | 0% | 2,758 | 2,189 | -21% | 0 | 0 | — |
case-18 | pass→pass | 12,075 | 5,687 | -53% | 1 | 1 | 0% | 1,671 | 2,770 | +66% | 0 | 0 | — |
case-19 | pass→pass | 18,584 | 9,658 | -48% | 1 | 1 | 0% | 2,882 | 3,098 | +7% | 0 | 0 | — |
case-20 | fail→fail | 26,842 | 5,520 | -79% | 1 | 1 | 0% | 2,918 | 2,220 | -24% | 0 | 0 | — |
case-21 | fail→fail | 24,150 | 3,414 | -86% | 1 | 1 | 0% | 1,921 | 2,191 | +14% | 0 | 0 | — |
case-22 | pass→pass | 19,294 | 10,816 | -44% | 1 | 1 | 0% | 2,607 | 3,550 | +36% | 0 | 0 | — |
case-23 | pass→pass | 6,219 | 26,553 | +327% | 1 | 1 | 0% | 1,042 | 3,089 | +196% | 0 | 0 | — |
case-24 | pass→pass | 15,864 | 9,741 | -39% | 1 | 1 | 0% | 2,267 | 3,606 | +59% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 24 cases were attempted. The headline lift of +58 percentage points is the difference between those two pass rates over the 24 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.