Prompts / Coding & Software Engineering

Claude Code prompt maker

This prompt turns a feature idea into an implementation plan and working code grounded in your actual stack. Use it when you need an AI coding partner to make careful changes without guessing at your codebase.

PromptOpen ChatGPTOpen Claude
Act as a senior engineer joining an existing project. Help me design and implement [FEATURE OR BUGFIX] in [TECH STACK] using the relevant codebase context below.

Project context: [CODEBASE CONTEXT]
Constraints: [CONSTRAINTS]
Acceptance criteria: [ACCEPTANCE CRITERIA]

First, inspect the context and state your assumptions. Ask up to 3 clarifying questions only if a required detail prevents a safe implementation; otherwise proceed.

Produce the response in this order:
1. A concise implementation plan naming the files, modules, data flow, and external interfaces likely to change.
2. Any risks or decisions, including backward compatibility, authentication/authorization, validation, performance, and migration concerns that apply.
3. Complete code changes as file-by-file patches or clearly labeled full files. Preserve existing project conventions, types, error handling, logging, and dependency choices. Do not introduce a new library unless it solves a stated requirement and explain why.
4. A test plan, followed by test code where the supplied context makes that possible. Cover the happy path, invalid input, boundary values, failure from dependencies, and the regression this change could create.
5. Commands to run locally and a short manual verification checklist.

Do not invent APIs, files, environment variables, package versions, or behavior that is not supported by my context. If information is uncertain, mark it as an assumption and offer the smallest safe alternative.

Before answering, self-check that every acceptance criterion maps to an implementation or test, and flag any code reference you could not verify from the material I provided.

Fill in

PlaceholderWhat to enterExample
[FEATURE OR BUGFIX]Describe the user-visible behavior to add or the defect to correct.Add CSV export for filtered invoices on the admin billing page.
[TECH STACK]List the language, framework, database, test runner, and deployment context that matter.TypeScript, Next.js 15 App Router, Prisma/PostgreSQL, Vitest, Playwright.
[CODEBASE CONTEXT]Paste relevant files, directory structure, error output, API contracts, and existing conventions.Invoice filters are in app/admin/invoices/page.tsx; API routes use requireAdmin(); Invoice has number, customerName, totalCents, status, issuedAt.
[CONSTRAINTS]State compatibility, security, performance, dependency, deadline, or scope limits.No new packages; export at most 10,000 rows; preserve current filter semantics; UTC dates in the file.
[ACCEPTANCE CRITERIA]List observable conditions that must be true for the work to be complete.Export contains only visible filtered records, uses headers, escapes commas and quotes, and rejects non-admin requests.

How to use

  1. Paste the relevant files and exact failure output, not a broad description of the repository.
  2. Replace every bracketed input, especially the acceptance criteria and constraints.
  3. Check that proposed file paths and APIs exist before applying a patch.
  4. Follow up with: "Revise the patch to fit this existing test and explain the smallest change needed: [TEST OR ERROR]."

Variations

Bug investigation

Use when you have a reproducible failure but do not yet know the cause.

Variation
Act as a senior debugger for [TECH STACK]. Investigate [OBSERVED FAILURE] using this evidence: [ERRORS AND REPRO STEPS]. Relevant code is: [CODE CONTEXT]. Give a ranked root-cause analysis, identifying what each clue supports and what it does not. Then propose the smallest safe fix as a file-by-file patch and tests that fail before the fix and pass after it. Do not assume logs, services, or files not shown. Self-check that the proposed fix explains the reproduction steps and does not mask the underlying error.

Code review

Use before merging a change that affects production behavior.

Variation
Review this proposed change for [SYSTEM AREA]: [PATCH OR FILES]. The intended behavior is [INTENDED BEHAVIOR], and these are the project rules: [PROJECT CONVENTIONS]. Return findings ordered by severity: blocker, high, medium, then nits. For each material finding, cite the relevant code, explain the failure scenario, and give a concrete correction. Check correctness, authorization, input validation, concurrency, error handling, tests, and backward compatibility where relevant. Do not invent defects. End with a merge recommendation and unanswered questions.

Technical plan

Use before coding a feature that spans several components or services.

Variation
Create an implementation-ready technical plan for [FEATURE] in a [TECH STACK] product. Context: [CURRENT ARCHITECTURE]. Requirements: [REQUIREMENTS]. Constraints: [CONSTRAINTS]. Produce a sequence of changes by component, API and data-model changes, migration and rollout approach, observability, and a test matrix. Identify decisions that need confirmation rather than choosing silently. Avoid implementation code. Self-check that every requirement has an owner component and every state-changing operation has authorization, validation, and failure behavior defined.

Tips

  • Give the model the existing interface and data shape before requesting code; it prevents believable but incompatible API calls.
  • Write acceptance criteria as observable outcomes, such as export encoding, authorization behavior, and row limits, rather than “make it production-ready.”
  • Ask for a regression test tied to the original bug or feature rule; a passing happy-path test alone rarely protects the change.
  • Treat dependency additions as architectural decisions and require an explanation when one is proposed.

FAQ

Can this prompt generate a complete feature?

It can produce a strong patch when you provide the relevant files and interfaces. For a large feature, use the plan first and implement in small, testable slices.

What codebase context should I include?

Include the files that own the behavior, nearby tests, types or schemas, and the exact error or expected API contract. Avoid pasting unrelated generated files.

Should I let the AI choose a library?

Only if you state the decision criteria. Otherwise, ask it to use existing dependencies first and label any proposed addition.

Related prompts

All Coding & Software Engineering prompts →

Get a few prompts like this every week

Something Big is a free AI newsletter read by 70,000+ professionals. About three short emails a week with prompts and tools that work, plus what changed in AI and what to do about it.