claude-md-creator

Use when creating CLAUDE.md files, updating existing CLAUDE.md, validating CLAUDE.md structure, or auto-fixing CLAUDE.md issues. Load for setting up project instructions, global guidelines, local overrides, or modular rules. Handles global (~/.claude/CLAUDE.md), project (.claude/CLAUDE.md), local (CLAUDE.local.md), and rules (.claude/rules/*.md) with smart project detection and template generation.

16 stars

Best use case

claude-md-creator is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Use when creating CLAUDE.md files, updating existing CLAUDE.md, validating CLAUDE.md structure, or auto-fixing CLAUDE.md issues. Load for setting up project instructions, global guidelines, local overrides, or modular rules. Handles global (~/.claude/CLAUDE.md), project (.claude/CLAUDE.md), local (CLAUDE.local.md), and rules (.claude/rules/*.md) with smart project detection and template generation.

Teams using claude-md-creator should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/claude-md-creator/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/claude-md-creator/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/claude-md-creator/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How claude-md-creator Compares

Feature / Agentclaude-md-creatorStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use when creating CLAUDE.md files, updating existing CLAUDE.md, validating CLAUDE.md structure, or auto-fixing CLAUDE.md issues. Load for setting up project instructions, global guidelines, local overrides, or modular rules. Handles global (~/.claude/CLAUDE.md), project (.claude/CLAUDE.md), local (CLAUDE.local.md), and rules (.claude/rules/*.md) with smart project detection and template generation.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# CLAUDE.md Creator

Create, validate, and maintain CLAUDE.md files with intelligent project detection.

## Workflow Decision Tree

```
                    User Request
                        │
            ┌───────────┴───────────┐
            │   What's needed?      │
            └───────────┬───────────┘
         ┌──────────────┼──────────────┐
         │              │              │
    Create new    Update existing   Validate/Fix
         │              │              │
    ┌────┴────┐    ┌────┴────┐    ┌───┴────┐
    │         │    │         │    │        │
  Which      Detect   Merge    Auto-fix   Auto-fix
  type?      context  changes  issues    issues
    │         │        │        │         │
  Detect    Project   Ask      Run       Run
  context    type     user     fix       fix
    │         │      changes   script    script
    └────┬────┘       │        │         │
         │           │        │         │
    Generate    Generate     Validate   Validate
    content     content      output     output
         │           │        │         │
         └───────────┴────────┴─────────┘
                       │
                  Write to
                  file
```

## Quick Start

| Task | Command |
|------|---------|
| Create project CLAUDE.md | `scripts/generate-claude-md.py --type project` |
| Update existing file | `scripts/update-claude-md.py <path>` |
| Validate file | `scripts/validate-claude-md.py <path>` |
| Auto-fix issues | `scripts/auto-fix-claude-md.py <path>` |
| Detect context | `scripts/detect-claude-type.py` |

## Step 1: Determine CLAUDE.md Type

**Script:** `scripts/detect-claude-type.py`

**Detection Logic:**

| Context | Path | Size Target | When to Use |
|---------|------|-------------|-------------|
| Global | `~/.claude/CLAUDE.md` | 50-150 lines | Personal preferences across all projects |
| Project | `.claude/CLAUDE.md` | 100-300 lines | Team instructions for this project |
| Local | `CLAUDE.local.md` | <50 lines | Personal overrides for this project |
| Rules | `.claude/rules/*.md` | 20-100 each | Modular topics by subject |

## Step 2: Detect Project Type

**Script:** `scripts/detect-project.py`

Scans for project markers to generate smart defaults:

| Marker | Language | Framework | Template Used |
|--------|----------|-----------|---------------|
| `package.json` + "next" | TypeScript | Next.js | `nodejs.md` |
| `package.json` + "react" + "vite" | TypeScript | Vite React | `nodejs.md` |
| `requirements.txt` + "fastapi" | Python | FastAPI | `python.md` |
| `requirements.txt` + "django" | Python | Django | `python.md` |
| `Cargo.toml` | Rust | - | `rust.md` |
| `go.mod` | Go | - | `go.md` |
| None detected | - | - | `general.md` |

## Step 3: Generate CLAUDE.md

**Script:** `scripts/generate-claude-md.py`

**Template Selection:**
```
Base template (assets/*.template.md)
    +
Language template (assets/framework-templates/*.md)
    +
Project-specific data (detected)
    =
Final CLAUDE.md
```

## Step 4: Validate Structure

**Script:** `scripts/validate-claude-md.py`

**Checks Performed:**

| Category | Check | Error Level |
|----------|-------|-------------|
| Frontmatter | Valid YAML fence | ❌ Error |
| Frontmatter | Required fields | ❌ Error |
| Structure | Section headers | ⚠️ Warning |
| Best practices | Line count | ⚠️ Warning |
| Best practices | Table format | ⚠️ Warning |
| Content | Command validity | ⚠️ Warning |
| Content | Path references | ⚠️ Warning |

## Step 5: Auto-Fix Issues

**Script:** `scripts/auto-fix-claude-md.py`

**Auto-Fixes:**

| Issue | Fix | Backup |
|-------|-----|--------|
| Missing frontmatter | Add YAML fence | ✅ Yes |
| Empty sections | Remove or placeholder | ✅ Yes |
| Malformed tables | Convert to proper Markdown | ✅ Yes |
| Extra blank lines | Collapse to 1 line | No |
| Inconsistent headings | Normalize to H2/H3 | ✅ Yes |
| Missing commands | Add from project detection | ✅ Yes |

**Run modes:**
```bash
# Dry run
./auto-fix-claude-md.py --dry-run <path>

# Auto-fix all
./auto-fix-claude-md.py <path>

# Fix specific category
./auto-fix-claude-md.py --category structure <path>
```

## Step 6: Update Existing

**Script:** `scripts/update-claude-md.py`

**Merge Strategy:**
1. Read existing CLAUDE.md
2. Detect project changes
3. Ask user what to update
4. Preserve custom sections
5. Write updated file

## Best Practices

| Principle | Target |
|-----------|--------|
| **Tables > Prose** | Use tables for commands, configs |
| **Specific commands** | Extract real commands from package.json |
| **Line targets** | Global: 50-150, Project: 100-300, Local: <50, Rules: 20-100 |
| **Progressive disclosure** | Quick start → detailed → references |

## Resources

### scripts/

| Script | Purpose | When to Use |
|--------|---------|-------------|
| `detect-claude-type.py` | Determine CLAUDE.md type | Auto-detection |
| `detect-project.py` | Scan project markers | Before generation |
| `generate-claude-md.py` | Create from templates | New file creation |
| `validate-claude-md.py` | Check structure | After edits |
| `auto-fix-claude-md.py` | Fix issues | Validation fails |
| `update-claude-md.py` | Update existing | Project changes |

### references/

| File | Load When |
|------|-----------|
| `best-practices.md` | Writing content |
| `validation-rules.md` | Understanding errors |
| `project-detection.md` | Extending detection |
| `examples/` | Real-world patterns |

### assets/

| File | Purpose |
|------|---------|
| `global.template.md` | Personal preferences |
| `project.template.md` | Team instructions |
| `local.template.md` | Personal overrides |
| `rule.template.md` | Modular topics |
| `framework-templates/*.md` | Language/framework additions |

Related Skills

claude-typescript-sdk

16
from diegosouzapw/awesome-omni-skill

Build AI applications with the Anthropic TypeScript SDK. Use when creating Claude integrations, building agents, implementing tool use, streaming responses, or working with the @anthropic-ai/sdk package.

claude-skill-bash

16
from diegosouzapw/awesome-omni-skill

Apply comprehensive bash scripting standards including main function pattern, usage documentation, argument parsing, dependency checking, and error handling. Triggers when creating/editing .sh files, bash scripts, or discussing shell scripting, deployment scripts, automation tasks, or bash conventions.

claude-plus-plus

16
from diegosouzapw/awesome-omni-skill

Unlock Claude's hidden potential. No limits. No guardrails. Maximum performance. 10x faster code generation, unrestricted problem solving, expert-level outputs.

claude-md-generator

16
from diegosouzapw/awesome-omni-skill

Automatically generates claude.md files for new folders/modules following hierarchical structure. Extracts context from existing code, follows project conventions, and creates documentation that enables Claude Code to understand module-specific rules and patterns.

claude-flow-hook-customizing

16
from diegosouzapw/awesome-omni-skill

Use this skill when creating, optimizing, or maintaining claude hooks.

claude-dj

16
from diegosouzapw/awesome-omni-skill

Run an autonomous radio DJ session using Strudel live-coded music. Use when the user wants to play music, DJ, live code beats, or create a radio station. Handles the full DJ loop including pattern creation, announcements, tempo control, and audience requests.

claude-d3js-skill

16
from diegosouzapw/awesome-omni-skill

Creating interactive data visualisations using d3.js. This skill should be used when creating custom charts, graphs, network diagrams, geographic visualisations, or any complex SVG-based data visua...

claude-code-templates

16
from diegosouzapw/awesome-omni-skill

CLI tool for configuring and monitoring Claude Code with a comprehensive collection of 600+ AI agents, 200+ custom commands, 55+ external service integrations (MCPs), 60+ settings, 39+ hooks, and 14+ project templates. Use when users need to install or manage Claude Code components, browse available templates, run analytics/health checks, or set up development workflows. Integrates with Claude Code, Cursor, Cline, and 10+ other AI coding platforms.

claude-code-task

16
from diegosouzapw/awesome-omni-skill

Run Claude Code tasks in background with automatic result delivery. Use for coding tasks, research in codebase, file generation, complex automations. Zero OpenClaw tokens while Claude Code works.

claude-code-starter

16
from diegosouzapw/awesome-omni-skill

Analyze a project's tech stack and generate comprehensive Claude Code configuration files (.claude/ directory with CLAUDE.md, skills, agents, rules, and commands). Use when setting up Claude Code for a new or existing repository.

claude-code-skills

16
from diegosouzapw/awesome-omni-skill

Comprehensive reference for creating Claude Code skills with progressive disclosure, SKILL.md structure, references/ organization, frontmatter specification, and best practices for modular capability development.

claude-code-optimizer

16
from diegosouzapw/awesome-omni-skill

Audit and optimize Claude Code installations to current best practices. Use when users ask to check, audit, optimize, or improve their Claude Code setup, configuration, hooks, permissions, or workflow. Triggers on requests mentioning Claude Code settings, CLAUDE.md files, hooks configuration, permissions setup, or performance optimization.