/ Directory / Playground / Claude Code Best Practice
● Community shanraisshan ⚡ Instant

Claude Code Best Practice

by shanraisshan · shanraisshan/claude-code-best-practice

A practical playbook for moving from improvised prompts to engineering-grade Claude usage — plans, validations, hooks, postmortems.

claude-code-best-practice is a curated set of practices and templates for making Claude Code reliable in real work. Plan-then-execute prompting, validation hooks, postmortem formats, refactor checklists. Less of a 'magic auto-skill' and more of a discipline package — opt in, follow the steps, trust the output.

Why use it

Key features

Live Demo

What it looks like in practice

ready

Install

Author repository · Claude Skills documentation

Use Cases

Real-world ways to use Claude Code Best Practice

Force a plan-then-execute flow on a non-trivial change

👤 Devs tired of agents diving in without thinking ⏱ ~30 min intermediate

When to use: The change touches >3 files or has unclear scope.

Flow
  1. Plan
    Use claude-best-practice. Write a plan for refactoring auth: scope, sequence, risks, rollback. Do not write code yet.✓ Copied
    → Plan document; no code
  2. Critique
    Critique your own plan as if you were the senior reviewer. What's missing?✓ Copied
    → Critique with concrete fixes
  3. Execute
    Now execute step 1 of the revised plan. Stop after that step.✓ Copied
    → Step 1 done; awaits sign-off

Outcome: Refactor that lands cleanly because it was thought through.

Pitfalls
  • Plan too abstract — Insist on file-level granularity in the plan

Run a postmortem after an incident with the agent's help

👤 On-call / SREs ⏱ ~45 min intermediate

When to use: Something went wrong and you have to write it up.

Flow
  1. Gather
    Use the postmortem template. Pull the timeline from /logs and recent commits.✓ Copied
    → Timeline auto-built
  2. Five whys
    Walk through five-whys on the root cause. Distinguish proximate from contributing.✓ Copied
    → Tiered causes
  3. Action items
    Generate action items with owners and due dates.✓ Copied
    → AI list owners flagged for review

Outcome: Postmortem doc that helps next time, not blame.

Pitfalls
  • Auto-assigned owners are wrong — Always review owner assignments before publishing
Combine with: filesystem

Use the migration checklist for a framework upgrade

👤 Devs on a major upgrade (e.g., React 18 → 19) ⏱ ~60 min intermediate

When to use: Migration spans many files; you want to not miss steps.

Flow
  1. Adopt
    Apply the migration template to React 18→19. Customize for our codebase.✓ Copied
    → Tailored checklist
  2. Track
    Walk through the checklist, marking done/blocked for each item.✓ Copied
    → Progress log

Outcome: No 'we forgot to update X' surprises post-migration.

Pitfalls
  • Checklist gets stale — Update for each major version; the skill provides the skeleton

Combinations

Pair with other MCPs for X10 leverage

claude-best-practice-skill + everything-claude-code-skill

Combine two opinionated kits — best-practice prompting + research-first defaults

Use claude-best-practice for plan-then-execute; everything-claude-code for research-first.✓ Copied
claude-best-practice-skill + filesystem

Persist plans and postmortems alongside code

Save the plan to /docs/plans/auth-refactor.md before executing.✓ Copied

Tools

What this MCP exposes

ToolInputsWhen to callCost
make_plan task description Before any non-trivial change tokens
critique_plan plan After plan, before execute tokens
postmortem_draft logs, commits, summary After incidents tokens

Cost & Limits

What this costs to run

API quota
N/A
Tokens per call
Adds upfront cost (planning) but reduces redo loops
Monetary
Free
Tip
Skip the plan step on truly trivial changes

Security

Permissions, secrets, blast radius

Minimum scopes: Read access to logs/commits for postmortems
Credential storage: None
Data egress: None

Troubleshooting

Common errors and fixes

Plans are too generic

Provide concrete repo context; the skill anchors on whatever you give it

Conflicts with team's existing process

Adopt selectively — postmortem template alone is high-value

Alternatives

Claude Code Best Practice vs others

AlternativeWhen to use it insteadTradeoff
everything-claude-code-skillYou want a fuller bundle (memory, security, instincts)Bigger surface to learn
Hand-rolled CLAUDE.md rulesHighly bespoke workflowsMore to maintain

More

Resources

📖 Read the official README on GitHub

🐙 Browse open issues

🔍 Browse all 400+ MCP servers and Skills

Continue exploring

Related tools and workflows

Choose another guide for your workflow, or explore a collection.

Browse all topic collections → · See 29 new official additions →