claude-md
Create or update CLAUDE.md files following best practices for optimal AI agent onboarding
Оригинален текст · няма потвърден превод на българскиПърво прочетете инструкцията.
Файлът се зарежда от посочения източник само по ваше действие. Можете да го прочетете тук, да го копирате или да го запазите като .md.
GitHub хранилище- Звезди на репото
- 41 633
- Лиценз
- MIT
- Последна проверка на записа
- 20.09.2026 г.
Добавете в своя инструмент.
Командата отваря избора на skills от репозитория. Прочетете файла и условията на автора преди изпълнение.
npx skills add luongnv89/claude-howtoСтраницата копира текст. Не инсталира и не изпълнява нищо на устройството ви.
Откъс от SKILL.md
Началото на файла на автора, без превод.
User Input
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty). User may specify:
create- Create new CLAUDE.md from scratchupdate- Improve existing CLAUDE.mdaudit- Analyze and report on current CLAUDE.md quality- A specific path to create/update (e.g.,
src/api/CLAUDE.mdfor 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
-
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.
-
Universal Applicability: Only include information relevant to EVERY session. Task-specific instructions belong in separate files.
-
Don't Use Claude as a Linter: Style guidelines bloat context and degrade instruction-following. Use deterministic tools (prettier, eslint, etc.) instead.
-
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:
-
Check for existing CLAUDE.md files:
- Root level:
./CLAUDE.mdor.claude/CLAUDE.md - Directory-specific:
**/CLAUDE.md - Global user config:
~/.claude/CLAUDE.md
- Root level:
-
Identify the project structure:
- Technology stack (languages, frameworks)
- Project type (monorepo, single app, library)
- Development tools (package manager, build system, test runner)
-
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