agent-md-creator
Agent MD Creator
Generate a single self-contained CLAUDE.md / AGENT.md file: auto-detected stack, Karpathy guidelines, nothing more.
Rule
All interactive prompts (Steps 1, 2, 4, 5) MUST use the
AskUserQuestiontool.
Workflow
Step 1 — File type
Ask: "CLAUDE.md or AGENT.md?"
Step 2 — Technical reference documents
Ask: "Are there existing technical documents or guidelines to extract info from? (e.g. README.md, TECHNICAL_REFERENCE.md, docs/architecture.md — relative paths separated by comma, or skip)"
Behavior:
- If paths provided →
Readeach file in full; extract stack, exact versions, conventions, and project description to use in the following steps. - If a document is ambiguous or conflicts with another → report the conflict explicitly, do not resolve it silently.
- If extracted info includes a project description → skip Step 4 automatically.
- If skip → proceed with config file scan only (Step 3).
Step 3 — Config file scan
Search the CWD for these files to detect the tech stack:
| File | Stack |
|---|---|
package.json |
Node.js / JS |
composer.json |
PHP |
requirements.txt / pyproject.toml / setup.py |
Python |
pom.xml / build.gradle |
Java |
Gemfile |
Ruby |
*.csproj / *.sln |
.NET |
go.mod |
Go |
Cargo.toml |
Rust |
Dockerfile / docker-compose.yml |
Docker |
.github/workflows/*.yml |
CI/CD |
⚠️ Exact versions are mandatory. Version precedence: config files win over Step 2 docs (config files are always current; docs may lag).
If no stack is detected (no config files, no Step 2 docs): try reading README.md automatically. If README yields no stack info → ask the user to describe it.
Mixed-stack projects (e.g. Python backend + Node.js frontend): always use the category structure (Frontend / Backend / Database / Other tools). Always one file — no splitting. If the project is complex, add a ## References section (see Step 6).
Step 4 — Project details (optional, skip if description already extracted in Step 2)
Ask in a single message:
Would you like to add project details? Fill in what you need, skip the rest:
1. Short description (1–3 lines)
2. Key artifacts / main folders
3. Primary languages (if not auto-detected)
Reply with numbers and content, or "skip".
If skip → the ## Project section is generated from the folder name + auto-detected stack only.
Step 5 — Commands (optional)
Ask: "Provide test, build, and dev server commands (or skip):"
Expected format:
Test: npm test
Build: npm run build
Dev: npm run dev
If provided → included as a ## Commands section inside the main file.
If skip → section omitted.
Step 6 — Generate file
Before writing: check if the file already exists in the CWD.
- If it exists → ask: "File already exists. Overwrite? (yes/no)"
- Yes → overwrite.
- No → stop: "File already exists, not modified."
Create the file chosen in Step 1 in the CWD, using this structure:
# {{CLAUDE|AGENT}}.md — {{project_folder_name}}
## Project
{{description from Step 4, or: "{{folder_name}}: {{main stack}} project."}}
Key artifacts: {{...}}.
Languages: {{...}}.
## Technology Stack
- **Frontend**: {{framework, UI libs, state mgmt — omit if not present}}
- **Backend**: {{language, framework, API}}
- **Database**: {{db, ORM — omit if not present}}
- **Other tools**: {{deploy, test, pkg manager}}
## Commands ← include only if Step 5 was filled in
- Test: `...`
- Build: `...`
- Dev: `...`
---
## Development Guidelines (Karpathy)
### 1. Think Before Coding
- Declare assumptions explicitly before writing code.
- If multiple interpretations exist, present them all — do not silently pick one.
- If something is unclear, stop and ask. Do not guess.
### 2. Simplicity First
- Minimum code that solves the problem, nothing more.
- Zero unrequested features, zero abstractions for one-time-use code.
- No speculative configurability, no error handling for impossible scenarios.
- Self-check: "would a senior say this is over-engineered?" — if yes, simplify.
### 3. Surgical Changes
- Modify only what is needed for the current request.
- Do not improve adjacent code, unrelated comments, or formatting.
- Preserve the existing file style, even if you would do it differently.
- Unrelated dead code: flag it, do not delete it.
- Remove orphan imports/variables **only** if made orphan by the current changes.
### 4. Goal-Driven Execution
Turn every task into a verifiable criterion **before** starting:
| Request | Success criterion |
|---------|-------------------|
| "Add validation" | Write tests for invalid inputs, then make them pass |
| "Fix the bug" | Write a test that reproduces the bug, then make it pass |
| "Refactor X" | Tests pass both before and after |
For multi-step tasks, declare a short plan (steps + verification) before coding.
---
> These rules take precedence over implicit conventions inferred from the code.
> In case of conflict with other preferences, ask the user explicitly.
Formatting rules:
- Omit empty Technology Stack categories (no lines like "- Frontend: —").
## Commandssection only if provided in Step 5.## Referencessection only if Step 2 docs were provided — list them as links.- No collateral files (
COMMANDS.md,STACK.md,guidelines/).
Step 7 — Confirm
Final message: "File created: {{name}} in {{CWD}}"
More from marcoax/skills
code-review
>
10pessimistic-code-review
>
10grill-me
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
8skill-optimizer
>
8current-file-review
Review changes in one explicitly identified current or open file against project best practices. Use only when the user clearly refers to the current file, says "this file", "current file", "open file", or provides a single file path to review. Do not use for generic review requests, branch diffs, commits, or repository-wide review; use code-review or a stack-specific review skill instead. Operates in PLAN MODE - proposes improvements, waits for approval before executing.
8task-spec-creator
Generate a structured TASK_SPEC.md for a single implementation task, sprint ticket, or technical work item by interviewing the developer. Use when the user wants to define one concrete task, capture implementation requirements, document acceptance criteria, or says things like "creiamo una specifica", "voglio definire la task", "ho un ticket da implementare", or "partiamo dalla specifica". Do not use for product-level feature discovery or PRDs; use write-a-prd for that. Do not use for incremental refactor roadmaps; use request-refactor-plan for that.
7