protected-files
Skill3.4k starsChanged 2 months agoMITView on GitHub
Zero-dependency bootstrap files that must never import npm packages or SDK code
In this repository247 other files it gives its agents.
- .github/agents.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- packages/squad-cli/templates/copilot-instructions.mdCopilot instructions
- packages/squad-sdk/templates/copilot-instructions.mdCopilot instructions
- .squad-templates/copilot-instructions.mdCopilot instructions
- .squad/templates/copilot-instructions.mdCopilot instructions
- templates/copilot-instructions.mdCopilot instructions
- action-skill-contractsSkill
- agent-collaborationSkill
- agent-conductSkill
- architectural-proposalsSkill
- architectural-reviewSkill
- archival-integritySkill
- ci-validation-gatesSkill
- client-compatibilitySkill
- cli-wiringSkill
- content-scopeSkill
- distributed-meshSkill
- documentation-maintenanceSkill
- github-multi-accountSkill
- git-workflowSkill
- history-hygieneSkill
- init-modeSkill
- model-selectionSkill
- pr-lifecycleSkill
- release-processSkill
- reskillSkill
- reviewer-protocolSkill
- secret-handlingSkill
- security-reviewSkill
- squad-conventionsSkill
- test-disciplineSkill
- windows-compatibilitySkill
- agentic-workflow-designerSkill
- gh-aw-reliabilitySkill
- iterative-retrievalSkill
- reflectSkill
- {skill-name}Skill
- agent-collaborationSkill
- agent-conductSkill
- architectural-proposalsSkill
- ci-validation-gatesSkill
- client-compatibilitySkill
- cli-wiringSkill
- coordinator-init-modeSkill
- coordinator-response-modeSkill
- coordinator-source-of-truthSkill
- cross-machine-coordinationSkill
- cross-squad-communicationSkill
- cross-squadSkill
- distributed-meshSkill
- docs-standardsSkill
- e2e-template-testingSkill
- economy-modeSkill
- error-recoverySkill
- external-commsSkill
- fact-checkingSkill
- gh-auth-isolationSkill
- gh-aw-enlistmentSkill
- github-multi-accountSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 48
When adding a new file that runs before SDK init:
- Distinctive: line 49
Add it to the Protected File List table above
- Very specific: line 50
Write a matching zero-dependency regression test (see detect-squad-dir-zero-deps.test.ts for the pattern)
- Very specific: line 51
Add — zero dependencies marker in the file header
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Context
The 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.
This skill applies when:
- Touching any file in
packages/squad-cli/src/cli/core/ - Running sweeping refactors (e.g., "convert all
fscalls toStorageProvider") - Adding new bootstrap utilities
Protected File List
| File | Purpose |
packages/squad-cli/src/cli/core/detect-squad-dir.ts | Finds .squad/ directory at startup — runs before SDK init |
packages/squad-cli/src/cli/core/errors.ts | Error classes (SquadError, fatal()) — used by all CLI entry points |
packages/squad-cli/src/cli/core/gh-cli.ts | GitHub CLI wrapper — uses only node:child_process and node:util |
packages/squad-cli/src/cli/core/output.ts | Color/emoji console output — pure ANSI codes, zero imports |
packages/squad-cli/src/cli/core/history-split.ts | Separates portable knowledge from project data — pure string logic |
Rules
- ❌ NEVER convert these files to use
FSStorageProvider,StorageProvider, or any SDK abstraction - ❌ NEVER add
importorrequirestatements referencing packages outsidenode:*built-ins - ✅ ONLY use
node:fs,node:path,node:child_process,node:util, and other Node.js built-in modules - ✅ DO check this list before sweeping refactors
- ✅ LOOK for
— zero dependenciesmarkers in file headers as a signal
SDK/CLI Package Boundary
The packages/squad-cli/src/cli/core/ 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/ file, verify it is not in the protected list and confirm the SDK is loaded at that point in the startup sequence.
Anti-Patterns
- Converting all
fscalls toStorageProviderwithout checking this list first - Adding
import { X } from '@bradygaster/squad-sdk'to a bootstrap file - Assuming every file in
core/can safely import SDK code
Adding New Bootstrap Utilities
When adding a new file that runs before SDK init:
- Add it to the Protected File List table above
- Write a matching zero-dependency regression test (see
detect-squad-dir-zero-deps.test.tsfor the pattern) - Add
— zero dependenciesmarker in the file header
Regression tests guard these files, but prevention is better than detection.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

