Agent skill

CLAUDE.md Writer

by luongnv89 in luongnv89/claude-howto

Creates, updates or audits CLAUDE.md files so they onboard an agent into a codebase with a short, universal set of facts rather than long style rules.

MITAuto-check passedAgent Workflows

Install CLAUDE.md Writer

skills CLI
$ npx skills add luongnv89/claude-howto --skill claude-md -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install luongnv89/claude-howto claude-md --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/luongnv89/claude-howto.git skills-src && mkdir -p .claude/skills && cp -r skills-src/03-skills/claude-md .claude/skills/claude-md && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
claude-md
GitHub stars
42k
Token cost
~1.9k tokens
SKILL.md length
841 words
Files
1
Skills in repo
25
Repo updated
First seen
Licence
MIT

At a glance

Creates, updates or audits CLAUDE.md files so they onboard an agent into a codebase with a short, universal set of facts rather than long style rules.

  • Works in 7 steps: Project Analysis → Content Strategy (WHAT, WHY, HOW) → Progressive Disclosure Strategy → …
  • Starting a CLAUDE.md for a repository that has none
  • SKILL.md covers User Input, Core Principles, Execution Flow and Output Format, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

You tell it to create, update or audit, or give a path such as src/api/CLAUDE.md for a directory-level file. It rests on four rules: a model follows only a limited number of instructions (about 150 to 200, with roughly 50 already used by the Claude Code system prompt), so the file stays short; only what applies to every session goes in; style enforcement is left to tools like prettier and eslint; and the file is written by hand instead of generated.

Execution starts with project analysis: existing CLAUDE.md files at root, directory and user level, the technology stack, project type and tooling, and README, CONTRIBUTING and manifest files. Content is organized as what, why and how, covering stack and structure, purpose and architectural reasoning, and workflow, test commands and gotchas. For larger projects it suggests an agent_docs folder for progressive disclosure.

When your agent uses it

  • Starting a CLAUDE.md for a repository that has none
  • Trimming a CLAUDE.md that has grown bloated or full of style rules
  • Auditing an existing CLAUDE.md and getting a quality report
  • Adding directory-specific instructions in a monorepo package

Example prompts

  • “Create a CLAUDE.md for this repo covering the stack, test commands and gotchas.”
  • “Audit our current CLAUDE.md and tell me what to cut.”
  • “Write a CLAUDE.md for the packages/api directory only.”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Project Analysis
  2. Content Strategy (WHAT, WHY, HOW)
  3. Progressive Disclosure Strategy
  4. Quality Constraints
  5. Essential Sections
  6. Anti-Patterns to Avoid
  7. Validation Checklist

What it can do on your machine

Read from SKILL.md and the folder at commit 556af8d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • code.claude.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

CLAUDE.md Writer loads about 1.9k tokens when it runs. Until then it costs about 25 tokens; SKILL.md has 841 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~25
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from luongnv89/claude-howto at commit 556af8d, republished under its MIT licence (© luongnv89). 841 words, ~1,925 tokens.

Download SKILL.mdSave it as .claude/skills/claude-md/SKILL.md (or your agent's skills folder).
name
claude-md
description
Create or update CLAUDE.md files following best practices for optimal AI agent onboarding

User Input

text
$ARGUMENTS

You MUST consider the user input before proceeding (if not empty). User may specify:

  • create - Create new CLAUDE.md from scratch
  • update - Improve existing CLAUDE.md
  • audit - Analyze and report on current CLAUDE.md quality
  • A specific path to create/update (e.g., src/api/CLAUDE.md for directory-specific instructions)

Core Principles

LLMs are stateless: CLAUDE.md is the only file automatically included in every conversation. It serves as the primary onboarding document for AI agents into your codebase.

The Golden Rules
  1. Less is More: Frontier LLMs can follow ~150-200 instructions. Claude Code's system prompt already uses ~50. Keep your CLAUDE.md focused and concise.

  2. Universal Applicability: Only include information relevant to EVERY session. Task-specific instructions belong in separate files.

  3. Don't Use Claude as a Linter: Style guidelines bloat context and degrade instruction-following. Use deterministic tools (prettier, eslint, etc.) instead.

  4. Never Auto-Generate: CLAUDE.md is the highest leverage point of the AI harness. Craft it manually with careful consideration.

Execution Flow

1. Project Analysis

First, analyze the current project state:

  1. Check for existing CLAUDE.md files:

    • Root level: ./CLAUDE.md or .claude/CLAUDE.md
    • Directory-specific: **/CLAUDE.md
    • Global user config: ~/.claude/CLAUDE.md
  2. Identify the project structure:

    • Technology stack (languages, frameworks)
    • Project type (monorepo, single app, library)
    • Development tools (package manager, build system, test runner)
  3. Review existing documentation:

    • README.md
    • CONTRIBUTING.md
    • package.json, pyproject.toml, Cargo.toml, etc.
2. Content Strategy (WHAT, WHY, HOW)

Structure CLAUDE.md around three dimensions:

WHAT - Technology & Structure
  • Technology stack overview
  • Project organization (especially important for monorepos)
  • Key directories and their purposes
WHY - Purpose & Context
  • What the project does
  • Why certain architectural decisions were made
  • What each major component is responsible for
HOW - Workflow & Conventions
  • Development workflow (bun vs node, pip vs uv, etc.)
  • Testing procedures and commands
  • Verification and build methods
  • Critical "gotchas" or non-obvious requirements
3. Progressive Disclosure Strategy

For larger projects, recommend creating an agent_docs/ folder:

agent_docs/
  |- building_the_project.md
  |- running_tests.md
  |- code_conventions.md
  |- architecture_decisions.md

In CLAUDE.md, reference these files with instructions like:

markdown
For detailed build instructions, refer to `agent_docs/building_the_project.md`

Important: Use file:line references instead of code snippets to avoid outdated context.

4. Quality Constraints

When creating or updating CLAUDE.md:

  1. Target Length: Keep it under a few hundred lines; shorter is better
  2. No Style Rules: Remove any linting/formatting instructions
  3. No Task-Specific Instructions: Move to separate files
  4. No Code Snippets: Use file references instead
  5. No Redundant Information: Don't repeat what's in package.json or README
5. Essential Sections

A well-structured CLAUDE.md should include:

markdown
# Project Name

Brief one-line description.

## Tech Stack
- Primary language and version
- Key frameworks/libraries
- Database/storage (if any)

## Project Structure
[Only for monorepos or complex structures]
- `apps/` - Application entry points
- `packages/` - Shared libraries

## Development Commands
- Install: `command`
- Test: `command`
- Build: `command`

## Critical Conventions
[Only non-obvious, high-impact conventions]
- Convention 1 with brief explanation
- Convention 2 with brief explanation

## Known Issues / Gotchas
[Things that consistently trip up developers]
- Issue 1
- Issue 2
6. Anti-Patterns to Avoid

DO NOT include:

  • Code style guidelines (use linters)
  • Documentation on how to use Claude
  • Long explanations of obvious patterns
  • Copy-pasted code examples
  • Generic best practices ("write clean code")
  • Instructions for specific tasks
  • Auto-generated content
  • Extensive TODO lists
7. Validation Checklist

Before finalizing, verify:

  • Kept under a few hundred lines; shorter is better
  • Every line applies to ALL sessions
  • No style/formatting rules
  • No code snippets (use file references)
  • Commands are verified to work
  • Progressive disclosure used for complex projects
  • Critical gotchas are documented
  • No redundancy with README.md

Output Format

For create or default:
  1. Analyze the project
  2. Draft a CLAUDE.md following the structure above
  3. Present the draft for review
  4. Write to the appropriate location after approval
Show full SKILL.md (335 more words)Show less
For update:
  1. Read existing CLAUDE.md
  2. Audit against best practices
  3. Identify:
    • Content to remove (style rules, code snippets, task-specific)
    • Content to condense
    • Missing essential information
  4. Present changes for review
  5. Apply changes after approval
For audit:
  1. Read existing CLAUDE.md
  2. Generate a report with:
    • Current line count vs target
    • Percentage of universally-applicable content
    • List of anti-patterns found
    • Recommendations for improvement
  3. Do NOT modify the file, only report

AGENTS.md Handling

If the user requests AGENTS.md creation/update:

Since v2.1.277, Claude Code reads AGENTS.md directly as project instructions — but only when the working directory and every directory above it contain no CLAUDE.md, .claude/CLAUDE.md, or CLAUDE.local.md. ~/.claude/CLAUDE.md, managed CLAUDE.md, and .claude/rules/ do not count for that check and keep loading alongside. Which files are read is controlled by Project instructions in /config: claude-md-or-agents-md (default), claude-md-and-agents-md, claude-md, or managed-only. Where direct reading is unavailable — versions before v2.1.277 (before v2.1.281 on Bedrock/Vertex/Foundry, LLM gateways, or with telemetry disabled), or the first session after upgrading — fall back to importing it from CLAUDE.md with @AGENTS.md, or symlinking CLAUDE.md to it.

AGENTS.md is a cross-tool project-context file — the same category of document as CLAUDE.md, not an agent-definition format. It exists so several coding agents can share one set of project conventions:

  • Build, test, and lint commands
  • Code style and architectural conventions
  • Repository layout and where things live

Subagents are defined separately, in .claude/agents/*.md — not in AGENTS.md.

Apply similar principles:

  • Keep focused and concise
  • Use progressive disclosure
  • Reference external docs instead of embedding content

Notes

  • Always verify commands work before including them
  • When in doubt, leave it out - less is more
  • The system reminder tells Claude that CLAUDE.md "may or may not be relevant" - the more noise, the more it gets ignored
  • Monorepos benefit most from clear WHAT/WHY/HOW structure
  • Directory-specific CLAUDE.md files should be even more focused

Last Updated: September 26, 2026 Claude Code Version: 2.1.283 Sources:

© luongnv89, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in 03-skills/claude-md of luongnv89/claude-howto.

Open the folder on GitHubat commit 556af8d

Compare with similar skills

CLAUDE.md Writer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

CLAUDE.md Writer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
CLAUDE.md Writer this skillluongnv89/claude-howto42k—~1.9kAutomated safety check: PassMIT
Context Engineeringabashev/vfs-s31069 repos~2.6kAutomated safety check: NotesApache-2.0
Harness Engineering10xChengTu/harness-engineering1021 repos~1kAutomated safety check: PassNone
Cc Dev Agentsangrokjung/claude-forge852—~771Automated safety check: PassMIT
Caveman Learn Token FixesJuliusBrussee/caveman111k—~2.8kAutomated safety check: PassApache-2.0
Context Routing Auditwithkynam/vibecode-pro-max-kit1.1k—~1.2kAutomated safety check: PassMIT

Similar skills

  • Context Engineering

    abashev/vfs-s3

    Optimizes agent context setup. An agent skill from abashev/vfs-s3.

    106 GitHub starsUsed in 9 repos~2.6k tokens
    Agent WorkflowsAuto-check: notes
  • Harness Engineering

    10xChengTu/harness-engineering

    Set up and improve harness engineering (AGENTS.md, docs/, lint rules, eval systems, project-level prompt engineering) for AI-agent-friendly codebases.

    102 GitHub starsUsed in 1 repo~1k tokens
    Agent WorkflowsAuto-check passed
  • Cc Dev Agent

    sangrokjung/claude-forge

    A skill your agent uses when starting Claude Code projects, writing CLAUDE.md/spec.md, dispatching subagents, or requesting Agent Teams parallel development.

    852 GitHub stars~771 tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • Caveman Learn Token Fixes

    JuliusBrussee/caveman

    Acts on a Caveman learn report: reviews ranked token sinks, applies cost-lowering edits one at a time with your consent, and reports what each fix returned.

    111k GitHub stars~2.8k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Context Routing Audit

    withkynam/vibecode-pro-max-kit

    Audits a project's context routing, skill discoverability and skill wiring by running a chain of validator scripts and fixing whatever they report.

    1.1k GitHub stars~1.2k tokensUpdated 3 mo ago
    Agent WorkflowsAuto-check passed
  • Context Budget Check

    poshan0126/dotclaude

    Estimates the per-turn token cost of a project's .claude folder and CLAUDE.md, split into always-loaded, path-scoped and invoked-only files, and flags what runs over budget.

    871 GitHub stars~1.4k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed

More from luongnv89/claude-howto

All 25 skills in this repo
  • Systematic Code Refactoring

    luongnv89/claude-howto

    Guides refactoring in phases based on Martin Fowler's method: research, test coverage check, planning and small tested steps, with your approval at each phase.

    42k GitHub stars~3k tokensUpdated 9 days ago
    Auto-check passed
  • Code Refactoring Workflow

    luongnv89/claude-howto

    Guides systematic, test-backed refactoring in the style of Martin Fowler, moving through research, planning and small incremental changes with your approval at each phase.

    42k GitHub stars~3.1k tokensUpdated 9 days ago
    Auto-check passed
  • Blog Post Drafting

    luongnv89/claude-howto

    Guides drafting a blog post from an idea and optional source material: research, brainstorming, outlining and version-tracked drafts, with user approval at each step.

    42k GitHub stars~2.1k tokensUpdated 9 days ago
    Auto-check passed
  • Brand Voice Guide

    luongnv89/claude-howto

    Ensure all communication matches brand voice and tone guidelines. Use when creating marketing copy, customer communications, public-facing content, or when…

    42k GitHub stars~609 tokensUpdated 9 days ago
    Auto-check passed
  • Code Review Specialist

    luongnv89/claude-howto

    Reviews code for security, performance, quality and maintainability, using a checklist, a finding template and two metrics scripts.

    42k GitHub stars~764 tokensUpdated 9 days ago
    Auto-check passed
  • Claude Code Skill Assessment

    luongnv89/claude-howto

    Runs a quick or deep quiz on Claude Code skills, scores ten feature areas and generates a personalized learning path with prioritized next steps.

    42k GitHub stars~5.5k tokensUpdated 9 days ago
    Auto-check passed

Categories

Questions about CLAUDE.md Writer

What does CLAUDE.md Writer do?

Creates, updates or audits CLAUDE.md files so they onboard an agent into a codebase with a short, universal set of facts rather than long style rules. md for a directory-level file. It rests on four rules: a model follows only a limited number of instructions (about 150 to 200, with roughly 50 already used by the Claude Code system prompt), so the file stays short; only what applies to every session goes in; style enforcement is left to tools like prettier and eslint; and the file is written by hand instead of generated.

When should I use CLAUDE.md Writer?

CLAUDE.md Writer fits situations like: starting a CLAUDE.md for a repository that has none; trimming a CLAUDE.md that has grown bloated or full of style rules; auditing an existing CLAUDE.md and getting a quality report; adding directory-specific instructions in a monorepo package.

How do I install CLAUDE.md Writer in Claude Code?

Run `npx skills add luongnv89/claude-howto --skill claude-md -a claude-code`. Or copy the skill folder (03-skills/claude-md in luongnv89/claude-howto) into .claude/skills/claude-md in your project. Claude Code loads it when a task matches its description.

How do I install CLAUDE.md Writer in Codex?

Run `npx skills add luongnv89/claude-howto --skill claude-md -a codex`. Or copy the skill folder (03-skills/claude-md in luongnv89/claude-howto) into .agents/skills/claude-md in your project. Codex loads it when a task matches its description.

Can I use CLAUDE.md Writer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add luongnv89/claude-howto --skill claude-md -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/claude-md, .gemini/skills/claude-md, .github/skills/claude-md and .opencode/skills/claude-md in your project.

What does CLAUDE.md Writer need to run?

SKILL.md names no scripts, command-line tools or credentials: CLAUDE.md Writer is instructions for the agent only.

Does CLAUDE.md Writer access the network?

SKILL.md names 1 domain. As links in the text: code.claude.com. This is read from the text; nothing was executed.

Is CLAUDE.md Writer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does CLAUDE.md Writer use?

CLAUDE.md Writer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does CLAUDE.md Writer use?

About 1.9k tokens (SKILL.md is roughly 7.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to CLAUDE.md Writer?

Skills that share tags, products or a category with CLAUDE.md Writer: Context Engineering (abashev/vfs-s3, 106 stars), Harness Engineering (10xChengTu/harness-engineering, 102 stars), Cc Dev Agent (sangrokjung/claude-forge, 852 stars) and Caveman Learn Token Fixes (JuliusBrussee/caveman, 111k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains CLAUDE.md Writer?

luongnv89 (a GitHub user) maintains it in luongnv89/claude-howto, which has 41,779 GitHub stars. The repository holds 25 skills in this directory. The repository was last updated on September 30, 2026.

Source: luongnv89/claude-howto on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.