Zum Inhalt springen
Skillpedia
Allgemeines Programmieren46k · #6321

claude-md

Was er macht

Er leitet deinen Agenten an, die CLAUDE.md-Datei zu schreiben oder zu prüfen. Sie legt fest, wie ein Projekt für Claude funktioniert. Er richtet sich an Entwickler, die ihre KI-Assistenz mit dem richtigen Kontext in jede Sitzung starten lassen wollen.

Wann du ihn nutzt

  • ✓Wenn du ein neues Projekt startest und eine CLAUDE.md-Datei geschrieben haben möchtest.
  • ✓Wenn eine bestehende CLAUDE.md-Datei zu lang oder unklar ist und verbessert werden muss.
  • ✓Wenn du die CLAUDE.md-Datei eines Projekts vor dem Teilen mit deinem Team prüfen lassen möchtest.

Link zum Skill

https://github.com/luongnv89/claude-howto/blob/main/03-skills/claude-md/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/luongnv89/claude-howto/blob/main/03-skills/claude-md/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Kannst du meine CLAUDE.md prüfen und vorschlagen, was ich streichen kann, damit sie kurz und nützlich bleibt?”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Der Agent analysiert das Projekt, sucht nach vorhandenen CLAUDE.md-Dateien und erstellt, aktualisiert oder prüft sie anhand einer Reihe von Grundsätzen. Er behält nur Informationen, die in jeder Sitzung gelten.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

User Input

$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 main project file loaded into every conversation (alongside auto memory and unscoped rules). 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:

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 200 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:

# 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 200 lines; shorter is better
  • Every line applies to ALL sessions
  • No style/formatting rules
  • No code snipp
Häufige Fragen

Warum sollte die Datei kurz sein?

Der Skill sagt, dass Spitzen-KI-Modelle nur etwa 150 bis 200 Anweisungen zuverlässig befolgen können. Der System-Prompt nutzt davon bereits einen Teil.

Soll der Agent die Datei automatisch schreiben?

Nein. Der Skill rät davon ab, sie automatisch zu erzeugen. Sie soll sorgfältig von Hand geschrieben werden.

Kann er auch eine Datei in einem Unterordner bearbeiten?

Ja. Du kannst einen Pfad angeben, etwa ein Unterverzeichnis, für Anweisungen, die nur für diesen Ordner gelten.

Details

Originalbeschreibung des Autors

Create or update CLAUDE.md files following best practices for optimal AI agent onboarding

repo: luongnv89/claude-howto

Beliebtheit

GitHub-Sterne
46k
Platz im Ranking
#6321
Lizenz
MIT
Aktualisiert
2.11.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills