From code-practices
Structured workflow for non-trivial tasks. Read files first, create detailed plan, get approval, then implement. Prevents premature coding.
npx claudepluginhub joshuarweaver/cascade-code-general-misc-2 --plugin rahulsub-code-practices-pluginThis skill uses the workspace's default tool permissions.
Use when starting any non-trivial implementation task. This workflow prevents premature coding and significantly improves outcomes for complex problems.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
Use when starting any non-trivial implementation task. This workflow prevents premature coding and significantly improves outcomes for complex problems.
From Anthropic's Claude Code best practices: "Research and planning before implementation dramatically outperforms jumping to code."
Jumping straight to writing code without understanding:
Read relevant files first without writing any code.
Read the authentication module and understand how sessions are currently handled.
Don't write any code yet.
Key activities:
Request a detailed plan. Use "think" to trigger extended reasoning.
Think through how we should implement the new caching layer.
Consider:
- What components need to change
- What order to make changes
- What could go wrong
- How to test each part
Write out a detailed plan before any implementation.
The plan should include:
Review the plan. Ask questions. Identify risks.
Don't proceed until you're confident the plan is sound.
Questions to ask:
Now implement, following the approved plan.
Implement the plan we discussed. Start with [first file] and work through the list.
Benefits of coding after planning:
Review changes, write clear commit message, verify tests pass.
## Task: [Description]
### Phase 1: Explore
Please read and understand these files before doing anything else:
- [file1]
- [file2]
- [relevant directory]
Summarize how [relevant system] currently works.
### Phase 2: Plan
Think through the implementation approach. Write a detailed plan including:
- Files to modify
- Order of changes
- Testing approach
- Potential risks
### Phase 3: Wait for Approval
Stop after the plan. I'll review before you implement.
| Task Complexity | Explore | Plan | Approve | Code |
|---|---|---|---|---|
| Trivial fix | Skip | Skip | Skip | Do |
| Simple feature | Brief | Brief | Quick | Do |
| Complex feature | Thorough | Detailed | Careful | Do |
| Architecture change | Deep | Comprehensive | Multiple reviews | Do |