[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CFYG8RJ13PCRS48E9TV5AB":3,"skill-same:01M6CFYG8RJ13PCRS48E9TV5AB":70},{"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":41,"linkOnly":42,"markdownContent":43,"markdownBody":44,"frontMatter":45,"refName":46,"commitSha":47,"skillDirectory":48,"forksCount":49,"repositoryHtmlUrl":50,"repositoryHomepageUrl":51,"ownerHtmlUrl":52,"ownerBlogUrl":53,"ownerDescription":54,"updatedAt":55,"install":56,"resources":69},"01M6CFYG8RJ13PCRS48E9TV5AB","squad-conventions","Squad 代码库规范","Core conventions and patterns used in the Squad codebase","Squad 代码库中使用的核心约定和模式。","spboyer\u002Fsensei","spboyer","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F7681382?v=4","01M6CFYAEW2827181XXSYD95QD","Shayne Boyer","01M6CFYAJQK7N5X1TZEB8DCCQM",60,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fspboyer\u002Fsensei\u002Fblob\u002Fmain\u002F.ai-team-templates\u002Fskills\u002Fsquad-conventions\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TKQDF2K4KQS863Q79P4","开发参考","SCENARIO","使用场景",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",[31,32,33,34,35,36,37,38,39,40],"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- `.ai-team\u002F` — Team state (user-owned, never overwritten by upgrades)\n- `.ai-team-templates\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- `.ai-team\u002Fskills\u002F` — Team skills in SKILL.md format (user-owned)\n- `.ai-team\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} .ai-team\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- `.ai-team\u002F` — Team state (user-owned, never overwritten by upgrades)\n- `.ai-team-templates\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- `.ai-team\u002Fskills\u002F` — Team skills in SKILL.md format (user-owned)\n- `.ai-team\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} .ai-team\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":35,"source":38,"confidence":39,"description":7},"main","2d48045894de9653dadce819808dbf465e461698",".ai-team-templates\u002Fskills\u002Fsquad-conventions",8,"https:\u002F\u002Fgithub.com\u002Fspboyer\u002Fsensei","https:\u002F\u002Fspboyer.github.io\u002Fsensei\u002F","https:\u002F\u002Fgithub.com\u002Fspboyer","http:\u002F\u002Fwww.tattoocoder.com","Member of Technical Staff","2026-11-14 04:17:49",{"source":9,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add spboyer\u002Fsensei --skill squad-conventions",{"tool":62,"command":63},"bunx","bunx skills add spboyer\u002Fsensei --skill squad-conventions",{"tool":65,"command":66},"pnpm","pnpm dlx skills add spboyer\u002Fsensei --skill squad-conventions","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fspboyer\u002Fsensei\u002Fblob\u002Fmain\u002F.ai-team-templates\u002Fskills\u002Fsquad-conventions\u002FSKILL.md",true,[],[71,93,129],{"skillNo":72,"name":73,"nameZh":74,"description":75,"descriptionZh":76,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":77,"categories":78,"keywords":85,"publishedAt":41},"01M6CFYXGVR5A3QMJMR462AKM8","sample-skill","文件处理示例技能","Utility for working with files","用于处理文件的实用工具","https:\u002F\u002Fgithub.com\u002Fspboyer\u002Fsensei\u002Fblob\u002Fmain\u002Fdemo-docs\u002Fsample-skill\u002FSKILL.md",[79,82],{"categoryNo":80,"categoryName":81,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BS5011KJDVSRXG1DC4P666","普通用户",{"categoryNo":83,"categoryName":84,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BSYDSNXQT2W2GMZGF0ZHH4","示例与演示技能",[86,87,88,89,90,91,92],"sample","sample skill","with files","files","with","for","utility",{"skillNo":94,"name":95,"nameZh":96,"description":97,"descriptionZh":98,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":99,"sourceHtmlUrl":100,"categories":101,"keywords":108,"publishedAt":41},"01M6CFYJN9FX0GHAH3J13VTNPW","sensei","智能体技能改进与评估","**WORKFLOW SKILL** - Improve and evaluate Agent Skills with portable validation, host profiles, resource analysis, and behavioral evidence. WHEN: \"run sensei\", \"sensei help\", \"improve skill\", \"fix frontmatter\", \"score skill\", \"analyze skill\", \"evaluate skill\". INVOKES: Sensei CLI, test runners, git. FOR SINGLE OPERATIONS: use the Sensei CLI directly.","**工作流技能** —— 通过可移植验证、主机配置（host profiles）、资源分析和行为证据来改进与评估智能体技能（Agent Skills）。适用场景：「run sensei」「sensei help」「improve skill」「fix frontmatter」「score skill」「analyze skill」「evaluate skill」。调用工具：Sensei CLI、测试运行器、git。单次操作：直接使用 Sensei CLI。","https:\u002F\u002Fgithub.com\u002Fspboyer\u002Fsensei\u002Fblob\u002Fmain\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fspboyer\u002Fsensei\u002Fblob\u002Fmain\u002FSKILL.md",[102,105],{"categoryNo":103,"categoryName":104,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BRN0CV1NMDZ5TEJX1GVM29","插件与技能管理",{"categoryNo":106,"categoryName":107,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师",[95,109,110,111,112,113,114,91,115,116,117,118,119,120,121,122,123,124,125,126,127,128],"git","clarity","use","improve skill","workflow","check","workflow skill","tokens","single","when","token","improve","routing","test","cli","operations","help","run","fix","runners",{"skillNo":130,"name":131,"nameZh":132,"description":133,"descriptionZh":134,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":135,"categories":136,"keywords":139,"publishedAt":41},"01M6CFYCDPWRYGEA59HS85FZ5C","{skill-name}","{技能名称}","{what this skill teaches agents}","{本技能教给智能体的内容}","https:\u002F\u002Fgithub.com\u002Fspboyer\u002Fsensei\u002Fblob\u002Fmain\u002F.ai-team-templates\u002Fskill.md",[137,138],{"categoryNo":103,"categoryName":104,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":106,"categoryName":107,"taxonomyType":28,"taxonomyTypeDesc":29},[140,141,142,143,144,145,146,147,148,149,38,150,39],"{skill name}","skill name","name","learned","how","testing","design","error-handling","api","error","api-design"]