Kazi Rahamatullah
Kazi Rahamatullah
AboutProjectsBlogContact
UsesBooks
ResumeView CV
Kazi Rahamatullah

© Copyright 2026 Kazi Rahamatullah

AboutProjectsBlogBooksUses
Twitter/XGitHubProduct HuntCodeSandbox
Back to Blog
Claude CodePrompt EngineeringAI DevelopmentVibe CodingCursorWorkflowProductivity

Claude Code Prompt Playbook — 15 Production-Ready Prompts

15 production-ready Claude Code prompts for planning, building, testing, securing, and maintaining software projects — with placeholders you can drop straight into your workflow.

Jul 29, 202613 min read

Introduction

Prompt quality is the multiplier on AI output. A mediocre codebase given to a great prompt produces great code. A great codebase given to a vague prompt produces guesswork.

This playbook contains 15 production-ready prompts that cover the full software lifecycle — from writing a PRD on day one to turning a repetitive task into a reusable skill. Each prompt has a clear structure, fills in the context the model actually needs, and forces explicit approval before risky changes.

Replace every placeholder in brackets before using. Keep your project-specific rules in CLAUDE.md so every session inherits them automatically.

Quick index

#Section
1The 15 Prompts at a Glance
2Planning Prompts
3Building Prompts
4Security & Debugging Prompts
5Maintenance Prompts

The 15 Prompts at a Glance

#PromptCategoryWhen to use
01Write a Full PRDPlanningBefore any feature work
02Create Your CLAUDE.mdPlanningDay one of a new project
03Ultra Plan ModePlanningBefore any complex task
04Spec-Driven DevelopmentPlanningBefore implementation
05Full UI & UX Design BriefPlanningBefore building any screen
06Implementation PlanBuildingAfter spec is approved
07Wire Up an MCP ServerBuildingWhen connecting a service
08Connect Your DatabaseBuildingWhen adding a DB layer
09Find Security GapsSecurityBefore any release
10Debug an Error FastSecurityWhen something breaks
11E2E Test Your ApplicationMaintenanceAfter a feature ships
12Clean Up Dead CodeMaintenanceBefore a major refactor
13Write Clean Git CommitsMaintenanceBefore every merge
14Hooks as GuardrailsMaintenanceOnce per project setup
15Turn a Task into a SkillMaintenanceWhen you repeat something 3+ times

Tip

Use the interactive browser below to filter prompts by category and copy any prompt to your clipboard with placeholders intact.

Prompt Playbook Browser

Browse all 15 prompts by category — click any to preview and copy with placeholders intact.

←

Select a prompt to preview it

Replace every [PLACEHOLDER] with your project-specific values before using a prompt.


Planning Prompts

Good planning prompts do one thing: they force the AI to think before it acts. Every planning prompt in this playbook ends with an explicit stop — the model shows you its work and waits for approval before touching a file.

01 — Write a Full PRD

md
Write a complete PRD for the feature below.
 
Feature: [DESCRIBE FEATURE]
Users: [WHO USES IT]
Stack: [YOUR STACK]
 
Include:
• Problem statement + success metrics
• User stories with acceptance criteria
• Scope: what ships in v1, what does not
• Data model changes
• Edge cases + failure states
• Open questions for me to answer
 
Keep it under 2 pages. Be specific, no filler.
Save it as docs/prd-[feature].md so every later prompt can reference it.

02 — Create Your CLAUDE.md

md
Scan this entire codebase, then generate a CLAUDE.md.
 
Include:
• What this project is, in 2 lines
• Tech stack + the versions that matter
• Commands: [DEV / BUILD / TEST / LINT]
• Architecture: where things live and why
• Code conventions you actually detect in the code
• Hard rules: [YOUR NON-NEGOTIABLES] — what to never touch without asking
• Gotchas a new engineer would hit in week 1
 
Write rules as short imperatives. Nothing generic — only what is true for THIS repo.
If you are unsure about a rule, ask me instead of inventing it.

Note

CLAUDE.md is the equivalent of AGENTS.md in Cursor. Once it exists, every prompt in that session inherits your stack, conventions, and rules automatically — you never repeat yourself.

03 — Ultra Plan Mode

md
Enter plan mode. Do NOT write any code yet.
 
Task: [PASTE TASK]
Constraints: [DEADLINE / STACK / NO-GO ZONES]
 
1. Read every file this task touches, list them with one line on what each does today.
2. Map current behavior vs target behavior.
3. Propose 2–3 approaches with real tradeoffs: complexity, risk, blast radius.
4. Pick one and justify it in 3 lines.
5. Break it into steps small enough to verify one at a time, each with its own check.
6. List risks + the exact rollback for each.
7. Flag anything touching [AUTH / PAYMENTS / PROD DATA] for my explicit sign-off.
 
Then stop. Show me the plan and wait for my approval before touching a single file.

04 — Spec-Driven Development

md
We build specs first. Write a spec for: [FEATURE]
 
Context: [WHO USES IT + WHY NOW]
 
Spec format:
• Behavior: given / when / then, every case — happy path, edge cases, failure states
• API contract: inputs, outputs, error shapes, status codes
• Data: schema changes + migrations needed
• UI states: loading, empty, error, success
• Non-goals: what this spec deliberately skips
• Acceptance checklist I can verify line by line
 
After I approve the spec, implement EXACTLY the spec.
If reality forces a deviation, stop, update the spec, get my approval, then continue.
The spec is the source of truth, not the code.

05 — Full UI & UX Design Brief

md
Create a full UI/UX design brief for: [SCREEN OR FLOW]
 
Audience: [USERS]
Brand: [COLORS / FONTS / VIBE]
 
Deliver:
• User journey through the flow, step by step
• Layout per screen: hierarchy, spacing, breakpoints
• Component inventory with every state — hover, empty, error, loading
• Typography + color tokens
• Motion: what animates, duration, easing
• Accessibility notes
 
Study patterns from [2–3 PRODUCTS YOU ADMIRE] for direction. Never copy them.

Building Prompts

Building prompts sequence work so the app stays runnable at every step. No big-bang implementations — each step is small enough to verify before moving on.

06 — Implementation Plan

md
Create an implementation plan for: [APPROVED SPEC / PRD]
 
Rules:
• Sequence steps so the app compiles and runs after EVERY single step
• Each step: files touched, what changes, how I verify it works
• Flag steps needing a migration or new dependency
• Put the riskiest unknowns first
• Size each step: [S / M / L]
 
Output a numbered build sequence I can run one step at a time.
Wait for my "go" between steps.

07 — Wire Up an MCP Server

md
Wire up an MCP server for: [SERVICE / API]
 
What I need it to do: [JOBS TO BE DONE]
 
1. Check for an official or well-maintained existing server first — name your source.
2. If one exists: exact install command + the .mcp.json config, scoped to this project.
3. If not: scaffold one with the MCP SDK — tools, auth, error handling, typed responses.
4. Add ONLY the tools I will actually use: [LIST]
5. Wire secrets through [ENV VARS], never hardcode keys in the config file.
6. Verify the connection and call one tool end to end; show me the output.
7. Document each tool in 1 line so future sessions know when to reach for it.

08 — Connect Your Database

md
Connect this app to [POSTGRES / SUPABASE / YOUR DB].
 
• Pick the client that fits this stack. Justify it in 1 line.
• Env vars: name them, add to .env.example, never commit real values.
• Schema: tables for [ENTITIES] with types, relations, and indexes for [TOP QUERIES].
• Create + run the migrations, and show me the rollback for each one.
• One typed query helper per table — no raw SQL scattered through components.
• Access rules / row-level security if this is [MULTI-TENANT].
• Connection pooling if we are serverless.
 
Then prove it: seed one row, read it back, show me the output.

Warning

Always review the generated migration SQL before running it. A migration that drops a column or changes a type with data in it cannot be undone without a backup. The prompt asks for rollbacks — read them.


Security & Debugging Prompts

These two prompts cover the two highest-stakes situations in any project: shipping a feature with a hidden vulnerability, and not understanding why production is broken.

09 — Find Security Gaps

md
Audit this codebase for security gaps. Attack it like you want in.
 
Focus areas: [AUTH / PAYMENTS / USER DATA]
 
Check:
• Secrets in code, config, or git history
• Injection: SQL, XSS, command, path traversal
• Auth: routes missing checks, weak sessions, broken redirects
• IDOR: can user A read user B's data?
• File uploads + input validation on every form
• Dependency CVEs — run the audit, read it
• Rate limiting on [EXPENSIVE ENDPOINTS]
• What leaks through error messages and logs
 
Rank findings by severity with exact file:line.
Fix the critical ones now, list the rest as tickets with effort estimates.

10 — Debug an Error Fast

md
Debug this error. Do NOT guess.
 
Error: [PASTE FULL ERROR + STACK TRACE]
When it happens: [STEPS TO REPRODUCE]
 
1. Read the stack trace, open the exact files involved.
2. State expected vs actual behavior in 1 line.
3. List 3 hypotheses, ranked by likelihood.
4. Prove or kill each one with logs or a tiny test — evidence, not vibes.
5. Fix the root cause, not the symptom.
6. Search the repo for the same pattern — if it breaks here, it breaks elsewhere.
7. Add a regression test that fails without the fix.
8. Tell me in 2 lines why it broke and why it can never break this way again.

Note

The key phrase is "Do NOT guess." Without that constraint, the model will confidently suggest plausible but wrong fixes. Forcing hypothesis + evidence turns debugging from a gamble into a process.


Maintenance Prompts

Maintenance prompts keep your codebase clean, your history readable, and your workflow fast. Run them regularly — not just when things are already broken.

11 — E2E Test Your Application

md
Write Playwright E2E tests for: [FLOW]
 
Stack: [YOUR STACK]
CI: [GITHUB ACTIONS / OTHER]
 
• Money paths first: [SIGNUP / CHECKOUT / CORE ACTION]
• Test what the user sees, not implementation details
• Selectors: roles and labels, never brittle CSS chains
• One unhappy path per flow: bad input, network failure, expired session
• Tests stay independent — any order, zero shared state, each seeds its own data
• Headless in CI, headed locally for debugging
• Screenshots + traces on failure only
 
Run the suite, show me the results, fix what fails,
and tell me what the suite still does NOT cover.

12 — Clean Up Dead Code

md
Find and delete dead code in this repo.
 
Scope: [WHOLE REPO / SPECIFIC FOLDER]
 
• Unused exports, components, hooks, utils
• Unreachable branches + commented-out blocks
• package.json dependencies nothing imports
• Stale feature flags stuck always-on or always-off
• Duplicate logic that should merge into one
• Dead CSS classes and unused assets
 
Verify with a search before EVERY deletion — dynamic imports and string references count.
Delete in small commits, run [BUILD + TESTS] after each one.
Report total lines removed + anything you were not 100% sure about.

13 — Write Clean Git Commits

md
Commit my staged changes properly.
 
Convention: [CONVENTIONAL COMMITS / YOUR FORMAT]
 
• Split unrelated changes into separate commits
• Format: type(scope): what changed and why — feat / fix / refactor / chore / docs / test
• Subject under 50 chars, imperative mood
• Body explains the WHY, wrapped at 72
• Reference the ticket: [TICKET-ID]
• Never mix a refactor with a behavior change in one commit
• Never commit [SECRETS / .ENV / GENERATED FILES]
 
Show me the plan — files per commit + messages — before you commit anything.
Then commit one at a time so I can stop you between them.

14 — Hooks as Guardrails

md
Set up Claude Code hooks as guardrails here.
 
Stack: [YOUR STACK + PACKAGE MANAGER]
 
• PostToolUse: run [LINT + TYPECHECK] after every file edit, feed errors straight back
• PreToolUse: block edits to [PROTECTED PATHS: MIGRATIONS, .ENV, PROD CONFIG]
• Stop: run [TEST SUITE] before a session ends
• Notification: ping me with [SOUND / SLACK] when my input is needed
 
Write the hook scripts + the settings.json entries.
Keep each script under 20 lines and exit non-zero with a clear message
so the agent knows exactly what to fix.
Then trigger each hook on purpose and show me it firing.

15 — Turn a Task into a Skill

md
Turn this repetitive task into a Claude Code skill.
 
The task I keep doing: [DESCRIBE TASK + STEPS]
 
• Create .claude/skills/[NAME]/SKILL.md
• Frontmatter: name + description with the exact trigger phrases I actually say
• Body: numbered workflow, my conventions, edge cases
• What it should ask me for vs infer on its own
• What "done" looks like
 
Then dry-run the skill on a real example and refine until the output matches
how I do it by hand.

How to Use This Playbook

  1. Replace every [PLACEHOLDER] with your project-specific values before sending any prompt
  2. Keep CLAUDE.md updated — it is the context every prompt inherits. If you change your stack or conventions, update it first
  3. Always approve before risky changes — prompts 03, 06, 08, 09, and 13 all end with an explicit stop. Do not skip past them
  4. Chain prompts in order — PRD → Architecture → Rules → Implementation Plan produces better output than jumping straight to implementation

Tip

Start with prompt 02 on any new project. A solid CLAUDE.md makes every other prompt in this playbook 2× more effective because the model never has to guess your stack, conventions, or constraints.


Summary

CategoryPromptsWhat they protect you from
Planning01–05Building the wrong thing
Building06–08Building it the wrong way
Security09–10Shipping holes and staying stuck
Maintenance11–15Entropy, debt, and repetition

Good prompts do not replace good judgment — they make good judgment faster. Use these as starting points, adapt them to your project, and iterate on anything that does not produce the output you need.

Share this article

XLinkedInFacebook
Kazi Rahamatullah

Written by

Kazi Rahamatullah

FullStack Developer

X / TwitterGitHubLinkedIn

Subscribe to my newsletter

Stay up to date and get notified when I share new contents.

No spam ever, unsubscribe anytime