[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6X1SP23HCNVWCASGT3KH1AM":3,"skill-same:01M6X1SP23HCNVWCASGT3KH1AM":58},{"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":29,"linkOnly":30,"markdownContent":31,"markdownBody":32,"frontMatter":33,"refName":34,"commitSha":35,"skillDirectory":36,"forksCount":37,"repositoryHtmlUrl":38,"repositoryHomepageUrl":39,"ownerHtmlUrl":40,"ownerBlogUrl":41,"ownerDescription":42,"updatedAt":43,"install":44,"resources":57},"01M6X1SP23HCNVWCASGT3KH1AM","squad-conventions",null,"Core conventions and patterns used in the Squad codebase","github\u002Fsquad","github","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F9919?v=4","01M6AC83DS133TPXFSP1DHNCC6","GitHub","01M6X0MZ6B0WYMMDPK3Q61KER6",3382,"MIT","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002Fpackages\u002Fsquad-sdk\u002Ftemplates\u002Fskills\u002Fsquad-conventions\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28],"squad conventions","squad","conventions","core","project-conventions","patterns","project","manual","high","codebase","2026-11-10 10:12:30",false,"---\nname: \"squad-conventions\"\ndescription: \"Core conventions and patterns used in the Squad codebase\"\ndomain: \"project-conventions\"\nconfidence: \"high\"\nsource: \"manual\"\n---\n\n## Context\nThese conventions apply to all work on the Squad CLI tool (`create-squad`). Squad is a zero-dependency Node.js package that adds AI agent teams to any project. Understanding these patterns is essential before modifying any Squad source code.\n\n## Patterns\n\n### Zero Dependencies\nSquad has zero runtime dependencies. Everything uses Node.js built-ins (`fs`, `path`, `os`, `child_process`). Do not add packages to `dependencies` in `package.json`. This is a hard constraint, not a preference.\n\n### Node.js Built-in Test Runner\nTests use `node:test` and `node:assert\u002Fstrict` — no test frameworks. Run with `npm test`. Test files live in `test\u002F`. The test command is `node --test test\u002F`.\n\n### Error Handling — `fatal()` Pattern\nAll user-facing errors use the `fatal(msg)` function which prints a red `✗` prefix and exits with code 1. Never throw unhandled exceptions or print raw stack traces. The global `uncaughtException` handler calls `fatal()` as a safety net.\n\n### ANSI Color Constants\nColors are defined as constants at the top of `index.js`: `GREEN`, `RED`, `DIM`, `BOLD`, `RESET`. Use these constants — do not inline ANSI escape codes.\n\n### File Structure\n- `.squad\u002F` — Team state (user-owned, never overwritten by upgrades)\n- `.squad\u002Ftemplates\u002F` — Template files copied from `templates\u002F` (Squad-owned, overwritten on upgrade)\n- `.github\u002Fagents\u002Fsquad.agent.md` — Coordinator prompt (Squad-owned, overwritten on upgrade)\n- `templates\u002F` — Source templates shipped with the npm package\n- `.squad\u002Fskills\u002F` — Team skills in SKILL.md format (user-owned)\n- `.squad\u002Fdecisions\u002Finbox\u002F` — Drop-box for parallel decision writes\n\n### Windows Compatibility\nAlways use `path.join()` for file paths — never hardcode `\u002F` or `\\` separators. Squad must work on Windows, macOS, and Linux. All tests must pass on all platforms.\n\n### Init Idempotency\nThe init flow uses a skip-if-exists pattern: if a file or directory already exists, skip it and report \"already exists.\" Never overwrite user state during init. The upgrade flow overwrites only Squad-owned files.\n\n### Copy Pattern\n`copyRecursive(src, target)` handles both files and directories. It creates parent directories with `{ recursive: true }` and uses `fs.copyFileSync` for files.\n\n## Examples\n\n```javascript\n\u002F\u002F Error handling\nfunction fatal(msg) {\n  console.error(`${RED}✗${RESET} ${msg}`);\n  process.exit(1);\n}\n\n\u002F\u002F File path construction (Windows-safe)\nconst agentDest = path.join(dest, '.github', 'agents', 'squad.agent.md');\n\n\u002F\u002F Skip-if-exists pattern\nif (!fs.existsSync(ceremoniesDest)) {\n  fs.copyFileSync(ceremoniesSrc, ceremoniesDest);\n  console.log(`${GREEN}✓${RESET} .squad\u002Fceremonies.md`);\n} else {\n  console.log(`${DIM}ceremonies.md already exists — skipping${RESET}`);\n}\n```\n\n## Anti-Patterns\n- **Adding npm dependencies** — Squad is zero-dep. Use Node.js built-ins only.\n- **Hardcoded path separators** — Never use `\u002F` or `\\` directly. Always `path.join()`.\n- **Overwriting user state on init** — Init skips existing files. Only upgrade overwrites Squad-owned files.\n- **Raw stack traces** — All errors go through `fatal()`. Users see clean messages, not stack traces.\n- **Inline ANSI codes** — Use the color constants (`GREEN`, `RED`, `DIM`, `BOLD`, `RESET`).\n","## Context\nThese conventions apply to all work on the Squad CLI tool (`create-squad`). Squad is a zero-dependency Node.js package that adds AI agent teams to any project. Understanding these patterns is essential before modifying any Squad source code.\n\n## Patterns\n\n### Zero Dependencies\nSquad has zero runtime dependencies. Everything uses Node.js built-ins (`fs`, `path`, `os`, `child_process`). Do not add packages to `dependencies` in `package.json`. This is a hard constraint, not a preference.\n\n### Node.js Built-in Test Runner\nTests use `node:test` and `node:assert\u002Fstrict` — no test frameworks. Run with `npm test`. Test files live in `test\u002F`. The test command is `node --test test\u002F`.\n\n### Error Handling — `fatal()` Pattern\nAll user-facing errors use the `fatal(msg)` function which prints a red `✗` prefix and exits with code 1. Never throw unhandled exceptions or print raw stack traces. The global `uncaughtException` handler calls `fatal()` as a safety net.\n\n### ANSI Color Constants\nColors are defined as constants at the top of `index.js`: `GREEN`, `RED`, `DIM`, `BOLD`, `RESET`. Use these constants — do not inline ANSI escape codes.\n\n### File Structure\n- `.squad\u002F` — Team state (user-owned, never overwritten by upgrades)\n- `.squad\u002Ftemplates\u002F` — Template files copied from `templates\u002F` (Squad-owned, overwritten on upgrade)\n- `.github\u002Fagents\u002Fsquad.agent.md` — Coordinator prompt (Squad-owned, overwritten on upgrade)\n- `templates\u002F` — Source templates shipped with the npm package\n- `.squad\u002Fskills\u002F` — Team skills in SKILL.md format (user-owned)\n- `.squad\u002Fdecisions\u002Finbox\u002F` — Drop-box for parallel decision writes\n\n### Windows Compatibility\nAlways use `path.join()` for file paths — never hardcode `\u002F` or `\\` separators. Squad must work on Windows, macOS, and Linux. All tests must pass on all platforms.\n\n### Init Idempotency\nThe init flow uses a skip-if-exists pattern: if a file or directory already exists, skip it and report \"already exists.\" Never overwrite user state during init. The upgrade flow overwrites only Squad-owned files.\n\n### Copy Pattern\n`copyRecursive(src, target)` handles both files and directories. It creates parent directories with `{ recursive: true }` and uses `fs.copyFileSync` for files.\n\n## Examples\n\n```javascript\n\u002F\u002F Error handling\nfunction fatal(msg) {\n  console.error(`${RED}✗${RESET} ${msg}`);\n  process.exit(1);\n}\n\n\u002F\u002F File path construction (Windows-safe)\nconst agentDest = path.join(dest, '.github', 'agents', 'squad.agent.md');\n\n\u002F\u002F Skip-if-exists pattern\nif (!fs.existsSync(ceremoniesDest)) {\n  fs.copyFileSync(ceremoniesSrc, ceremoniesDest);\n  console.log(`${GREEN}✓${RESET} .squad\u002Fceremonies.md`);\n} else {\n  console.log(`${DIM}ceremonies.md already exists — skipping${RESET}`);\n}\n```\n\n## Anti-Patterns\n- **Adding npm dependencies** — Squad is zero-dep. Use Node.js built-ins only.\n- **Hardcoded path separators** — Never use `\u002F` or `\\` directly. Always `path.join()`.\n- **Overwriting user state on init** — Init skips existing files. Only upgrade overwrites Squad-owned files.\n- **Raw stack traces** — All errors go through `fatal()`. Users see clean messages, not stack traces.\n- **Inline ANSI codes** — Use the color constants (`GREEN`, `RED`, `DIM`, `BOLD`, `RESET`).\n",{"name":5,"domain":23,"source":26,"confidence":27,"description":7},"dev","7b731ec97f35346bdc4fa87c3edaf16b808fc0ae","packages\u002Fsquad-sdk\u002Ftemplates\u002Fskills\u002Fsquad-conventions",518,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad","https:\u002F\u002Fgithub.github.io\u002Fsquad\u002F","https:\u002F\u002Fgithub.com\u002Fgithub","https:\u002F\u002Fgithub.com\u002Fabout","How people build software.","2026-11-13 01:58:30",{"source":8,"skillName":5,"commands":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add github\u002Fsquad --skill squad-conventions",{"tool":50,"command":51},"bunx","bunx skills add github\u002Fsquad --skill squad-conventions",{"tool":53,"command":54},"pnpm","pnpm dlx skills add github\u002Fsquad --skill squad-conventions","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002Fpackages\u002Fsquad-sdk\u002Ftemplates\u002Fskills\u002Fsquad-conventions\u002FSKILL.md",true,[],[59,67,74,81,112,124],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":66},"01M76742ST8ZMSD38226TH61CN","squad-coordinator-init-mode","Squad coordinator only: Init Mode, proposing and casting a new team. Load when team.md is missing or has an empty roster, or when asked to set up or cast a team.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002Fplugins\u002Fsquad\u002Fskills\u002Fsquad-coordinator-init-mode\u002FSKILL.md",[],[],"2026-11-12 13:55:43",{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":66},"01M7673KYSME979M20YQTVV8P6","retro-enforcement","Keep retrospectives on schedule and track their action items as GitHub Issues, not markdown checklists","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002Fplugins\u002Fsquad\u002Fskills\u002Fretro-enforcement\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":66},"01M7670QCHBSR4W2XSX8XPA2ZB","cli-wiring","Checklist for wiring a new Squad CLI command: route it in cli-entry.ts, add help text, and test that it is reachable","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002Fplugins\u002Fsquad\u002Fskills\u002Fcli-wiring\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":92,"publishedAt":29},"01M6X287DVJK1S91END9DSHETN","gh-aw-enlistment","Enlist a repository into Squad by installing the supported GitHub Agentic Workflows (gh-aw) bootstrap — with strict compilation, an explicit safe-update allowlist, and a human-reviewed bootstrap PR. Never auto-merges.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002Fworkflows\u002Fskills\u002Fgh-aw-enlistment\u002FSKILL.md",[87],{"categoryNo":88,"categoryName":89,"taxonomyType":90,"taxonomyTypeDesc":91},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[93,94,95,96,97,98,20,99,100,101,102,103,104,105,106,107,108,109,110,111],"gh aw enlistment","gh","preflight","guide","identity","compiling","pr creation","Safety","safe","update","human","github cli","lock","workflows","auto","files","agentic workflows","ci","actions",{"skillNo":113,"name":114,"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":115,"categories":116,"keywords":118,"publishedAt":29},"01M6X27Y5119CSRQFFJCV6432R","My Skill","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002Ftest-fixtures\u002Fskills-test-abb30454\u002Fmy-skill\u002FSKILL.md",[117],{"categoryNo":88,"categoryName":89,"taxonomyType":90,"taxonomyTypeDesc":91},[119,120,121,122,123],"my","my skill","tester","testing","vitest",{"skillNo":125,"name":126,"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":127,"categories":128,"keywords":130,"publishedAt":29},"01M6X27RWAYB2X9ER0MVRRKXGA","bad-skill","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002Ftest-fixtures\u002Fskills-test-abb30454\u002Fbad-skill\u002FSKILL.md",[129],{"categoryNo":88,"categoryName":89,"taxonomyType":90,"taxonomyTypeDesc":91},[131,132],"bad","bad skill"]