md-improve
Improve Instructions
Analyze conversation patterns to identify improvements for CLAUDE.md instruction files.
Objective
Review how the conversation has gone to find opportunities where better instructions would have helped Claude perform more effectively.
When to Use
- Claude keeps making the same mistake despite corrections
- You've stated a preference 2+ times and it's not sticking
- A workflow or tool preference should be codified
- You want to consolidate scattered guidance into CLAUDE.md
When NOT to Use
- For initial CLAUDE.md creation or template-based audits — use
md-audit - For full session retrospectives with code/architecture insights — use
session-review - For one-off corrections that won't recur — just tell Claude directly
Process
Phase 1: Analyze Conversation
Review the conversation history for:
- Repeated corrections - "No, I meant..." or "Remember to..."
- Manual guidance - Workflows explained step-by-step that could be documented
- Preference statements - "I prefer X" or "Always use Y"
- Misunderstandings - Where Claude made wrong assumptions
- Undocumented patterns - Tools or workflows used frequently
Track each potential improvement identified.
Phase 2: Review Current State
Read the relevant CLAUDE.md file(s):
~/.claude/CLAUDE.mdfor global instructions- Project-level
CLAUDE.mdfor project-specific instructions
Understand what's already documented to avoid duplication and identify gaps.
Phase 3: Propose Improvements
Present findings to the user using AskUserQuestion:
For each improvement, explain:
- Issue: What pattern was observed
- Proposal: Specific text to add or change
- Rationale: Why this would help
Group related improvements and let the user select which to implement.
Phase 4: Implement
For each approved improvement:
- Use Edit to modify the appropriate CLAUDE.md
- Place new content in the logical section
- Maintain existing formatting and style
Summarize all changes made.
Guidelines
- Ground suggestions in actual conversation patterns, not hypotheticals
- Prefer specific, actionable instructions over vague guidance
- Keep instructions concise - Claude is smart, it doesn't need over-explanation
- Preserve the user's existing voice and style
- Don't add instructions for one-off situations
Phase 5: Verify
After all edits:
- Read back the modified CLAUDE.md section(s) to confirm changes match approvals
- Run
bunx prettier --checkon modified files to ensure formatting is clean - Show a summary diff of what changed
Output
End with a summary of:
- Changes made to CLAUDE.md
- Patterns identified but not yet addressed (for future consideration)
Reference Files
Detailed analysis patterns and examples:
- analysis-guide.md — Correction patterns, preference signals, workflow patterns, anti-patterns
- examples.md — Before/after examples of instruction improvements
More from philoserf/claude-code-setup
improve-instructions
>-
28map-codebase
>-
16uv-package-manager
Expert in uv, the ultra-fast Python package manager and project tool. Use when setting up Python projects, managing dependencies, creating virtual environments, installing Python versions, working with lockfiles, migrating from pip/poetry/pip-tools, or optimizing Python workflows with uv's blazing-fast performance.
5organize-folders
Provides guidance on organizing folder structures and file system layouts for any project. Use when planning project organization, reorganizing messy directories, setting up folder hierarchies, designing directory layouts, structuring repositories, cleaning up files, suggesting folder structures, establishing naming conventions, or when you need help with folder structure or file organization. Helps with writing projects, code projects, document collections, or any file organization task.
3editing-assistant
Text editing assistant with specialized modes for typos, grammar, flow, headings, citations, and more. Use when editing, proofreading, or improving written content including documentation and markdown files.
3pdf
Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, handling forms, and OCR on scanned documents. Use when filling PDF forms, extracting data from PDFs, merging or splitting documents, creating PDFs programmatically, processing documents at scale, or performing OCR on image-based PDFs.
2