[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6BSPSECCASYFXAC0B6K4SM0":3,"skill-same:01M6BSPSECCASYFXAC0B6K4SM0":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":32,"linkOnly":33,"markdownContent":34,"markdownBody":35,"frontMatter":36,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":49,"ownerDescription":50,"updatedAt":51,"install":52,"resources":65},"01M6BSPSECCASYFXAC0B6K4SM0","taxonomy",null,"Rust\u002FPython library for reading, editing, and traversing biological taxonomies. Supports NCBI, JSON, Newick, GTDB, and PhyloXML formats.","audy\u002Fdotflies","audy","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F115904?v=4","01M6BSPM7N3739T42N7YP16MGM","Austin Richardson","01M6BSPMC3Y0WFH2B5SW9M86HX",6,"MIT","https:\u002F\u002Fgithub.com\u002Faudy\u002Fdotflies\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ftaxonomy\u002FSKILL.md",[],[5,19,20,21,22,23,24,25,26,27,28,29,30,31],"python","github","codex","rust","https","library","json","editing","reading","formats","for","taxonomies","NCBI","2026-11-10 10:12:30",false,"---\nname: \"squad-version-check\"\ndescription: \"Internals of how @bradygaster\u002Fsquad-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.\"\nallowedTools: []\nconfidence: medium\ndomain: squad-internals\nsource: \"Discovered by Data; validated in bradygaster\u002Fsquad#1173 recon (2026-05-26).\"\n---\n\n# SKILL: Squad CLI Internals — Version Stamping & Upgrade Mechanics\n\n**Confidence:** medium\n**Discovered by:** Data\n**Date:** 2026-05-26\n**Validated in:** Issue #1173 recon (bradygaster\u002Fsquad)\n\n---\n\n## What This Skill Covers\n\nReusable knowledge about how `@bradygaster\u002Fsquad-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.\n\n---\n\n## Package & Registry Facts\n\n- **Package name:** `@bradygaster\u002Fsquad-cli`\n- **Registry:** npm (public)\n- **CLI binary:** `squad` (registered via `package.json#bin.squad`)\n- **Node version requirement:** Node ≥22.5.0 (ESM-only codebase)\n\n---\n\n## Version Stamping Mechanism\n\n**Source file:** `dist\u002Fcli\u002Fcore\u002Fversion.js`\n\nThree functions:\n\n### `getPackageVersion()`\nWalks up from the compiled JS file to find `package.json`. Returns `pkg.version`. Works from both `dist\u002Fcli\u002Fcore\u002Fversion.js` and a bundled root `cli.js`. Returns `'0.0.0'` as fallback if not found.\n\n### `stampVersion(filePath, version)`\nMutates `squad.agent.md` in three places:\n1. HTML comment: `\u003C!-- version: {version} -->` (must be on the line immediately after frontmatter `---`)\n2. Identity line: `- **Version:** {version}`\n3. Greeting instruction: backtick-quoted `` `Squad v{version}` ``\n\n**Called by:** both `init` and `upgrade` — after copying the template to the destination.\n\n### `readInstalledVersion(filePath)`\nReads the stamped version back from `squad.agent.md`:\n1. First tries HTML comment format: `\u002F\u003C!-- version: ([0-9.]+(?:-[a-z]+(?:\\.\\d+)?)?) -->\u002F`\n2. Falls back to old frontmatter format: `\u002F^version:\\s*\"([^\"]+)\"\u002Fm`\n3. Returns `'0.0.0'` on any error\n\n---\n\n## `squad upgrade` Behavior\n\n**Source file:** `dist\u002Fcli\u002Fcore\u002Fupgrade.js`\n\n### What gets overwritten:\n- `squad.agent.md` — full overwrite from template, then `stampVersion()`\n- Files with `overwriteOnUpgrade: true` in `TEMPLATE_MANIFEST`: casting JSON files, template .md files, `copilot-instructions.md` (if @copilot enabled)\n- GitHub Actions workflows — from `templates\u002Fworkflows\u002F`; non-npm projects get type-aware stubs\n- Runs `runMigrations()` after file copy\n\n### What is PRESERVED:\n- `team.md`, `routing.md`, `decisions.md`, `ceremonies.md` (user-owned)\n- `agents\u002F*\u002Fhistory.md` (individual agent memory)\n- `.squad\u002Fconfig.json` — **never touched**; `stateBackend` survives intact\n- User-added files not in TEMPLATE_MANIFEST\n\n### Self-upgrade path (`selfUpgradeCli()`):\nDetects npm\u002Fpnpm\u002Fyarn via `npm_execpath` and `npm_config_user_agent`. Runs:\n- npm: `npm install -g @bradygaster\u002Fsquad-cli@latest`\n- pnpm: `pnpm add -g @bradygaster\u002Fsquad-cli@latest`\n- yarn: `yarn global add @bradygaster\u002Fsquad-cli@latest`\nUse `@insider` tag for insider builds.\n\n### `compareSemver(a, b)` utility (in upgrade.js):\nReturns -1\u002F0\u002F1. Handles pre-release: strips pre-release for base comparison, then treats pre-release as less than release (e.g., `0.9.5-insider.1` \u003C `0.9.5`). Can be ported directly if needed in prompt logic.\n\n---\n\n## `.squad\u002Fconfig.json` — What It Holds\n\n```json\n{\n  \"version\": 1,\n  \"stateBackend\": \"worktree\"\n}\n```\n\nOther optional fields added by the coordinator at runtime:\n- `defaultModel` — global model override for all agent spawns\n- `agentModelOverrides.{agentName}` — per-agent model override\n\nThe file is read-only from the upgrade path's perspective. Only the coordinator writes to it (for model preferences).\n\n---\n\n## Version-Check Probe (npm Registry)\n\nUse this one-liner from inside a coordinator prompt to fetch dist-tags:\n\n```\nnpm view @bradygaster\u002Fsquad-cli dist-tags --json\n```\n\n- Timeout: **5 seconds.** If no response within 5 seconds, abandon and show normal greeting.\n- On success: extract `dist-tags[channel]` (e.g., `dist-tags[\"insider\"]`).\n- On any error (network failure, registry unreachable, parse error): show normal greeting.\n\n---\n\n## Upstream OS-Specific Cache\n\nThe CLI (`self-update.ts`) writes `latest` version info to an OS-specific path with a 24h TTL.\n\n**One-liner to read the upstream cache:**\n```\nnode -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\u003C86400000)console.log(JSON.stringify(d));else console.log('STALE')}catch{console.log('MISS')}\"\n```\n\nOutput semantics:\n- Valid JSON `{\"latestVersion\":\"X.Y.Z\",\"checkedAt\":N}` → cache hit; use `latestVersion`\n- `STALE` → cache expired (older than 24h); treat as no data\n- `MISS` → cache missing or corrupt; treat as no data\n\n**OS-specific cache path:**\n- Windows: `%APPDATA%\\squad-cli\\update-check.json`\n- Linux: `~\u002F.config\u002Fsquad-cli\u002Fupdate-check.json`\n- macOS: `~\u002FLibrary\u002FApplication Support\u002Fsquad-cli\u002Fupdate-check.json`\n\n---\n\n## Repo-Local Cache Convention: `.squad\u002F.cache\u002Fversion-check.json`\n\nUsed by coordinator for `insider`\u002F`preview` channels (the upstream cache only stores `latest`).\n\n**Schema:**\n```json\n{\n  \"checkedAt\": \"2026-05-26T14:13:28.492Z\",\n  \"currentVersion\": \"0.9.6-insider.2\",\n  \"channel\": \"insider\",\n  \"channelVersion\": \"0.9.7-insider.1\"\n}\n```\n\n**TTL:** 24 hours from `checkedAt`.\n**Gitignore:** `.squad\u002F.cache\u002F` is listed in `.gitignore` — cache files are never committed.\n\n---\n\n## Key File Paths (installed CLI)\n\n| Purpose | Path |\n|---|---|\n| Version utilities | `dist\u002Fcli\u002Fcore\u002Fversion.js` |\n| Upgrade logic | `dist\u002Fcli\u002Fcore\u002Fupgrade.js` |\n| Init logic | `dist\u002Fcli\u002Fcore\u002Finit.js` |\n| Template manifest | `dist\u002Fcli\u002Fcore\u002Ftemplates.js` |\n| Copilot install helper | `dist\u002Fcli\u002Fcopilot-install.js` |\n| squad.agent.md template | `templates\u002Fsquad.agent.md.template` |\n| Session init reference | `templates\u002Fsession-init-reference.md` |\n| All templates | `templates\u002F` |\n","# SKILL: Squad CLI Internals — Version Stamping & Upgrade Mechanics\n\n**Confidence:** medium\n**Discovered by:** Data\n**Date:** 2026-05-26\n**Validated in:** Issue #1173 recon (bradygaster\u002Fsquad)\n\n---\n\n## What This Skill Covers\n\nReusable knowledge about how `@bradygaster\u002Fsquad-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.\n\n---\n\n## Package & Registry Facts\n\n- **Package name:** `@bradygaster\u002Fsquad-cli`\n- **Registry:** npm (public)\n- **CLI binary:** `squad` (registered via `package.json#bin.squad`)\n- **Node version requirement:** Node ≥22.5.0 (ESM-only codebase)\n\n---\n\n## Version Stamping Mechanism\n\n**Source file:** `dist\u002Fcli\u002Fcore\u002Fversion.js`\n\nThree functions:\n\n### `getPackageVersion()`\nWalks up from the compiled JS file to find `package.json`. Returns `pkg.version`. Works from both `dist\u002Fcli\u002Fcore\u002Fversion.js` and a bundled root `cli.js`. Returns `'0.0.0'` as fallback if not found.\n\n### `stampVersion(filePath, version)`\nMutates `squad.agent.md` in three places:\n1. HTML comment: `\u003C!-- version: {version} -->` (must be on the line immediately after frontmatter `---`)\n2. Identity line: `- **Version:** {version}`\n3. Greeting instruction: backtick-quoted `` `Squad v{version}` ``\n\n**Called by:** both `init` and `upgrade` — after copying the template to the destination.\n\n### `readInstalledVersion(filePath)`\nReads the stamped version back from `squad.agent.md`:\n1. First tries HTML comment format: `\u002F\u003C!-- version: ([0-9.]+(?:-[a-z]+(?:\\.\\d+)?)?) -->\u002F`\n2. Falls back to old frontmatter format: `\u002F^version:\\s*\"([^\"]+)\"\u002Fm`\n3. Returns `'0.0.0'` on any error\n\n---\n\n## `squad upgrade` Behavior\n\n**Source file:** `dist\u002Fcli\u002Fcore\u002Fupgrade.js`\n\n### What gets overwritten:\n- `squad.agent.md` — full overwrite from template, then `stampVersion()`\n- Files with `overwriteOnUpgrade: true` in `TEMPLATE_MANIFEST`: casting JSON files, template .md files, `copilot-instructions.md` (if @copilot enabled)\n- GitHub Actions workflows — from `templates\u002Fworkflows\u002F`; non-npm projects get type-aware stubs\n- Runs `runMigrations()` after file copy\n\n### What is PRESERVED:\n- `team.md`, `routing.md`, `decisions.md`, `ceremonies.md` (user-owned)\n- `agents\u002F*\u002Fhistory.md` (individual agent memory)\n- `.squad\u002Fconfig.json` — **never touched**; `stateBackend` survives intact\n- User-added files not in TEMPLATE_MANIFEST\n\n### Self-upgrade path (`selfUpgradeCli()`):\nDetects npm\u002Fpnpm\u002Fyarn via `npm_execpath` and `npm_config_user_agent`. Runs:\n- npm: `npm install -g @bradygaster\u002Fsquad-cli@latest`\n- pnpm: `pnpm add -g @bradygaster\u002Fsquad-cli@latest`\n- yarn: `yarn global add @bradygaster\u002Fsquad-cli@latest`\nUse `@insider` tag for insider builds.\n\n### `compareSemver(a, b)` utility (in upgrade.js):\nReturns -1\u002F0\u002F1. Handles pre-release: strips pre-release for base comparison, then treats pre-release as less than release (e.g., `0.9.5-insider.1` \u003C `0.9.5`). Can be ported directly if needed in prompt logic.\n\n---\n\n## `.squad\u002Fconfig.json` — What It Holds\n\n```json\n{\n  \"version\": 1,\n  \"stateBackend\": \"worktree\"\n}\n```\n\nOther optional fields added by the coordinator at runtime:\n- `defaultModel` — global model override for all agent spawns\n- `agentModelOverrides.{agentName}` — per-agent model override\n\nThe file is read-only from the upgrade path's perspective. Only the coordinator writes to it (for model preferences).\n\n---\n\n## Version-Check Probe (npm Registry)\n\nUse this one-liner from inside a coordinator prompt to fetch dist-tags:\n\n```\nnpm view @bradygaster\u002Fsquad-cli dist-tags --json\n```\n\n- Timeout: **5 seconds.** If no response within 5 seconds, abandon and show normal greeting.\n- On success: extract `dist-tags[channel]` (e.g., `dist-tags[\"insider\"]`).\n- On any error (network failure, registry unreachable, parse error): show normal greeting.\n\n---\n\n## Upstream OS-Specific Cache\n\nThe CLI (`self-update.ts`) writes `latest` version info to an OS-specific path with a 24h TTL.\n\n**One-liner to read the upstream cache:**\n```\nnode -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\u003C86400000)console.log(JSON.stringify(d));else console.log('STALE')}catch{console.log('MISS')}\"\n```\n\nOutput semantics:\n- Valid JSON `{\"latestVersion\":\"X.Y.Z\",\"checkedAt\":N}` → cache hit; use `latestVersion`\n- `STALE` → cache expired (older than 24h); treat as no data\n- `MISS` → cache missing or corrupt; treat as no data\n\n**OS-specific cache path:**\n- Windows: `%APPDATA%\\squad-cli\\update-check.json`\n- Linux: `~\u002F.config\u002Fsquad-cli\u002Fupdate-check.json`\n- macOS: `~\u002FLibrary\u002FApplication Support\u002Fsquad-cli\u002Fupdate-check.json`\n\n---\n\n## Repo-Local Cache Convention: `.squad\u002F.cache\u002Fversion-check.json`\n\nUsed by coordinator for `insider`\u002F`preview` channels (the upstream cache only stores `latest`).\n\n**Schema:**\n```json\n{\n  \"checkedAt\": \"2026-05-26T14:13:28.492Z\",\n  \"currentVersion\": \"0.9.6-insider.2\",\n  \"channel\": \"insider\",\n  \"channelVersion\": \"0.9.7-insider.1\"\n}\n```\n\n**TTL:** 24 hours from `checkedAt`.\n**Gitignore:** `.squad\u002F.cache\u002F` is listed in `.gitignore` — cache files are never committed.\n\n---\n\n## Key File Paths (installed CLI)\n\n| Purpose | Path |\n|---|---|\n| Version utilities | `dist\u002Fcli\u002Fcore\u002Fversion.js` |\n| Upgrade logic | `dist\u002Fcli\u002Fcore\u002Fupgrade.js` |\n| Init logic | `dist\u002Fcli\u002Fcore\u002Finit.js` |\n| Template manifest | `dist\u002Fcli\u002Fcore\u002Ftemplates.js` |\n| Copilot install helper | `dist\u002Fcli\u002Fcopilot-install.js` |\n| squad.agent.md template | `templates\u002Fsquad.agent.md.template` |\n| Session init reference | `templates\u002Fsession-init-reference.md` |\n| All templates | `templates\u002F` |\n",{"name":37,"domain":38,"source":39,"confidence":40,"description":41,"allowedTools":42},"squad-version-check","squad-internals","Discovered by Data; validated in bradygaster\u002Fsquad#1173 recon (2026-05-26).","medium","Internals of how @bradygaster\u002Fsquad-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.",[],"main","52a1e8c92456b3469b9a4afdc06d3f2cc4ab6796",".claude\u002Fskills\u002Ftaxonomy",0,"https:\u002F\u002Fgithub.com\u002Faudy\u002Fdotflies","https:\u002F\u002Fgithub.com\u002Faudy","agdr.org","Bioinformatics Engineer & Technical Lead","2026-11-08 13:22:27",{"source":8,"skillName":37,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add audy\u002Fdotflies --skill squad-version-check",{"tool":58,"command":59},"bunx","bunx skills add audy\u002Fdotflies --skill squad-version-check",{"tool":61,"command":62},"pnpm","pnpm dlx skills add audy\u002Fdotflies --skill squad-version-check","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Faudy\u002Fdotflies\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ftaxonomy\u002FSKILL.md",true,[],[67,73],{"skillNo":68,"name":69,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":32},"01M6BSPR3RQ3ZF2KQQ3J0NMDD2","spitballing","https:\u002F\u002Fgithub.com\u002Faudy\u002Fdotflies\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fspitballing\u002FSKILL.md",[],[69],{"skillNo":74,"name":75,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":32},"01M6BSPPF635M091QP32H9SR0N","science","https:\u002F\u002Fgithub.com\u002Faudy\u002Fdotflies\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fscience\u002FSKILL.md",[],[75]]