/britts-agent-skills:setting-up-a-projectfrom Britt's Agent Skills
Surveys a repository and interviews the user to author CLAUDE.md and AGENTS.md instruction files covering project purpose, tech stack, commands, TDD rules, and development practices for coding agents.
Ships in Britt's Agent Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Author the instruction files that define a project's purpose, commands, and development practices before writing code: CLAUDE.md for Claude Code, AGENTS.md for Codex CLI, OpenCode, and Cursor, plus the rule files both of them lean on.
Core principle: A well-configured project prevents rework and ensures consistency. Establishing guardrails upfront helps Claude Code work reliably, produce high-quality code, and avoid doom loops where code is written, broken, and rewritten repeatedly.
When NOT to use: an established repo that already has a mature CLAUDE.md - review and refine the existing file instead.
Track each numbered step below as a todo (TodoWrite in Claude Code, your plan or todo tool elsewhere).
Commit after each section the user confirms - one commit per section, throughout every step below.
Read what the repo already says about itself before asking anything. Never ask a question the files answer.
ls -a # layout, and whether CLAUDE.md / AGENTS.md / .claude/ exist
cat README.md 2>/dev/null
Detect the stack from manifests and lockfiles:
| Evidence | What it tells you |
|---|---|
package.json + pnpm-lock.yaml / package-lock.json / yarn.lock / bun.lockb | Language, package manager, scripts, test and lint tooling |
pyproject.toml / uv.lock / requirements.txt | Python packaging and tool config |
go.mod | Go module path and version |
Cargo.toml | Rust crate and workspace layout |
Makefile / Taskfile.yml / justfile | The commands people actually run |
.github/workflows/*.yml | The commands CI actually runs - the most reliable source |
Dockerfile / fly.toml / wrangler.jsonc / serverless.yml | Deployment target |
Then confirm rather than interrogate: "This looks like a TypeScript CLI on pnpm with Vitest and ESLint - right?" Ask only about what the repo cannot tell you.
Handle what you find:
Also ask which agents will work in this repo (Claude Code, Codex CLI, OpenCode, Cursor). Step 7 writes AGENTS.md for the latter three; write it by default unless the user says Claude Code is the only agent that will ever touch the project.
Ask questions to determine:
Document the answers in CLAUDE.md under a ## Project Overview section:
## Project Overview
**Pantry Pal**: A CLI tool that suggests weeknight dinner recipes from ingredients already in the user's pantry.
### Problem
Home cooks waste food and time deciding what to make. Existing recipe apps assume a shopping trip rather than working with what is already on hand.
### Approach
A local ingredient inventory is matched against a recipe index. The tool ranks recipes by pantry coverage and prints the top matches along with a shopping list for any missing ingredients.
Ask about each area the survey did not already answer. Suggest defaults based on the language and runtime.
Defaults by language:
| Language | Package Manager | Testing | Linting | Build |
|---|---|---|---|---|
| TypeScript/Node.js | pnpm | Vitest | ESLint + Prettier | esbuild or tsc |
| Python | uv | pytest | Ruff | - |
| Go | go modules | go test | golangci-lint | go build |
| Rust | cargo | cargo test | clippy | cargo build |
Adjust suggestions based on deployment target and project needs. Document the result under ## Tech Stack:
## Tech Stack
- **Language**: [Language and version]
- **Runtime**: [Runtime environment]
- **Package Manager**: [Package manager]
- **Testing**: [Testing framework]
- **Linting**: [Linter and formatter]
- **Build**: [Build tool]
- **Key Libraries**: [List of essential libraries]
The Commands section is the most-used part of a CLAUDE.md - Claude reads it before every test run, build, and lint. Get exact, runnable strings, copied verbatim from package.json scripts, the Makefile, or the CI workflow when those exist.
## Commands
| Task | Command |
|------|---------|
| Install | `pnpm install` |
| Test (once) | `pnpm test` |
| Test (watch) | `pnpm test --watch` |
| Coverage | `pnpm test --coverage` |
| Build | `pnpm build` |
| Lint | `pnpm lint` |
| Format | `pnpm format` |
| Typecheck | `pnpm typecheck` |
| Run locally | `pnpm dev` |
Omit rows that do not apply. These values fill the placeholders in TDD.rules.md (step 5) and the permission allowlist (step 7), so get them right here.
TDD is non-negotiable for all projects set up with this skill.
Confirm the coverage thresholds with the user. Defaults: 90% lines, functions, and statements; 85% branches. Record whatever they choose.
Ask how test files are named and located in this stack (for example src/example.ts → src/__tests__/example.test.ts, or Go's example_test.go beside the source).
Copy the bundled TDD.rules.md (in this skill's directory) to the project root as TDD.rules.md. Do not paste it into CLAUDE.md - it is over 200 lines, and CLAUDE.md loads into every session.
Replace every {{PLACEHOLDER}} in the copy:
| Placeholder | Value |
|---|---|
{{TEST_COMMAND}} | Test (once), from step 4 |
{{TEST_WATCH_COMMAND}} | Test (watch), from step 4 |
{{COVERAGE_COMMAND}} | Coverage, from step 4 |
{{BUILD_COMMAND}} | Build, from step 4 |
{{LINT_COMMAND}} | Lint, from step 4 |
{{COVERAGE_THRESHOLD}} | Lines/functions/statements threshold |
{{BRANCH_COVERAGE_THRESHOLD}} | Branch threshold |
{{TEST_FILE_CONVENTION}} | The naming and location rule, with two or three concrete examples |
Reference it from CLAUDE.md under ## Development Practices:
### Test-Driven Development
TDD is mandatory. **Read `TDD.rules.md` before writing any code.**
@TDD.rules.md
The @ line is a Claude Code auto-import. The sentence above it is what makes the rules reachable in every other agent, which read the file as plain text - never rely on @ alone.
If the bundled file is missing, fall back to fetching https://raw.githubusercontent.com/britt/agent-skills/refs/heads/main/rules/TDD.rules.md.
Verify no placeholder survives: grep -n '{{' TDD.rules.md must return nothing.
This rule is non-negotiable. Read the bundled git-commit-rules.md file (in this skill's directory) and copy it verbatim into CLAUDE.md, and into AGENTS.md in step 7. It is short, and it is the single home for commit discipline - TDD.rules.md points here rather than restating it.
Copy the bundled CLAUDE-specific-fuckups.md (in this skill's directory) to the project root verbatim - it has no placeholders to fill in.
Reference it from CLAUDE.md under ## Development Practices:
### Known Failure Patterns
Claude Code repeats certain mistakes because its training data lags the tools it uses. **Read `CLAUDE-specific-fuckups.md` before work that touches any of its entries.**
@CLAUDE-specific-fuckups.md
This file is Claude Code-specific - do not reference it from AGENTS.md. The other agents don't share Claude's training data, so the entries would be dead text there.
If the bundled file is missing, fall back to fetching https://raw.githubusercontent.com/britt/agent-skills/refs/heads/main/rules/CLAUDE-specific-fuckups.md.
Ask about each, and offer the default:
feature/, fix/, chore/)Document the answers under ## Development Practices.
If the project uses, or will use, GitHub Actions for CI/CD, apply this rule whenever authoring or editing workflow files:
Never use an action pinned to the deprecated Node 20 runtime. GitHub Actions is moving off Node 20 in favor of Node 24. When adding or updating a uses: step, always pick the action's latest major version rather than an older major still pinned to Node 20, and check the action's release notes/changelog if unsure whether it has moved to the Node 24 runtime.
Document this rule in CLAUDE.md under a ## CI/CD Practices section (only if the project uses GitHub Actions):
## CI/CD Practices
- Never use GitHub Actions pinned to the deprecated Node 20 runtime. Always use the latest major version of each action.
Three short sections that save an agent from guessing:
## Repository Layout
- `src/` - application code
- `src/__tests__/` - tests, mirroring `src/`
- `scripts/` - build and release tooling
## Environment
Copy `.env.example` to `.env` and fill in the values. Never commit `.env` or any
credential. Required variables: `DATABASE_URL`, `API_KEY`.
## Boundaries
Do not edit by hand:
- `dist/`, `*.generated.ts` - generated output; change the generator instead
- `pnpm-lock.yaml` - update via the package manager
Ask what is generated, vendored, or otherwise off-limits, and what secrets the project needs. Omit any section that has no content - an empty heading is worse than none.
Claude Code reads CLAUDE.md. Codex CLI, OpenCode, and Cursor read AGENTS.md. Write both.
Do not symlink them together. They describe the same project but they are not the same document: CLAUDE.md leans on auto-imports and Claude Code's tool names, and neither survives the trip to another agent.
How AGENTS.md differs:
| Concern | CLAUDE.md | AGENTS.md |
|---|---|---|
| Deep rule sets | @TDD.rules.md auto-import | A Required Reading list instructing the agent to open the files itself - nothing auto-loads |
| Non-negotiables | Carried by the imported rule files | Condensed inline at the top, so the critical rules are present even if the agent never opens another file |
| Todo tracking | TodoWrite by name | "your plan or todo tool" |
| Permissions | Points at .claude/settings.json | An inline rule: run the Commands table freely, ask before anything else |
| Shape | Terse; imports carry the weight | Flatter and self-contained |
Template:
# <Project Name> - Agent Instructions
Read this file before making any change. It applies to every agent working in this repo.
## Required Reading
These files are not loaded automatically. Open them yourself before writing code:
- `TDD.rules.md` - test-driven development rules. Mandatory, no exceptions.
- `VERIFICATION_PLAN.md` - how to prove a change actually works.
## Non-Negotiables
1. No production code without a failing test first. Full rules in `TDD.rules.md`.
2. Commit after every RED-GREEN-REFACTOR cycle. Never leave 30 minutes of work uncommitted.
3. A task is not done until tests pass, the build succeeds, and the linter is clean.
4. Run the commands in the Commands table freely. Ask first before anything that
installs software, writes outside the repo, or reaches the network.
5. Track multi-step work in your plan or todo tool as you go.
## Project Overview
## Tech Stack
## Commands
## Repository Layout
## Environment
## Development Practices
## CI/CD Practices
## Boundaries
## Maintaining This File
`CLAUDE.md` and `AGENTS.md` describe the same project. When a project fact changes -
a command, the stack, the layout, a boundary - update both in the same commit.
The sections from ## Project Overview down carry the same content as CLAUDE.md, written out in full rather than referenced. Write ## Development Practices inline here: the git and PR workflow from step 5, plus the commit rules, with no @ references anywhere in the file.
If a tool does not pick AGENTS.md up, check that tool's current documentation for its instruction-file path rather than guessing at one.
Offer to create .claude/settings.json with an allowlist for the commands from step 4, so routine work does not trigger a prompt on every run. Offer, do not impose - ask before writing.
{
"permissions": {
"allow": [
"Bash(pnpm test:*)",
"Bash(pnpm lint:*)",
"Bash(pnpm build:*)"
]
}
}
Only list read-only or build/test commands. Never allowlist anything destructive or anything that publishes.
This file is Claude Code-specific. The other three agents configure permissions their own way and their schemas move - do not invent a codex, opencode, or cursor config file. AGENTS.md rule 4 above covers them in prose instead.
Use the writing-verification-plans skill to create a verification plan. If it is unavailable, write VERIFICATION_PLAN.md covering the acceptance scenarios that prove the project works against real systems, with success criteria and a pass/fail log.
Link it from CLAUDE.md:
## Verification
Acceptance testing procedures: read `VERIFICATION_PLAN.md`.
@VERIFICATION_PLAN.md
In AGENTS.md it is already covered by the Required Reading list - no @ line there.
Documentation that does not run is worse than none. Before the final commit:
grep -n '{{' CLAUDE.md AGENTS.md TDD.rules.md must return nothing.AGENTS.md carries no Claude Code-isms: grep -n '@\|TodoWrite\|\.claude/' AGENTS.md should return nothing but ordinary prose. An @TDD.rules.md line that leaked in is dead text in Codex CLI, OpenCode, and Cursor.AGENTS.md is a real file, not a symlink: test -L AGENTS.md && echo "symlink - replace it".elements-of-style:writing-clearly-and-concisely skill if available.superpowers:brainstorming skill (if available) or the superpowers:writing-plans skill (if available) if they say yes.Sections in this order. Omit any that do not apply.
CLAUDE.md (Claude Code)
# <Project Name>
## Project Overview (problem, approach)
## Tech Stack
## Commands
## Repository Layout
## Environment
## Development Practices (TDD → read + @TDD.rules.md, commit rules, git/PR workflow)
## CI/CD Practices (only if GitHub Actions)
## Boundaries
## Verification (read + @VERIFICATION_PLAN.md)
AGENTS.md (Codex CLI, OpenCode, Cursor)
# <Project Name> - Agent Instructions
## Required Reading (TDD.rules.md, VERIFICATION_PLAN.md - no @ imports)
## Non-Negotiables (condensed inline; nothing auto-loads here)
## Project Overview ┐
## Tech Stack │
## Commands │ same content as CLAUDE.md,
## Repository Layout │ written out in full
## Environment │
## Development Practices │ (inline, not referenced)
## CI/CD Practices │
## Boundaries ┘
## Maintaining This File (change one, change both, same commit)
Alongside them: TDD.rules.md, CLAUDE-specific-fuckups.md, VERIFICATION_PLAN.md, and optionally .claude/settings.json.
AGENTS.md to CLAUDE.md - it ships Claude Code's @ imports and tool names to agents that understand neither@ reference in AGENTS.md, where it is dead textAGENT.md instead of AGENTS.md - no agent reads the singular{{TEST_COMMAND}} and friends unreplaced in the project's TDD.rules.mdTDD.rules.mdWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub britt/agent-skills --plugin britts-agent-skills32 skills in this plugin
/architecture-diagrammingUse when the user asks for an architecture diagram, says 'show me the system architecture' or 'diagram the components', or during project planning - generates GitHub-compatible Mermaid flowcharts showing components, layers, subgraph boundaries, and data flows/at-risk-detectionUse when asked about project health, stale or blocked issues, deadline risk, or scope creep - scans GitHub issues and PRs with heuristics (staleness, blocked labels, milestone dates, size, unassigned high-priority) and produces a severity-ranked at-risk report/build-faq-from-issuesUse when building or updating an FAQ from closed GitHub issues, documenting recurring support questions, or reducing repeat questions - extracts common questions from resolved issues and generates a categorized FAQ document with synthesized answers and source links/context-aware-questionsUse when asked 'what am I missing?', reviewing an issue or draft before submission, or checking documentation completeness - detects requirement, spec, and doc gaps and generates prioritized actionable questions/daily-planning-ritualUse when the user asks to plan their day with phrases like "plan the day", "plan my day", "plan today", or similar variations, or wants a morning check-in on how to spend the day across work and the rest of their life./dependency-mappingUse when asked to map issue dependencies, show what blocks what, or find the critical path through project work - reads GitHub issues for blocked-by/depends-on signals and generates Mermaid flowcharts of blocking chains2 plugins in one repository ship this exact skill · first indexed Sep 1, 2026
Other plugins' skills for the same job