| name | claude-md-starter |
| description | Generates a fully structured, project-specific CLAUDE.md by scanning the repo for signal files (package.json, Makefile, .github/workflows/, .env.example, etc.), inferring stack, commands, architecture, and conventions, then asking at most 3 targeted questions for what cannot be inferred. Use whenever the user says 'create a CLAUDE.md', 'my CLAUDE.md is blank', 'generate project context', 'initialize CLAUDE.md', 'set up Claude context for this repo', 'fill in my CLAUDE.md', or any variation where someone needs their project context documented for Claude. If a CLAUDE.md already exists with content, runs a diff-and-merge flow before writing. |
| user-invokable | true |
| argument-hint | |
| metadata | {"category":"utility","version":"1.0.0"} |
Claude.md Starter โ Project Context Generator
Scans the repo, infers the tech stack and conventions, asks at most 3 targeted questions, and writes a populated CLAUDE.md that gives Claude full project context from session one.
Invocation Triggers
Explicit:
- "create a CLAUDE.md"
- "my CLAUDE.md is blank"
- "generate project context"
- "initialize CLAUDE.md"
- "set up Claude context for this repo"
- "fill in my CLAUDE.md"
- "run the claude-md-starter skill"
Implicit:
- User pastes a near-empty CLAUDE.md and asks Claude to populate it
- User keeps re-explaining the same project context at the start of sessions
Run immediately when triggered โ no upfront questions before scanning.
Workflow (6 Nodes)
| Node | Role |
|---|
| 1 โ Detect | Check if CLAUDE.md exists and measure content length |
| 2 โ Scan | Read signal files from the project root (see references/scan-signals.md) |
| 3 โ Infer | Draft all sections that can be derived from scanned signals |
| 4 โ Grill-me | Ask at most 3 questions for what cannot be inferred |
| 5 โ Generate | Write the full CLAUDE.md using the template in references/claude-md-template.md |
| 6 โ Validate | Confirm required sections are present and non-placeholder |
Node 1 โ Detect
Check for CLAUDE.md at the project root.
If not found: Proceed directly to Node 2.
If found and has โค 200 characters: Treat as blank โ proceed to Node 2.
If found and has > 200 characters: Run the diff-and-merge flow before writing:
-
Read the existing file
-
Complete Nodes 2โ4 to produce the generated version
-
Compare section by section โ for each of the 8 required sections, classify as:
- NEW โ exists in generated, absent or empty in existing
- ENHANCED โ both versions have content; generated version adds more
- SAME โ both versions have equivalent content
- CONFLICT โ both versions have different non-empty content
-
Present a diff summary table:
Section | Existing | Generated | Action
---------------------|----------|-----------|-------
Project Overview | present | enhanced | +additions available
Tech Stack | absent | new | will add
Commands | present | enhanced | +2 commands found
Architecture | absent | new | will add
Code Conventions | present | same | no change
Testing | absent | new | will add
What NOT To Do | absent | new | will add
Environment Setup | absent | new | will add
-
Offer three options:
- A (Recommended) โ Keep existing content + add new and enhanced sections only (safe, additive)
- B โ Full replace with generated version
- C โ Review each conflicting section individually before writing
-
Write the chosen merge result.
Node 2 โ Scan
Read signal files using the catalog in references/scan-signals.md. For each file found, extract the fields it reveals. Missing files are skipped silently.
Run all reads in parallel where possible:
package.json โ framework, scripts, package manager, dependencies
pyproject.toml / requirements.txt / setup.py โ Python stack
Cargo.toml / go.mod / pom.xml / build.gradle โ language
Makefile / justfile โ named commands
.github/workflows/*.yml โ CI/CD steps, deploy targets
Dockerfile / docker-compose.yml โ runtime environment, services
.eslintrc.* / .prettierrc.* / eslint.config.* โ JS/TS code style
ruff.toml / .flake8 / mypy.ini โ Python lint/type config
jest.config.* / vitest.config.* / pytest.ini / conftest.py โ test framework
tsconfig.json โ TypeScript settings
.env.example / .env.sample โ required environment variables
README.md (first 40 lines only) โ project description
- Top-level directory listing โ architecture pattern
.gitignore โ build artifacts and generated files
Node 3 โ Infer
Using scanned data, populate as many sections as possible before asking questions:
- Project Overview โ from README.md first paragraph; fall back to
package.json description field
- Tech Stack โ from language files + framework dependencies
- Commands โ from
package.json scripts, Makefile targets, workflow run steps
- Architecture โ from top-level directory structure
- Code Conventions โ from eslint/prettier/ruff config values
- Testing โ from test config files and test directory location
- What NOT To Do โ from
.gitignore build outputs, workflow branch protection, lock files
- Environment Setup โ from
.env.example variable names and docker-compose services
Node 4 โ Grill-Me Intake
Ask only for what cannot be inferred. Maximum 3 questions. Skip any question whose answer is already clear from scanned files.
Present all applicable questions together in one message โ never ask them across multiple turns:
Quick questions to finish your CLAUDE.md (answer whichever apply):
- What does this project do in one sentence? (skip if README was found)
- Are there any files, directories, or systems that should never be touched or auto-modified by Claude?
- Any team conventions not captured in your lint config? (naming patterns, PR size, commit format, review process)
Node 5 โ Generate
Produce the CLAUDE.md using the exact section structure from references/claude-md-template.md.
Critical rules:
- Every populated section must have real content โ no
[TODO: add your X here] placeholders
- If a section cannot be filled at all, omit it entirely rather than writing a placeholder
- Commands must be exact and runnable (
npm run dev, not "run the dev server")
- What NOT To Do must have at least 2 entries
- Write in imperative, direct style ("Run tests with...", "Never edit files in...")
- No heading levels deeper than H2 within sections
Node 6 โ Validate
Before writing, verify against references/validation-checklist.md:
If Commands or What NOT To Do would fail: ask one final targeted question before writing.
Output
Write the file to CLAUDE.md at the project root. After writing, print a one-line confirmation:
โ CLAUDE.md written โ X sections populated from repo scan, Y from your answers.
If in diff-and-merge mode, also print which sections were added vs. left unchanged.
Anti-Patterns To Reject
- Generating CLAUDE.md without running the scan first
- Asking more than 3 intake questions
- Writing placeholder sections ("add your commands here")
- Overwriting an existing populated CLAUDE.md without running the diff-and-merge flow
- Writing generic boilerplate not specific to the scanned project
- Including commands that weren't found in signal files and weren't confirmed by the user
References
references/scan-signals.md โ full catalog of signal files and what each reveals
references/claude-md-template.md โ canonical CLAUDE.md section structure and style rules
references/validation-checklist.md โ required fields and quality gates before writing
Version: 1.0.0