Creates, updates, or optimizes CLAUDE.md files following Anthropic best practices. Use when user requests creating, updating, improving, or optimizing CLAUDE.md files for project context, coding standards, or persistent memory.
View on GitHubdstoic/skills/edit-claude/SKILL.md
February 3, 2026
Select agents to install to:
npx add-skill https://github.com/digital-stoic-org/agent-skills/blob/main/dstoic/skills/edit-claude/SKILL.md -a claude-code --skill edit-claudeInstallation paths:
.claude/skills/edit-claude/# Instructions for Managing CLAUDE.md Files ## MANDATORY Validation (CREATE only) **STOP**: Before creating new CLAUDE.md, answer YES/NO for each: - **Q1: Persistent** (not temporary)? [YES/NO] - **Q2: Frequently referenced** (coding standards, workflows)? [YES/NO] - **Q3: Concise** (avoid verbose docs)? [YES/NO] - **Q4: Non-sensitive** (no credentials/tokens)? [YES/NO] **If ANY answer is NO:** → STOP. Explain why inappropriate. → Recommend alternatives: README.md (docs), environment variables (secrets), direct request (one-time), .claude/rules/ (detailed guidelines) → EXIT immediately. **If ALL answers are YES:** → Proceed to organization decision below. --- ## Determine Action Type **CREATE**: New CLAUDE.md file requested **UPDATE**: Modify existing CLAUDE.md (keywords: "update", "add", "modify", "change") **OPTIMIZE**: Improve token efficiency (keywords: "optimize", "reduce tokens", "improve") ## Creating New CLAUDE.md Files 1. **Gather context**: Ask user for project details if missing: - Coding standards (indentation, naming conventions) - Build/test/deployment commands - Architectural patterns - Security requirements 2. **Organize around WHAT/WHY/HOW**: - **WHAT**: Tech stack, codebase map, key packages - **WHY**: Project purpose, component responsibilities - **HOW**: Build/test/deploy commands, verification methods 3. **Determine organization strategy** (memory hierarchy): **Main CLAUDE.md** (universal, <200 tokens ideal, <500 acceptable): - Build/test/deploy commands - Universal code style applying to all files - Critical patterns used everywhere - Cohesive project-wide conventions (Git, Security, Planning, Style) - `CLAUDE.md` in project root (shared via git) **.claude/rules/** (modular, 100-300 tokens each): - Path/language-specific files (auto-loaded): `python.md`, `javascript.md` - Domain-specific patterns: `frontend/`, `backend/` - Path-specific rules with frontmatter (see reference.md)