用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/luongnv89/claude-howto --skill claude-md命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | claude-md |
| description | Create or update CLAUDE.md files following best practices for optimal AI agent onboarding |
$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 qualitysrc/api/CLAUDE.md for directory-specific instructions)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.
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.
First, analyze the current project state:
Check for existing CLAUDE.md files:
./CLAUDE.md or .claude/CLAUDE.md**/CLAUDE.md~/.claude/CLAUDE.mdIdentify the project structure:
Review existing documentation:
Structure CLAUDE.md around three dimensions:
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.
When creating or updating CLAUDE.md:
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
DO NOT include:
Before finalizing, verify:
create or default:update:audit:If the user requests AGENTS.md creation/update:
Claude Code does not read AGENTS.md directly. To make it take effect, import it from CLAUDE.md with @AGENTS.md, or symlink CLAUDE.md to it. This is the single most common misunderstanding about the file.
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:
Subagents are defined separately, in .claude/agents/*.md — not in AGENTS.md.
Apply similar principles:
Last Updated: August 4, 2026 Claude Code Version: 2.1.220 Sources: