[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6BSPSECCASYFXAC0B6K4SM0":3,"skill-same:01M6BSPSECCASYFXAC0B6K4SM0":78},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":55,"commitSha":56,"skillDirectory":57,"forksCount":58,"repositoryHtmlUrl":59,"repositoryHomepageUrl":17,"ownerHtmlUrl":60,"ownerBlogUrl":61,"ownerDescription":62,"updatedAt":63,"install":64,"resources":77},"01M6BSPSECCASYFXAC0B6K4SM0","taxonomy","生物分类数据处理","Rust\u002FPython library for reading, editing, and traversing biological taxonomies. Supports NCBI, JSON, Newick, GTDB, and PhyloXML formats.","用于读取、编辑和遍历生物分类体系的 Rust\u002FPython 库。支持 NCBI、JSON、Newick、GTDB 和 PhyloXML 格式。","audy\u002Fdotflies","audy","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F115904?v=4","01M6BSPM7N3739T42N7YP16MGM","Austin Richardson","01M6BSPMC3Y0WFH2B5SW9M86HX",6,"MIT",null,"https:\u002F\u002Fgithub.com\u002Faudy\u002Fdotflies\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ftaxonomy\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8C99FDBYPR98XGE4CR0C14H","生物信息学分析","SCENARIO","使用场景",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C99FE7CJ3FKWKFJZ3VHJC4","生物信息工程师","PROFESSION","适用职业",[5,31,32,33,34,35,36,37,38,39,40,41,42,43],"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":49,"domain":50,"source":51,"confidence":52,"description":53,"allowedTools":54},"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":9,"skillName":49,"commands":65,"prompt":75,"zipAvailable":76},[66,69,72],{"tool":67,"command":68},"npx","npx skills add audy\u002Fdotflies --skill squad-version-check",{"tool":70,"command":71},"bunx","bunx skills add audy\u002Fdotflies --skill squad-version-check",{"tool":73,"command":74},"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,[],[79,93],{"skillNo":80,"name":81,"nameZh":82,"description":17,"descriptionZh":83,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":84,"categories":85,"keywords":92,"publishedAt":44},"01M6BSPR3RQ3ZF2KQQ3J0NMDD2","spitballing","头脑风暴","","https:\u002F\u002Fgithub.com\u002Faudy\u002Fdotflies\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fspitballing\u002FSKILL.md",[86,89],{"categoryNo":87,"categoryName":88,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8C0NK9M473EJ7H1916WKHM9","头脑风暴与创意构思",{"categoryNo":90,"categoryName":91,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C2MZSX0YJXR444XP83VR5N","产品经理",[81],{"skillNo":94,"name":95,"nameZh":96,"description":17,"descriptionZh":83,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":97,"categories":98,"keywords":105,"publishedAt":44},"01M6BSPPF635M091QP32H9SR0N","science","科学","https:\u002F\u002Fgithub.com\u002Faudy\u002Fdotflies\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fscience\u002FSKILL.md",[99,102],{"categoryNo":100,"categoryName":101,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8C99FKRP2PQMVBS0JF2G65X","科研流程自动化",{"categoryNo":103,"categoryName":104,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C9D282HS6PBNFFH2AD1RSX","学术研究员",[95]]