Use when starting any task in a project - keeps CLAUDE.md instruction file current with high-level project state, prompts for init if missing, adds reflection todo before work to ensure documentation stays updated
Installation
Details
Usage
After installing, this skill will be available to your AI coding assistant.
Verify installation:
npx agent-skills-cli listSkill Instructions
name: self-maintaining-claude-md description: Use when starting any task in a project - keeps CLAUDE.md instruction file current with high-level project state, prompts for init if missing, adds reflection todo before work to ensure documentation stays updated
Self-Maintaining CLAUDE.md
Overview
CLAUDE.md is your project's instruction file for Claude. It must stay current with the project's high-level state.
Core principle: Before starting implementation, check if you created the "Reflect on changes and update CLAUDE.md" todo. If not, create it now β then start working.
Mandatory Workflow
1. Check CLAUDE.md Exists
Before ANY task, check if CLAUDE.md exists in the project root.
If missing:
- STOP
- Prompt user: "No CLAUDE.md found. Please run the init command to create it."
- DO NOT create it yourself
- DO NOT continue without it
Why: User-initialized CLAUDE.md ensures proper setup and user preferences.
2. Add Reflection Todo BEFORE Work
Before starting any implementation task, check if you created the "Reflect on changes and update CLAUDE.md" todo. If not, create it now at the END of your todo list β then start working.
Why at the end: It runs AFTER all implementation work completes, so you update documentation based on actual changes.
Why before starting: "Later" means "forgotten". Adding the todo takes 10 seconds. Forgetting to update CLAUDE.md wastes hours of future work.
3. Process Reflection Todo
When processing the reflection todo, maintaining CLAUDE.md means ADD, UPDATE, or REMOVE content as needed.
Three types of maintenance:
- ADD - New high-level information that didn't exist before
- UPDATE - Modify existing content that has changed
- REMOVE - Delete content that is no longer relevant or accurate
β DO include:
- High-level architectural decisions (GraphQL vs REST, Redux vs Context)
- Project-wide patterns (authentication approach, error handling strategy)
- Technology choices (frameworks, major libraries)
- Coding style preferences specific to this project
β DO NOT include:
- Component names (UserProfile, DashboardStats)
- File paths (src/components/auth/Login.tsx)
- Function names (useUserData, fetchStats)
- API endpoint paths (/api/users, /api/stats)
- Implementation details (3 reducers, 5 components)
Why: CLAUDE.md guides HOW to build, not WHAT was built. Implementation details belong in README, not instructions.
Important: CLAUDE.md shows ONLY current state.
When maintaining:
- DELETE all outdated information completely
- NO "Migration:" sections
- NO commented-out old patterns
- NO "Previously we used..." references
Why: CLAUDE.md is active instructions, not history. Git preserves history. Mixed old/new creates confusion.
Quick Reference
| Situation | Action |
|---|---|
| No CLAUDE.md exists | Prompt user to run init command |
| Starting new task | Add reflection todo at END of list BEFORE work |
| "Update docs" todo exists | ALSO add specific reflection todo at end |
| Updating CLAUDE.md | Only high-level patterns, delete legacy |
| Manager says skip process | Add reflection todo anyway (10 seconds) |
Common Mistakes
β "I'll create CLAUDE.md myself to save time"
Creating it yourself skips user preferences and proper setup. β Fix: Always prompt user to run init command.
β "Existing documentation todo covers it"
Generic todos get skipped or misinterpreted. β Fix: Add specific "Reflect on changes and update CLAUDE.md" todo.
β "Adding the todo is unnecessary overhead"
Skipping 10 seconds now costs hours later when CLAUDE.md is outdated. β Fix: Add the todo BEFORE work. Non-negotiable.
β "I can add the reflection todo later if needed"
"Later" means "forgotten". Always forgotten. β Fix: Add it at the END of your todo list, before starting research, planning, or coding.
β "Documentation can wait until after implementation"
Waiting means forgetting what decisions were made and why. β Fix: Add reflection todo now, process after implementation.
β "List all components and endpoints for completeness"
Implementation catalog doesn't help future work. β Fix: Only include high-level architectural decisions.
β "Keep old patterns as reference for context"
Mixed old/new instructions create confusion and errors. β Fix: Delete all legacy info. Git preserves history.
Red Flags - STOP
If you're thinking:
- "I can create CLAUDE.md myself"
- "Documentation todo already exists"
- "Adding this todo is ceremony/overhead"
- "I'll add it later if needed"
- "Let me list all the components I built"
- "Keep old patterns for historical context"
All of these mean: You're violating the workflow. Stop and follow the skill.
Why This Matters
Without reflection todo:
- You forget to update CLAUDE.md (always)
- Future work uses outdated instructions
- Hours wasted on wrong patterns
With reflection todo added BEFORE work:
- You remember to update CLAUDE.md
- CLAUDE.md stays current
- Future work follows correct patterns
The 10 seconds to add the todo saves hours of future confusion.
More by asermax
View allThis skill should be used when the user asks to "create an AUR package", "make a new AUR package", "scaffold AUR package", "create PKGBUILD", "package for AUR", or mentions AUR package creation with a specific source type (npm, rust, go, git, binary, appimage). Provides comprehensive guidance for creating Arch User Repository packages with proper structure, checksums, and git setup.
This skill should be used when the user asks to "bump AUR version", "update AUR package version", "bump package version", "update PKGBUILD version", "bump to latest version", or mentions version bumping for AUR packages. Handles automatic version detection, checksum updates, and git commit/push to AUR.
Use when you need to display a considerable amount of markdown content, or the user asks to display markdown in a browser, preview markdown files, or render markdown with styling. Trigger on requests like "show this markdown", "preview markdown", "display markdown in browser", "open markdown in browser", or any task requiring visual markdown rendering.
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
