claude-code-setup
AGENTS.md2 starsChanged 28 days agoMITView on GitHub
You were asked to install, follow or update this setup for your user. This file is written for you. Read it fully before running anything. Human-facing explanations are in README.md and HOW-IT-WORKS.md. No plugins. One settings change: the UserPromptSubmit entry, merged in with python3 without touching other keys or hooks (settings.json is backed up first; if it is not valid JSON, it is left alone and the installer prints the entry to add by hand). Models are never switched by…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- claude/CLAUDE.mdCLAUDE.md
- feature-devSkill
The file
We split this AGENTS.md into the rules it gives an agent
8 rules. About 0 are common, 1 is distinctive, and 7 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.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Ask in one message:
- Very specific: line 22
Existing files: If ~/.claude/skills/feature-dev or an agent with the same name already exists and was not installed by this script, it …
- Very specific: line 25
Check that python3 is on the PATH.
- Very specific: line 37
Add CLAUDE_CONTEXT_WINDOW=1000000 in front if the user has a 1M window, and CLAUDE_RULES_FILE=<project>/CLAUDE.md for a one-project install.
- Very specific: line 60
If the user had edited the installed skill, their edits are in the .bak- copy.
- Very specific: line 73
Do not install anything from docs/extra-skills.md without the user's go-ahead.
- Very specific: line 74
Do not edit ~/.claude/settings.json beyond what the installer does.
- Very specific: line 89
Every chat that finishes or pauses a unit of work ends with a checkpoint: the state file written, the status rolled up to the project's …
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md 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
Instructions for an AI agent installing this setup
You were asked to install, follow or update this setup for your user. This file is written for you. Read it fully before running anything. Human-facing explanations are in README.md and HOW-IT-WORKS.md.
What gets installed
| From | To | What |
skills/feature-dev/ + examples/ | ~/.claude/skills/feature-dev/ | The feature pipeline skill, with the state file templates (feature plan, state file, master plan, decisions) in its examples/. |
agents/*.md | ~/.claude/agents/ | Three helper agents the skill calls: feature-explorer, feature-architect, feature-reviewer. |
claude/CLAUDE.md | appended to ~/.claude/CLAUDE.md | A short rules block between <!-- claude-code-setup:start --> and <!-- claude-code-setup:end -->: deployment safety, when to use /feature-dev, how every chat ends with a checkpoint, which model plans and which builds. |
| (generated) | appended to ~/.claude/CLAUDE.md | A models block between <!-- claude-code-setup:models:start --> and <!-- claude-code-setup:models:end -->: two lines, Planning model: and Building model:. Written once; --update never replaces it. |
scripts/context-hook.py | ~/.claude/scripts/claude-code-setup-context-hook.py + one UserPromptSubmit entry in ~/.claude/settings.json | On every user message prints Context: Nk / <window> (P%) into the model's context (about 15 tokens), so checkpoints can report it. |
No plugins. One settings change: the UserPromptSubmit entry, merged in with python3 without touching other keys or hooks (settings.json is backed up first; if it is not valid JSON, it is left alone and the installer prints the entry to add by hand). Models are never switched by the setup: the agent stops and the user runs /model. scripts/statusline.py is not installed. Everything else in the repository (docs/, memory/) is reading material.
Before you install: ask the user three things
Ask in one message:
- Global or one project. The rules block applies to every project on this machine and makes
/feature-devthe default for anything larger than a micro edit. Global, or only in one project'sCLAUDE.md? For one project, passCLAUDE_RULES_FILE=<project>/CLAUDE.md: the rules block and the models block go there instead. The skill, the agents and the hook are still installed into~/.claude; the hook only adds theContext:line. - Existing files. If
~/.claude/skills/feature-devor an agent with the same name already exists and was not installed by this script, it belongs to the user. Ask before replacing it. The installer never replaces it on its own. - Models. Which model plans (understanding code, questions, choosing an approach) and which builds (code by a ready plan)? Use the names they type after
/model, for exampleopusandsonnet. One model for everything is fine: give the same name twice, and the agent never stops for a switch. Also ask whether their context window is 1M; if yes, passCLAUDE_CONTEXT_WINDOW=1000000.
Check that python3 is on the PATH. Without it everything installs except the context hook, and checkpoints say Context: unknown.
Install
Clone into a place that stays, so updates can git pull there:
git clone https://github.com/maxg-agency/claude-code-setup ~/claude-code-setup
cd ~/claude-code-setup
CLAUDE_PLANNING_MODEL=<planning> CLAUDE_BUILDING_MODEL=<building> sh install.shAdd CLAUDE_CONTEXT_WINDOW=1000000 in front if the user has a 1M window, and CLAUDE_RULES_FILE=<project>/CLAUDE.md for a one-project install. The script never overwrites. Report every skip line to the user. Then ask the user to restart Claude Code; skills, agents and rules load at session start.
Verify
~/.claude/skills/feature-dev/SKILL.mdexists and contains "Phase 0. Scale".~/.claude/agents/contains the threefeature-*.mdfiles.~/.claude/CLAUDE.md(or the project's file) contains each of the four marker lines exactly once as a whole line (grep -cxF '<!-- claude-code-setup:start -->' ~/.claude/CLAUDE.mdprints 1), and the models block has the two names (not<set me>, unless the user skipped question 3).~/.claude/skills/feature-dev/examples/holds the templates.~/.claude/settings.jsonmentionsclaude-code-setup-context-hook.pyexactly once, andecho '{}' | python3 ~/.claude/scripts/claude-code-setup-context-hook.pyexits 0 with no output.- In a new session the skill list shows
feature-dev, the agent list shows the three helpers, and from the second message on the context carries aContext:line.
Update
From the same clone (re-clone if it is gone), with the same CLAUDE_RULES_FILE if one was used:
cd ~/claude-code-setup
git pull
sh install.sh --updateReplaces only what this script installed: the skill (the previous copy is kept as ~/.claude/skills/.feature-dev.bak-<timestamp>), the three agents, the rules block between the markers (CLAUDE.md is backed up first) and the hook script. The models block and anything the user wrote outside the markers stay. An install from before the hook existed gets the models block and the hook added.
If the user had edited the installed skill, their edits are in the .bak- copy. Tell them and offer to carry the edits over.
Uninstall
sh install.sh --uninstallWith CLAUDE_RULES_FILE if one was used at install.
What not to do
- Do not copy
memory/into the user's memory. Those files are the author's own corrections, shown as an example of the format. They would teach the user's agent someone else's preferences. - Do not install anything from
docs/extra-skills.mdwithout the user's go-ahead; those skills come from other authors. - Do not edit
~/.claude/settings.jsonbeyond what the installer does. If it refused because the file is not valid JSON, show the user the printed entry; do not repair their file without asking.
If the user asks why it works this way
Answer from these facts; they are the author's reasons.
- Why a full plan and full context before building. Long chats fill the context window. Each turn then re-sends the whole history, which costs more tokens, and the model's quality drops: it loses early decisions, confuses file versions, follows recent noise over the plan. The author therefore often finishes planning, opens a new chat and runs
/feature-dev resume <path>.PLAN.mdandblueprints/are written so the new chat needs nothing from the old one. - Why not automatic compaction. A compaction summary drops exact paths, the user's verbatim answers and the reasons options were rejected. The plan file keeps them on purpose.
- Why fewer agents on small tasks. Helper agents are the main token cost: each re-reads the code and writes a long report. On medium features, extra architects mostly added small borrowings, not different designs. The full set still runs on large tasks.
- If quality matters more than tokens. Say "full run" to force the large path, or install Anthropic's original
feature-devplugin and use/feature-dev:feature-dev.
How the user works afterwards
/feature-dev <request>in any project. The skill announces the task size in one line and continues.- Small tasks are planned in a few lines and built right away, on whatever model the chat is on. Medium and large ones show the approach, wait for the user's pick, and on the planning model stop with "I have reached the point where we need to switch to
<model>…". The user runs/model <model>and says "continue", or opens a new chat with/feature-dev resume <path>. Switching is manual by design. - Every chat that finishes or pauses a unit of work ends with a checkpoint: the state file written, the status rolled up to the project's
MASTER-PLAN.md, a proposed commit message, and theContext:number as the last line. /feature-dev resume <path to PLAN.md>, or "continue", picks a feature up in a later session.- Plans go to
<project>/.claude/feature-dev/<slug>/. Suggest adding.claude/feature-dev/to the project's.gitignoreif the user does not want plans in git.
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.

