prompt-patterns
Skill153 starsChanged 8 months agoMITView on GitHub
Practical prompt patterns and techniques for effective Claude Code usage. Reference when crafting prompts, planning workflows, or debugging interactions.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- flurdy/agent-skillstheir own version, first seen Nov 1, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- flurdy/agent-skills★ 9same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- rules/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- backend-patternsSkill
- clickhouse-ioSkill
- cloudnative-writing-baselineSkill
- coding-standardsSkill
- eval-harnessSkill
- frontend-patternsSkill
- project-guidelines-exampleSkill
- security-reviewSkill
- strategic-compactSkill
- tdd-workflowSkill
- verification-loopSkill
- web-content-extractionSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Instead of writing a spec yourself, let Claude interview you:
- Distinctive: line 29
After implementation, challenge Claude to prove correctness:
- Distinctive: line 40
When a fix works but feels hacky:
- Distinctive: line 56
When context is getting heavy:
- Distinctive: line 70
Use Plan Mode for work that benefits from an explicit reviewed plan before changes.
- Distinctive: line 104
Before starting a new task in the same session:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Prompt Patterns for Claude Code
Discovery Patterns
Interview-Driven Spec
Instead of writing a spec yourself, let Claude interview you:
Start with a minimal description of what I want to build, then interview me
using AskUserQuestion tool. Ask one question at a time until you have enough
information to write a complete specification. Then create the spec document.Creates better specs than writing them manually. Claude asks questions you wouldn't think of.
Codebase Understanding
Read the entire codebase and explain the architecture to me as if I'm a new
team member. Focus on: data flow, key abstractions, and non-obvious design decisions.Quality Challenge Patterns
Grill Mode
After implementation, challenge Claude to prove correctness:
Grill me on these changes and don't make a PR until I pass your test.or
Prove to me this works. Diff between main and this branch, explain every change,
and identify any edge cases we missed.Elegant Redo
When a fix works but feels hacky:
Knowing everything you know now, scrap this and implement the elegant solution.Claude's second attempt is almost always better because it has full context of the problem.
Self-Critique
Review the code you just wrote as a senior engineer. Be harsh.
What would you change if this was going into a production system
serving 10 million users?Efficiency Patterns
Subagent Offloading
When context is getting heavy:
Use subagents to investigate [topic]. Keep the main context clean.Explicitly telling Claude to use subagents prevents context pollution.
Batch Operations
Process these 5 files in parallel using subagents. Each subagent handles one file.
Collect all results and present a unified summary.Deep Reasoning
For complex design and architecture decisions:
- Use Plan Mode for work that benefits from an explicit reviewed plan before changes.
- Extended thinking is controlled by the harness (thinking toggle / effort settings), not by magic keywords in the prompt.
- In the prompt itself, ask for depth in natural language, e.g.:
Before implementing, compare alternative designs and their trade-offs.Debugging Patterns
Bug -> Fix (No Micromanagement)
Here's the bug: [paste error/screenshot]. Fix it.Claude fixes most bugs by itself. Don't prescribe the solution.
Visual Debugging
Paste a screenshot of the issue, then:
Look at this screenshot. The layout is broken. Fix it.Session Management Patterns
Phase-wise Gated Plan
Create a phase-wise plan for this feature. Each phase must have:
1. Clear deliverable
2. Test criteria (unit, integration, or manual verification)
3. Rollback plan if verification fails
Do not proceed to the next phase until the current phase passes all tests.Context-Aware Restart
Before starting a new task in the same session:
/clearAfter heavy investigation:
/compact Preserve the key findings about [topic] and the implementation planRename and Resume
Name important sessions for easy retrieval:
/rename [feature-name implementation v2]Later: claude --resume to pick up where you left off.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

