retrospective-codify

Extract trial-and-error insights and codify them as ast-grep rules, skills, or CLAUDE.md instructions.

416|6|Updated Apr 24, 2026
Ready to run
npx skills add https://github.com/mizchi/skills --skill retrospective-codify-mizchi
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: retrospective-codify
Source: https://github.com/mizchi/skills/tree/main/retrospective-codify
Command: npx skills add https://github.com/mizchi/skills --skill retrospective-codify-mizchi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? After solving a problem through trial and error, you often discover patterns worth capturing—rules, workflows, or guidelines that prevent repeating the same mistakes. This Skill helps you systematically extract those insights and embed them where they will actually be followed: as static lint rules, documentation rules, or reusable skills. Without this, insights stay in your head and disappear. ## Core Features & Use Cases - Failure-Success Pairing: Identify what failed first, what finally worked, and why—extracting the "should-have-known" insight. - Deduplication: Cross-check against existing rules and skills to prevent bloat and conflicting guidance. - Destination Classification: Route insights to ast-grep rules (machine-detectable), CLAUDE.md (short directives), or new skills (multi-step procedures). - Use Case: You spent hours debugging because a codebase used Array.from(set).length instead of set.size. Extract this as an ast-grep rule so it never happens again. ## Quick Start When a task ends or the user says "codify this lesson," describe what failed first, what worked finally, and the bridging insight to classify it into a rule, skill, or documentation update.

Frequently Asked Questions about retrospective-codify

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
When should I use retrospective-codify versus just documenting a fix?▼

Use this skill when the insight is general enough to apply to future tasks—a pattern, not a one-off. If it is project-specific and never repeating, a commit message is enough. If the same mistake could happen again, codify it.

What is the difference between an ast-grep rule, a CLAUDE.md rule, and a skill?▼

ast-grep rules catch mistakes at the syntax level (use `set.size` not `Array.from`). CLAUDE.md rules are short directives ("always use pnpm v10"). Skills are multi-step workflows with judgment calls. Choose based on whether the insight is machine-detectable, a one-liner, or a procedure.

How do I check for duplicate rules before proposing a new one?▼

Extract 2–3 search keywords from the insight and grep them across `~/.claude/skills/*/SKILL.md`, `~/.claude/CLAUDE.md`, and `<project>/CLAUDE.md`. If an existing entry fully covers the insight, mark it as duplicate and skip the proposal.

What if the insight is too specific or project-dependent to codify?▼

Not every lesson becomes a rule. If the insight applies only once or is too narrow, keep it as a session note or commit message. Codifying only general, repeatable patterns keeps your rule collection maintainable.

Can I codify partial insights if part of it already exists?▼

Yes. If an existing rule covers part of your insight, propose appending the new portion to that rule rather than creating a duplicate. This is marked as a "partial overlap" in the dedup results.

Who should approve the final codified rule before it goes into the codebase?▼

Always present the proposal to the user first, show the diff, and get explicit approval. Do not silently modify CLAUDE.md or skills. Once approved, write it out.