[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6X0S4H6KC17QJA06WXD585G":3,"skill-same:01M6X0S4H6KC17QJA06WXD585G":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":35,"linkOnly":36,"markdownContent":37,"markdownBody":38,"frontMatter":39,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":45,"repositoryHtmlUrl":46,"repositoryHomepageUrl":47,"ownerHtmlUrl":48,"ownerBlogUrl":49,"ownerDescription":50,"updatedAt":51,"install":52,"resources":65},"01M6X0S4H6KC17QJA06WXD585G","protected-files",null,"Zero-dependency bootstrap files that must never import npm packages or SDK code","github\u002Fsquad","github","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F9919?v=4","01M6AC83DS133TPXFSP1DHNCC6","GitHub","01M6X0MZ6B0WYMMDPK3Q61KER6",3391,"MIT","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002F.copilot\u002Fskills\u002Fprotected-files\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34],"files","protected files","cli","sdk","bootstrap","packages","code","npm","ZeRO","startup","Safety","never","dependency","import","high","when","2026-11-10 10:12:30",false,"---\nname: \"protected-files\"\ndescription: \"Zero-dependency bootstrap files that must never import npm packages or SDK code\"\ndomain: \"dependency-safety\"\nconfidence: \"high\"\nsource: \"earned — CLI startup crashes when bootstrap files import SDK code\"\n---\n\n## Context\n\nThe CLI (`squad-cli`) has bootstrap utilities that run **before** the Squad SDK is loaded. If these files import SDK code (e.g., `FSStorageProvider`, anything from `squad-sdk`), the CLI breaks at startup — no helpful error, just a crash.\n\nThis skill applies when:\n- Touching any file in `packages\u002Fsquad-cli\u002Fsrc\u002Fcli\u002Fcore\u002F`\n- Running sweeping refactors (e.g., \"convert all `fs` calls to `StorageProvider`\")\n- Adding new bootstrap utilities\n\n## Protected File List\n\n| File | Purpose |\n|------|---------|\n| `packages\u002Fsquad-cli\u002Fsrc\u002Fcli\u002Fcore\u002Fdetect-squad-dir.ts` | Finds `.squad\u002F` directory at startup — runs before SDK init |\n| `packages\u002Fsquad-cli\u002Fsrc\u002Fcli\u002Fcore\u002Ferrors.ts` | Error classes (`SquadError`, `fatal()`) — used by all CLI entry points |\n| `packages\u002Fsquad-cli\u002Fsrc\u002Fcli\u002Fcore\u002Fgh-cli.ts` | GitHub CLI wrapper — uses only `node:child_process` and `node:util` |\n| `packages\u002Fsquad-cli\u002Fsrc\u002Fcli\u002Fcore\u002Foutput.ts` | Color\u002Femoji console output — pure ANSI codes, zero imports |\n| `packages\u002Fsquad-cli\u002Fsrc\u002Fcli\u002Fcore\u002Fhistory-split.ts` | Separates portable knowledge from project data — pure string logic |\n\n## Rules\n\n- ❌ **NEVER** convert these files to use `FSStorageProvider`, `StorageProvider`, or any SDK abstraction\n- ❌ **NEVER** add `import` or `require` statements referencing packages outside `node:*` built-ins\n- ✅ **ONLY** use `node:fs`, `node:path`, `node:child_process`, `node:util`, and other Node.js built-in modules\n- ✅ **DO** check this list before sweeping refactors\n- ✅ **LOOK** for `— zero dependencies` markers in file headers as a signal\n\n## SDK\u002FCLI Package Boundary\n\nThe `packages\u002Fsquad-cli\u002Fsrc\u002Fcli\u002Fcore\u002F` directory contains a mix of early-startup bootstrap utilities and later SDK-dependent modules. The protected list above is the **authoritative set** of zero-dependency bootstrap files. If you need to add SDK imports to another `core\u002F` file, verify it is not in the protected list and confirm the SDK is loaded at that point in the startup sequence.\n\n## Anti-Patterns\n\n- Converting all `fs` calls to `StorageProvider` without checking this list first\n- Adding `import { X } from '@bradygaster\u002Fsquad-sdk'` to a bootstrap file\n- Assuming every file in `core\u002F` can safely import SDK code\n\n## Adding New Bootstrap Utilities\n\nWhen adding a new file that runs before SDK init:\n1. Add it to the Protected File List table above\n2. Write a matching zero-dependency regression test (see `detect-squad-dir-zero-deps.test.ts` for the pattern)\n3. Add `— zero dependencies` marker in the file header\n\nRegression tests guard these files, but **prevention is better than detection**.\n","## Context\n\nThe CLI (`squad-cli`) has bootstrap utilities that run **before** the Squad SDK is loaded. If these files import SDK code (e.g., `FSStorageProvider`, anything from `squad-sdk`), the CLI breaks at startup — no helpful error, just a crash.\n\nThis skill applies when:\n- Touching any file in `packages\u002Fsquad-cli\u002Fsrc\u002Fcli\u002Fcore\u002F`\n- Running sweeping refactors (e.g., \"convert all `fs` calls to `StorageProvider`\")\n- Adding new bootstrap utilities\n\n## Protected File List\n\n| File | Purpose |\n|------|---------|\n| `packages\u002Fsquad-cli\u002Fsrc\u002Fcli\u002Fcore\u002Fdetect-squad-dir.ts` | Finds `.squad\u002F` directory at startup — runs before SDK init |\n| `packages\u002Fsquad-cli\u002Fsrc\u002Fcli\u002Fcore\u002Ferrors.ts` | Error classes (`SquadError`, `fatal()`) — used by all CLI entry points |\n| `packages\u002Fsquad-cli\u002Fsrc\u002Fcli\u002Fcore\u002Fgh-cli.ts` | GitHub CLI wrapper — uses only `node:child_process` and `node:util` |\n| `packages\u002Fsquad-cli\u002Fsrc\u002Fcli\u002Fcore\u002Foutput.ts` | Color\u002Femoji console output — pure ANSI codes, zero imports |\n| `packages\u002Fsquad-cli\u002Fsrc\u002Fcli\u002Fcore\u002Fhistory-split.ts` | Separates portable knowledge from project data — pure string logic |\n\n## Rules\n\n- ❌ **NEVER** convert these files to use `FSStorageProvider`, `StorageProvider`, or any SDK abstraction\n- ❌ **NEVER** add `import` or `require` statements referencing packages outside `node:*` built-ins\n- ✅ **ONLY** use `node:fs`, `node:path`, `node:child_process`, `node:util`, and other Node.js built-in modules\n- ✅ **DO** check this list before sweeping refactors\n- ✅ **LOOK** for `— zero dependencies` markers in file headers as a signal\n\n## SDK\u002FCLI Package Boundary\n\nThe `packages\u002Fsquad-cli\u002Fsrc\u002Fcli\u002Fcore\u002F` directory contains a mix of early-startup bootstrap utilities and later SDK-dependent modules. The protected list above is the **authoritative set** of zero-dependency bootstrap files. If you need to add SDK imports to another `core\u002F` file, verify it is not in the protected list and confirm the SDK is loaded at that point in the startup sequence.\n\n## Anti-Patterns\n\n- Converting all `fs` calls to `StorageProvider` without checking this list first\n- Adding `import { X } from '@bradygaster\u002Fsquad-sdk'` to a bootstrap file\n- Assuming every file in `core\u002F` can safely import SDK code\n\n## Adding New Bootstrap Utilities\n\nWhen adding a new file that runs before SDK init:\n1. Add it to the Protected File List table above\n2. Write a matching zero-dependency regression test (see `detect-squad-dir-zero-deps.test.ts` for the pattern)\n3. Add `— zero dependencies` marker in the file header\n\nRegression tests guard these files, but **prevention is better than detection**.\n",{"name":5,"domain":40,"source":41,"confidence":33,"description":7},"dependency-safety","earned — CLI startup crashes when bootstrap files import SDK code","dev","7b731ec97f35346bdc4fa87c3edaf16b808fc0ae",".copilot\u002Fskills\u002Fprotected-files",520,"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-15 02:13:59",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add github\u002Fsquad --skill protected-files",{"tool":58,"command":59},"bunx","bunx skills add github\u002Fsquad --skill protected-files",{"tool":61,"command":62},"pnpm","pnpm dlx skills add github\u002Fsquad --skill protected-files","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002F.copilot\u002Fskills\u002Fprotected-files\u002FSKILL.md",true,[],[67,75,82,89,96,103],{"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":74},"01M76752CVNE7K6NWD59CRAYNJ","windows-compatibility","Cross-platform path handling and command patterns","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002Fplugins\u002Fsquad\u002Fskills\u002Fwindows-compatibility\u002FSKILL.md",[],[],"2026-11-12 13:55:43",{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":74},"01M767508W8A4G83NX1FKEW5VN","versioning-policy","SemVer rules for Squad's stable, preview, insider, and local package versions","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002Fplugins\u002Fsquad\u002Fskills\u002Fversioning-policy\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":74},"01M7674X5JJKNJ74B3SS8PGXG2","tiered-memory","Three-tier agent memory model (hot\u002Fcold\u002Fwiki) for context reduction per spawn","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002Fplugins\u002Fsquad\u002Fskills\u002Ftiered-memory\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":74},"01M7674V3S9H03A76H75M1KSAF","test-discipline","Design assertions that prove the actual contract and fail on realistic regressions","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002Fplugins\u002Fsquad\u002Fskills\u002Ftest-discipline\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":74},"01M7674QB8CA61RNDX2Z0NAK71","squad","Squad's command catalog and interactive menu. Invoke via \u002Fsquad (slash command) or natural language (\"squad commands\", \"what can squad do\", \"show me squad options\"). Presents categorized operations (Install & Upgrade, Team Management, Issues & PRs, Plugins & Skills, Model & Cost, Sessions & State) as an interactive picker. Routes to the right squad CLI command or the Squad coordinator agent.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002Fplugins\u002Fsquad\u002Fskills\u002Fsquad\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":74},"01M7674KTQ632N30HQB1TP7TXH","squad-version-check","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.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fsquad\u002Fblob\u002Fdev\u002Fplugins\u002Fsquad\u002Fskills\u002Fsquad-version-check\u002FSKILL.md",[],[]]