pre-code
Skill1 starsChanged 7 months agoMITView on GitHub
Pre-coding readiness gate. Triggers ONLY when: about to write implementation code for a feature or fix. Do NOT trigger when: writing config files, documentation, scripts, or making quick single-line edits.
- Commits and pushes
In this repository30 other files it gives its agents.
- claude.mdCLAUDE.md
- biz-thinkSkill
- biz-validateSkill
- brand-buildSkill
- community-engageSkill
- content-createSkill
- content-distributeSkill
- copy-craftSkill
- data-decideSkill
- finance-opsSkill
- growth-trackSkill
- infra-opsSkill
- issue-createSkill
- legal-guardSkill
- post-mergeSkill
- pre-commitSkill
- pre-prSkill
- product-evalSkill
- project-initSkill
- retroSkill
- roadmap-steerSkill
- sales-closeSkill
- search-evalSkill
- self-reviewSkill
- sopSkill
- staging-verifySkill
- support-opsSkill
- test-gateSkill
- ux-auditSkill
- work-breakdownSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
22 rules. About 0 are common, 15 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈15
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Run this checklist BEFORE writing any implementation code.
- Very specific: line 21
Run gh issue list --state open and confirm a matching issue exists.
- Distinctive: line 22
If NO issue exists: STOP. Create one first using the issue-create skill.
- Very specific: line 28
If the issue is for a new product or major feature: was biz-think or biz-validate run?
- Distinctive: line 29
If you're about to spend days coding: step back and ask "is this the highest-value use of time right now?"
- Distinctive: line 35
Run git branch --show-current to check.
- Very specific: line 37
If on main: STOP. Never branch from main.
- Very specific: line 38
If on dev: STOP. Do not commit directly to dev.
- Very specific: line 43
If on an incorrectly named branch: rename it to follow the <type>/<short-name> convention.
- Very specific: line 48
Run git log --oneline @{u}..
- Distinctive: line 49
If the branch has no upstream: push immediately:
- Distinctive: line 53
Every subsequent commit must also be pushed right after creation.
- Distinctive: line 58
Read the linked GitHub issue body.
- Distinctive: line 59
If criteria are vague or missing: STOP.
- Distinctive: line 60
If the issue lacks technical notes on approach: confirm the intended approach with the user for non-trivial changes.
- Very specific: line 64
If the issue body contains a ## Commit Plan or ## Test Plan section (added by the work-breakdown skill):
- Distinctive: line 71
Before starting implementation, identify the boundaries of this issue:
- Distinctive: line 85
Simple control flow (NASA Rule 1): Avoid deep nesting, no goto, minimize recursion.
- Distinctive: line 94
Unit tests: always required. Identify what logic needs unit tests.
- Distinctive: line 97
Technical feasibility: if the feature depends on third-party APIs, verify the API works BEFORE writing code.
- Distinctive: line 110
No issue exists → "Run issue-create first"
- Distinctive: line 111
All clear → "Proceed with implementation"
≈ “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
Pre-Code Readiness Gate
Run this checklist BEFORE writing any implementation code. Every item must pass. If any item fails, STOP and resolve it before proceeding.
0. Skill Invocation Check
- Was this skill loaded via the
Skill("pre-code")tool call, not just mentioned in text? - If resuming from a previous session: have you re-evaluated the Skill Gate fresh? Previous invocations do not carry over.
- If taking over from a failed sub-agent: you must still complete this full checklist. Changing executor does not bypass process.
1. Issue Check
- A GitHub issue exists for this work.
- Run
gh issue list --state openand confirm a matching issue exists. - If NO issue exists: STOP. Create one first using the issue-create skill. Do not write code without a tracking issue.
- Note the issue number for branch naming and PR linking.
1.5 Think Before Build
- Has the core question "should this exist?" been answered BEFORE starting to code?
- If the issue is for a new product or major feature: was
biz-thinkorbiz-validaterun? If not, STOP. Don't build something whose existence hasn't been validated. - If you're about to spend days coding: step back and ask "is this the highest-value use of time right now?"
- Building is expensive. Validating is cheap. Always validate first.
2. Branch Check
- The current branch is a feature branch created from
dev. - Run
git branch --show-currentto check. - Valid branch prefixes:
feat/,fix/,chore/,refactor/,test/,docs/ - If on
main: STOP. Never branch from main. Switch todevfirst, then create a feature branch. - If on
dev: STOP. Do not commit directly todev. Create a feature branch:git checkout dev && git pull origin dev git checkout -b <type>/<short-name> - If on an incorrectly named branch: rename it to follow the
<type>/<short-name>convention.
3. Branch Pushed
- The branch has been pushed to the remote.
- Run
git log --oneline @{u}.. 2>/dev/nullto check tracking status. - If the branch has no upstream: push immediately:
git push -u origin <branch-name> - Every subsequent commit must also be pushed right after creation. Never accumulate unpushed commits.
4. Requirements Clear
- Acceptance criteria are understood and unambiguous.
- Read the linked GitHub issue body. Check for acceptance criteria checkboxes.
- If criteria are vague or missing: STOP. Ask the user to clarify before writing code. Do not guess at requirements.
- If the issue lacks technical notes on approach: confirm the intended approach with the user for non-trivial changes.
Upstream Plan Check (if from work-breakdown)
If the issue body contains a ## Commit Plan or ## Test Plan section (added by the work-breakdown skill):
- Read the planned commits — these are your implementation roadmap. Each planned commit = one focused coding session.
- Read the planned test types — cross-reference with Section 6 below. The test plan here should match or refine what work-breakdown decided.
- If the plan no longer makes sense after reading the code: update the issue body with the revised plan BEFORE starting implementation. Do not silently diverge.
Scope Boundaries
Before starting implementation, identify the boundaries of this issue:
- List the files that SHOULD be modified for this issue (from Technical Notes or Commit Plan).
- During implementation, do NOT modify files outside this list unless strictly necessary. If you must touch an out-of-scope file, note it and justify it.
- During debugging, resist the urge to "fix" unrelated code you happen to see. Create a separate issue for it instead.
- Platform configuration in scope? If this issue involves auth, payments, webhooks, or any third-party integration:
- List the platform settings that need configuration (OAuth redirect URLs, webhook endpoints, API keys, environment variables)
- These are NOT "deployment details for later" — they are part of the feature scope
- Include platform config steps in the Commit Plan or Technical Notes
- A feature that works in code but fails because of missing platform config is NOT done
5. Design Considerations (SOLID + Clean Code + NASA)
- Design principles have been reviewed for this change.
- Dependency Inversion (SOLID-D): High-level modules depend on abstractions, not concrete implementations. Inject dependencies; never instantiate collaborators directly inside business logic.
- Simple control flow (NASA Rule 1): Avoid deep nesting, no goto, minimize recursion. Every function should be readable top-to-bottom with obvious flow.
- No dynamic memory after init (NASA Rule 3): Allocate resources (connections, buffers, pools) at startup. Avoid runtime allocation in hot paths — prefer pre-allocated structures.
- Single Responsibility (SOLID-S): Each module/class has ONE reason to change. If a module serves two masters, split it.
- Threat model during design (OWASP A04): For security-sensitive features, identify threat vectors before coding. Consider: auth bypass, injection, data exposure, privilege escalation.
- Input validation at system boundaries: Identify where untrusted data enters the system. Validate and sanitize at those boundaries, not deep inside business logic.
6. Test Plan
- A test plan has been identified for this work.
- Unit tests: always required. Identify what logic needs unit tests.
- Integration tests: required if the code touches any external service (database, API, auth, storage). If API keys or env vars are needed, ask the user NOW — not after implementation.
- E2E tests: required if the change completes a user-facing flow. Confirm Playwright is set up.
- Technical feasibility: if the feature depends on third-party APIs, verify the API works BEFORE writing code. Run a proof-of-concept call. Check rate limits, TOS, platform restrictions. Do not design around an unverified API.
- Tests go in the SAME branch and PR as the implementation. Never defer testing to a separate issue.
All Clear
Once every box is checked, proceed with implementation. Reference the issue number in commits using Conventional Commits format: <type>: <description> (#issue)
Next Steps
Report to user: "Pre-code ✅. Issue #[N], branch [name], scope: [N files]. Ready to implement."
Suggested next steps (user decides):
- No issue exists → "Run issue-create first"
- All clear → "Proceed with implementation"
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
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.

