> ## Documentation Index
> Fetch the complete documentation index at: https://www.opendirectory.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# claude-md-generator

> Reads your codebase and writes a CLAUDE.md that gives Claude Code the context it needs: build commands, code conventions, architecture notes, and gotchas. St...

<Info>
  **Category:** Developer Tools · **Version:** `1.0.0` · **Author:** `OpenDirectory` · **Compatibility:** All targets (claude, codex, opencode, gemini, anti-gravity, openclaw, hermes)
</Info>

<img width="1280" height="640" alt="claude-md-generator" src="https://github.com/user-attachments/assets/0e295271-2216-47f7-828f-845c98ef0298" />

Reads your codebase and writes a CLAUDE.md that gives Claude Code the context it needs: build commands, code conventions, architecture notes, and gotchas. Stays under 200 lines.

## Install

<Tabs>
  <Tab title="npx CLI (Recommended)">
    ```bash theme={null}
    npx "@opendirectory.dev/skills" install claude-md-generator --target claude
    ```
  </Tab>

  <Tab title="skills.sh">
    ```bash theme={null}
    npx skills add Varnan-Tech/opendirectory --skill claude-md-generator
    ```
  </Tab>

  <Tab title="Claude Code Native">
    ```bash theme={null}
    /plugin marketplace add Varnan-Tech/opendirectory
    /plugin install opendirectory-gtm-skills@opendirectory-marketplace
    ```
  </Tab>

  <Tab title="Claude Desktop">
    <video controls className="w-full aspect-video rounded-xl mb-4" src="https://github.com/user-attachments/assets/cea8b565-2002-4a87-8857-d902bfcfdc1c" />

    1. Copy `https://github.com/Varnan-Tech/opendirectory/tree/main/skills/claude-md-generator` into [download-directory.github.io](https://download-directory.github.io/) to download the ZIP.
    2. Open **Claude Desktop** -> **Customize** -> **Skills** -> **+** -> **Upload a skill** and drop the folder containing `SKILL.md`.
  </Tab>

  <Tab title="Manus AI">
    <video controls className="w-full aspect-video rounded-xl mb-4" src="https://github.com/user-attachments/assets/17cbee2a-9e17-4bd4-ac46-68e0e92ffab4" />

    [**Install claude-md-generator in Manus AI**](https://manus.im/import-skills?githubUrl=https%3A%2F%2Fgithub.com%2FVarnan-Tech%2Fopendirectory%2Ftree%2Fmain%2Fskills%2Fclaude-md-generator\&utm_source=opendirectory)
  </Tab>
</Tabs>

## What It Does

* Scans project files: package.json, tsconfig.json, linter configs, Makefile, directory structure
* Extracts all build, test, lint, and dev commands
* Identifies code style conventions that differ from defaults (path aliases, export patterns, naming)
* Maps non-obvious architecture decisions
* Finds gotchas: auto-generated files, required env var setup, test dependencies
* Generates CLAUDE.md using Gemini, then verifies it stays under 200 lines
* If CLAUDE.md already exists, improves it without discarding custom content

## Requirements

| Requirement | Purpose | How to Set Up |
| - | - | - |
| Gemini API key | CLAUDE.md generation from codebase analysis | aistudio.google.com, Get API key |

## Setup

```bash theme={null}
cp .env.example .env
# Add GEMINI_API_KEY
```

## How to Use

From the project root you want to document:

```
"Generate a CLAUDE.md for this project"
"Create a CLAUDE.md"
"Write Claude configuration for this repo"
"Help Claude understand this codebase"
```

To update an existing CLAUDE.md:

```
"Update my CLAUDE.md: we added Vitest and changed the build system"
"Improve my existing CLAUDE.md"
```

## What Goes in CLAUDE.md

| Section | Include | Skip |
| - | - | - |
| Commands | Exact runnable commands, flags needed, env vars required | `npm install` and other obvious ones |
| Architecture | Non-obvious structure, auto-generated directories | "src contains source files" |
| Code Style | Path aliases, export conventions, non-default settings | Indent size (formatter handles it) |
| Testing | Required setup, how to run one test | "we use Jest" (visible from package.json) |
| Gotchas | Auto-generated files, env var order, known intentional issues | Things derivable from the code |

## Why Under 200 Lines

Long CLAUDE.md files get ignored. Claude loads the full file into context every session: a bloated CLAUDE.md with obvious content trains Claude to skim it. A tight 100-150 line CLAUDE.md with only non-obvious facts gets read and used.

The skill cuts aggressively: if a section says only things Claude can infer from the code, it removes it.

## Project Structure

```
claude-md-generator/
├── SKILL.md
├── README.md
├── .env.example
├── evals/
│   └── evals.json
└── references/
    └── section-guide.md
```

## License

MIT


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.