claude-md-creator
Skill146 starsChanged 7 months agoMITView on GitHub
Creates minimal, high-signal CLAUDE.md and AGENTS.md context files based on empirical best practices. Invoke on /init command, "create CLAUDE.md", "update CLAUDE.md", "write AGENTS.md", or "set up Claude Code for this project". Also invoked by brainstorming when repo lacks a context file. tools: Read, Glob, Grep, Bash, Edit
In this repository23 other files it gives its agents.
- brainstormingSkill
- context-managementSkill
- deliberationSkill
- dependency-managementSkill
- dispatching-parallel-agentsSkill
- error-recoverySkill
- executing-plansSkill
- finishing-a-development-branchSkill
- frontend-designSkill
- performance-investigationSkill
- premise-checkSkill
- receiving-code-reviewSkill
- refactoringSkill
- requesting-code-reviewSkill
- self-consistency-reasonerSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- token-efficiencySkill
- using-git-worktreesSkill
- using-superpowersSkill
- verification-before-completionSkill
- writing-plansSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 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.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 54
Only patterns unique to this project that differ from standard practice.
- Distinctive: line 70
Don't restate what's already in README, docs/, wiki, or inline comments.
≈ “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
CLAUDE / AGENTS Context File Creator
Creates repository-level context files (CLAUDE.md, AGENTS.md) that give coding agents the minimum guidance needed to work correctly in a repo.
Core principle: Only include what the agent cannot easily discover itself.
Empirical research (Gloaguen et al., "Evaluating AGENTS.md", v3 2026) found that context files did not significantly change task success — LLM-generated ones −0.5% to −2%, developer-written ones +2.4% — while raising cost 20–23%, because agents follow what the file says. Developer-written files did significantly beat LLM-generated ones, which mostly restated existing docs. Every line is an instruction the agent will act on: it costs steps whether or not it helps.
Trigger Conditions
Invoke this skill when any of the following occur:
- The
/initcommand is run - The user asks to create, write, or update a
CLAUDE.mdorAGENTS.md - The user mentions "agent context", "initialize project", "set up Claude Code"
- A repo is missing a
CLAUDE.mdand the user begins a new project setup - During
brainstormingorwriting-planswhen the repo lacks a context file
What to Include (highest to lowest priority)
1. Non-standard build, test, and lint commands
Agents use a tool almost only when the file names it (uv: 1.6 uses per task when mentioned, under 0.01 otherwise), so naming the project's non-default tooling reliably changes what they run. That is compliance, not proof of benefit: in the same study, testing instructions raised cost without improving success. Include a command only when the agent would otherwise run the wrong one. Spell those out exactly:
npm run test -- --watch
uv run pytest tests/ -x
make lint && make typecheck2. Non-obvious environment setup
Env vars, required services, secrets handling, database setup — things the agent would get wrong without being told.
3. Critical constraints (things that cause wrong behavior if violated)
Focus narrowly on constraints where violating them breaks something:
- "Never edit files in
generated/— they're overwritten by codegen" - "Always run migrations through the ORM, never raw SQL"
- "The
legacy/module uses CommonJS — no ES imports"
4. Repo-specific patterns and anti-patterns
Only patterns unique to this project that differ from standard practice. If it's what any experienced developer would do by default, leave it out.
What to Exclude
These categories were measured to give no benefit (or only cost) in the study, or follow directly from its findings:
Repository overviews and project descriptions
Nearly every LLM-generated context file included one (100% for Sonnet 4.5, 95–99% for two other models), yet overviews did not meaningfully reduce the steps agents took before reaching the relevant files. The agent explores the repo anyway — an overview just adds tokens without saving any work.
Directory trees and file structure listings
Same finding: detailed directory structures don't help agents locate relevant files. They navigate codebases by searching, not by reading maps.
Architecture summaries and design explanations
Broad architecture descriptions don't help agents solve tasks. If there's an architectural constraint that would cause incorrect behavior (e.g., "this is a monorepo — changes to packages/core require rebuilding all dependents"), include the constraint. Skip the explanation of how the architecture works.
Content that duplicates existing documentation
Don't restate what's already in README, docs/, wiki, or inline comments. Duplication is why LLM-generated files didn't help: when researchers removed the repos' documentation, the same files improved performance by 2.7%. With the docs present, they only added cost.
Generic best practices
"Write tests", "follow SOLID principles", "use meaningful variable names" — agents already know these. Only include project-specific deviations from standard practice.
Over-constraining requirements
Unnecessary requirements make tasks harder. Every rule you add has a cost — the agent spends reasoning tokens processing it and may over-apply it. Include a constraint only if violating it would cause a real problem in this specific repo.
Process
- Scan the repo — read key config files (
package.json,tsconfig.json,Makefile, CI configs, etc.) and source structure. - Identify gaps — what would an agent get wrong without explicit guidance? Focus on commands, env setup, and constraints that cause breakage.
- Ask minimal questions — only ask about things that can't be inferred from the repo.
- Draft a short, high-signal context file — aim for under ~50 lines. Every line should pass the test: "would the agent produce incorrect output without this?"
- Self-assess before presenting — before showing the draft, apply the filter to every line yourself: "Is this discoverable by reading the code, types, or inline comments?" If yes, cut it. If unsure, cut it. Only surface lines that would cause incorrect agent behavior if absent. Do not ask the user to identify redundant items — that is your job.
- Present the draft for human review — LLM-generated context files without human review consistently underperform. Walk the user through what you kept and briefly state why each section survives the filter (one phrase per section is enough). Ask only questions the codebase cannot answer — e.g., undocumented team conventions, production-only gotchas, or decisions made outside the repo.
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.

