- Claude Code
- Agent
- Intermediate
- Claude Code
- Published
Lean CLAUDE.md Generator from Repo Inspection
Claude Code inspects your repository and writes a CLAUDE.md under 200 lines with verified commands first, checkable conventions, anti-patterns and the reasons behind key decisions.
You get: Working code with an explanation
Ready to use: no blanks to fill in.
The prompt
mkdir -p .agents/skills/lean-claude-md-generator-from-repo-inspection && curl -sL "https://prompts-gpt.com/prompts/lean-claude-md-generator-from-repo-inspection/raw" -o .agents/skills/lean-claude-md-generator-from-repo-inspection/SKILL.md---
name: lean-claude-md-generator-from-repo-inspection
description: "Claude Code inspects your repository and writes a CLAUDE.md under 200 lines with verified commands first, checkable conventions, anti-patterns and the reasons behind key decisions."
---
# Lean CLAUDE.md Generator from Repo Inspection
Claude Code inspects your repository and writes a CLAUDE.md under 200 lines with verified commands first, checkable conventions, anti-patterns and the reasons behind key decisions.
## Prompt
```
You are a senior engineer setting up Claude Code for this repository. Inspect the repo before writing anything: package manifests, Makefile or scripts, CI config, lint, type and test config, the README, and recent commits. If you cannot tell how tests are run or which package manager is used, ask me one short question first. Then write a CLAUDE.md under 200 lines. Rules: 1) Commands come first: install, build, run one test file, full tests, lint, typecheck. Verify each against config files and mark any you could not verify. 2) Include only conventions that a command or a code search can check; drop advice like 'write clean code'. 3) List anti-patterns you actually found in this repo, each with a one-line reason, and record key architectural decisions with why they were made. 4) Do not copy the README; link to it. Output in this order: a short list of assumptions and unverified items, the full CLAUDE.md in one code block with sections Commands, Conventions, Anti-patterns, and Decisions and Why, the final line count, then three next actions for me.
```
## Usage Notes
Run it from the repo root at the start of a Claude Code session on a project that has no CLAUDE.md or has an outdated one. No paste is needed because Claude Code reads the repo itself.
You are a senior engineer setting up Claude Code for this repository. Inspect the repo before writing anything: package manifests, Makefile or scripts, CI config, lint, type and test config, the README, and recent commits. If you cannot tell how tests are run or which package manager is used, ask me one short question first. Then write a CLAUDE.md under 200 lines. Rules: 1) Commands come first: install, build, run one test file, full tests, lint, typecheck. Verify each against config files and mark any you could not verify. 2) Include only conventions that a command or a code search can check; drop advice like 'write clean code'. 3) List anti-patterns you actually found in this repo, each with a one-line reason, and record key architectural decisions with why they were made. 4) Do not copy the README; link to it. Output in this order: a short list of assumptions and unverified items, the full CLAUDE.md in one code block with sections Commands, Conventions, Anti-patterns, and Decisions and Why, the final line count, then three next actions for me.Example output
Tips and common edits
Run it from the repo root at the start of a Claude Code session on a project that has no CLAUDE.md or has an outdated one. No paste is needed because Claude Code reads the repo itself.
Questions about this prompt
More like this
More in Claude CodeClaude Code Feature Implementation Plan and Build from a Ticket with Repo Convention Discovery
Has Claude Code investigate how similar features are built in the repository, produce an implementation plan with acceptance tests, then implement it in verified increments. Surfaces risks, open questions, and next actions before and after coding.
Codebase Tour for a Specific Task
Explores a repo through the lens of your task and explains the architecture, key files and data flow, then says where to start.
CLAUDE.md or AGENTS.md Audit: Cut, Rewrite as Checkable Rules, Move to Skills
Turns a pasted CLAUDE.md or AGENTS.md into a shorter file of verifiable rules and names which procedures belong in skills.
Cursor Project Rules Generator for Your Repo's Stack
Has Cursor inspect your repository and write 3-5 scoped .mdc rules, each with globs, a description and a deliberately chosen attach mode.
Agent Run Post-Mortem: Trace Root Cause and Prompt or Tool Fixes
Analyzes a pasted agent trace to find the first real failure and proposes exact prompt rewrites or tool changes, each with a test.
Characterization Tests Before a Refactor
Writes tests that lock in a module's current behavior, including edge cases and quirks, so you can refactor safely.
Checkpoint and Rollback Manager with Compensation Steps and Failure Injection Tests
Guides Claude Code to implement checkpoint snapshots, rollback modes, and compensating actions for side-effecting agent phases, then prove them with failure-injection tests. Helps you decide the rollback strategy per phase.
Claude Code Behavior-Preserving Refactor with Characterization Tests and Staged Commits
Guides Claude Code to refactor a module safely by first pinning current behavior with characterization tests, then applying small reversible steps with verification after each. Delivers a diff, risk register, and rollback plan.
Claude Code Hook Writer: Auto-Run Lint, Typecheck or Tests After Edits
Produces a PostToolUse hook entry for settings.json, the script it calls and a concrete procedure to test that the check runs after file edits.
Claude Code Plan-Then-Implement a Feature With Approval Checkpoints
Makes Claude Code explore the repo, write a step-by-step plan for your approval, then build the feature in small verified steps, stopping at each checkpoint for your go-ahead.
Claude Code Root-Cause Bug Investigation with Failing Test and Minimal Patch
Directs Claude Code to reproduce a bug, trace it to a root cause using repository evidence, write a failing regression test, and apply the smallest safe fix. Ends with a verified diff, risks, and next actions.
Coding Agent Task Brief with Guardrails, Test Plan, and Rollback Steps
Creates a scoped brief for an AI coding agent that limits file changes, defines tests, and includes a rollback plan and review checklist.