repairing-project-setup
Skill11 starsChanged 7 days agoMITView on GitHub
Use when a repo's agent setup may be broken, half-finished, or drifted - a setting-up-a-project run failed partway, CLAUDE.md or AGENTS.md is thin or missing sections, leftover {{PLACEHOLDER}} text, AGENTS.md is a symlink, the instruction files disagree, or agents behave inconsistently in the repo - audits the project against what setting-up-a-project would generate today and repairs only the gaps, preserving existing content
In this repository31 other files it gives its agents.
- architecture-diagrammingSkill
- at-risk-detectionSkill
- build-faq-from-issuesSkill
- context-aware-questionsSkill
- daily-planning-ritualSkill
- dependency-mappingSkill
- estimating-change-footprintSkill
- estimating-work-itemsSkill
- idea-to-designSkill
- issue-decompositionSkill
- markdown-formattingSkill
- mermaid-diagramsSkill
- prepare-meeting-agendaSkill
- project-analysisSkill
- project-planningSkill
- requirement-elicitationSkill
- research-topic-summarizeSkill
- setting-up-a-projectSkill
- sgai-goalSkill
- stakeholder-trackingSkill
- stakeholder-updatesSkill
- summarize-conversation-threadSkill
- supervising-conductor-workspacesSkill
- supervising-paradev-workspacesSkill
- timeline-planningSkill
- triage-new-issuesSkill
- working-on-an-epicSkill
- working-on-an-issueSkill
- writing-product-specsSkill
- writing-user-storiesSkill
- writing-verification-plansSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
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
- Very specific: line 25
A deliberate, different scheme: if the repo has mature agent instructions that clearly never followed setting-up-a-project, do not convert …
- Distinctive: line 41
Run every check and record PASS / FAIL / N-A.
- Very specific: line 65
Merge, never overwrite: Read every file before editing it.
≈ “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
Repairing Project Setup
Overview
The setting-up-a-project skill defines what a correctly configured project looks like. This skill checks a real repo against that target state and repairs the delta.
Core principle: repair the delta, never rebuild. The existing files record decisions the user already made. Your job is to bring them in line with what setting-up-a-project would generate, keeping every decision already recorded.
When to Use
- A
setting-up-a-projectrun failed or was interrupted partway CLAUDE.mdorAGENTS.mdexists but is thin, stale, or missing sections- Symptoms of a broken setup: unfilled
{{PLACEHOLDER}}text, anAGENTS.mdsymlink, anAGENT.md(singular), documented commands that fail, the two instruction files disagreeing, agents behaving inconsistently in the repo setting-up-a-projecthas changed since this project was set up, and the project should catch up- As a pre-flight check before starting work (e.g. the
working-on-an-issuechecklist)
When NOT to Use
- Never set up at all (no
CLAUDE.md, noAGENTS.md, no rule files): runsetting-up-a-projectitself - the interview matters and there is nothing to preserve. - A deliberate, different scheme: if the repo has mature agent instructions that clearly never followed
setting-up-a-project, do not convert it uninvited. Report the differences and ask.
The Process
1. Load the Spec
Read the current setting-up-a-project SKILL.md - via the Skill tool, or from the installed plugin's skill directory. It is the source of truth. The audit table below is a fast index of its requirements; if the two ever disagree, the skill file wins - it evolves, this table can lag.
The canonical rule files sit next to that SKILL.md: TDD.rules.md, git-commit-rules.md, CLAUDE-specific-fuckups.md. If you cannot find them locally, fetch:
https://raw.githubusercontent.com/britt/britts-agent-skills/refs/heads/main/rules/TDD.rules.mdhttps://raw.githubusercontent.com/britt/britts-agent-skills/refs/heads/main/rules/CLAUDE-specific-fuckups.mdhttps://raw.githubusercontent.com/britt/britts-agent-skills/refs/heads/main/skills/setting-up-a-project/git-commit-rules.md
2. Audit - Before Touching Anything
Run every check and record PASS / FAIL / N-A. Do not start fixing mid-audit; a full picture first prevents piecemeal edits that miss cross-file drift.
| # | Check | How | ||
| 1 | CLAUDE.md exists with the sections from the skill's "Finished Files" list (Overview, Tech Stack, Commands, Development Practices; Layout / Environment / Boundaries / CI-CD as applicable) | read headings | ||
| 2 | AGENTS.md exists and is a real file | test -L AGENTS.md && echo "symlink - defect" | ||
| 3 | No AGENT.md (singular) - no agent reads it | ls AGENT.md fails | ||
| 4 | AGENTS.md has Required Reading, Non-Negotiables, and Maintaining This File sections | read headings | ||
| 5 | AGENTS.md carries no Claude Code-isms | `grep -nE '@[[:alnum:]] | TodoWrite | .claude/' AGENTS.md` returns nothing |
| 6 | No unfilled placeholders anywhere | grep -Fn '{{' CLAUDE.md AGENTS.md TDD.rules.md returns nothing | ||
| 7 | TDD.rules.md at project root, template banner removed, structurally matching the canonical template | diff against canonical; only placeholder values and the banner should differ | ||
| 8 | CLAUDE.md points at TDD.rules.md in prose and via @TDD.rules.md | grep | ||
| 9 | Commit rules present verbatim in both CLAUDE.md and AGENTS.md | compare against canonical git-commit-rules.md | ||
| 10 | CLAUDE-specific-fuckups.md at root, byte-identical to canonical, referenced from CLAUDE.md and not from AGENTS.md | diff + grep | ||
| 11 | VERIFICATION_PLAN.md exists; CLAUDE.md has a Verification section with @VERIFICATION_PLAN.md; it appears in AGENTS.md Required Reading | grep | ||
| 12 | Every command in the Commands table actually runs | run each one | ||
| 13 | CLAUDE.md and AGENTS.md agree on commands, stack, layout, and boundaries | read both, side by side | ||
| 14 | CI/CD Practices section present iff the repo uses GitHub Actions | ls .github/workflows/ | ||
| 15 | .claude/settings.json command allowlist | note only - optional, consent required |
3. Repair
Fix only the FAIL rows, under these rules:
- Merge, never overwrite. Read every file before editing it. Keep the user's wording; add only missing sections; correct only what is wrong. If
CLAUDE.mdsays somethingsetting-up-a-projectwould not have written but it is a project fact, it stays. - Verbatim files stay verbatim. Repair
TDD.rules.md, the commit rules, andCLAUDE-specific-fuckups.mdby copying from the canonical source and filling placeholders - nothing else. If the project has no linter or build step, fill that placeholder with an honest value (echo "no linter configured - update this line when one is added"), do not delete the rule sections that mention it. - Evidence over interview. Fill gaps from the repo itself: manifests, lockfiles, CI workflows, git history, the existing files. Interactive session: confirm conclusions, one question at a time, only for what the repo cannot answer. Autonomous session: apply the defaults
setting-up-a-projectdocuments (e.g. 90%/85% coverage) and record every assumption for the final report. - A documented command that fails is always a FAIL - fix the command (add the missing script) or fix the docs (remove the phantom row), whichever matches what the project actually has. Never leave it.
VERIFICATION_PLAN.mdis not optional. Missing means write it, with thewriting-verification-plansskill if available. A young project gets scenarios scoped to what exists today - not a skipped file..claude/settings.jsonneeds consent. Offer it if missing; in an autonomous session, recommend it in the report instead of writing it.- Commit after each repaired area, per the commit rules.
4. Verify, Then Report
Re-run the entire audit table - every row must now be PASS or N-A, including the ones that passed before your edits (a repair can break a neighbor). Then run setting-up-a-project's own final verification step (its step 9).
Report: each check as before → action → after, plus every assumption made. If the audit was clean at step 2, say so and change nothing - a clean audit is a valid result.
Rationalizations - All Wrong
| Excuse | Reality |
| "The project is too young for honest verification scenarios" | writing-verification-plans handles nascent projects. Scope scenarios to what exists. Skipping leaves AGENTS.md telling agents to read a file that isn't there. |
| "This rule section doesn't apply here, I'll delete it" | Fill the placeholder with an honest value instead. Pruned copies drift from canonical and can never be diffed again. |
| "The existing CLAUDE.md is messy - cleaner to rewrite it" | A rewrite destroys recorded decisions. Merge. |
| "The obvious defects are fixed, that's surely all of them" | Drift lives in the subtle rows: verbatim diffs, cross-file agreement, commands that run. Every row, every time. |
| "I'll just run the full setting-up-a-project interview again" | That interrogates the user about facts the repo and existing files already answer. Audit and repair instead; fall back to the full skill only when nothing exists. |
| "It passed before my edit, no need to re-check" | Repairs break neighbors - a fixed command row can desync AGENTS.md. Re-run the whole table. |
Red Flags - STOP
- About to
Writeover aCLAUDE.mdorAGENTS.mdyou haven't read - Paraphrasing or "improving" a rule file instead of copying it
- Deleting sections from a verbatim file
- Asking the user something a manifest, workflow, or existing file answers
- Declaring done without re-running the audit table
Common Mistakes
- Auditing only
CLAUDE.mdand forgettingAGENTS.mdmust independently agree with it - Treating a symlinked
AGENTS.mdas "close enough" - it ships@imports to agents that read them as dead text - Filling placeholders with plausible commands instead of ones verified against
package.json/ Makefile / CI - Comparing rule files by eye instead of
diffagainst the canonical copy - Fixing files without committing per area, so a later failure loses everything
- Skipping the spec-loading step and auditing against memory of what
setting-up-a-projectused to say
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.

