1. Why Claude Outperforms for Developer Tasks

Claude isn't just a different interface on the same underlying model. For developer-specific work, it has three structural advantages that change what's possible when you prompt it well:

Advantage 1

200K Token Context

Claude can hold your entire service — controllers, models, tests, configs — in a single session without degradation. No more pastebin gymnastics. Ask Claude to review relationships across files you've pasted in full.

Advantage 2

XML-Structured Precision

Claude was trained on XML data. Wrapping code in <code> tags and specs in <requirements> tags produces meaningfully better output than free-form descriptions — fewer hallucinated APIs, tighter adherence to constraints.

Advantage 3

Nuanced Reasoning

Claude is less prone to the confident-but-wrong failure mode. It flags when a solution has tradeoffs, warns when it's uncertain about a library version, and pushes back on unrealistic constraints — making it safer for production code review.

Advantage 4

Claude Code Agentic Mode

Beyond the chat interface, Claude Code runs directly in your terminal with file system access — it reads, writes, and runs tests on actual files. The prompts in this guide work in both contexts; Claude Code unlocks the architecture and refactoring categories most fully.

Model note: All prompts are tested on Claude Sonnet 4 (April 2026) and Claude Code. For multi-file architecture tasks requiring deep reasoning, Claude Opus produces the highest quality output at higher cost. Claude Haiku is optimal for rapid, simple lookups and boilerplate generation.

2. Claude vs. ChatGPT for Coding: Honest Comparison

Both models are capable. The differences are real but nuanced. Here is an honest breakdown for developers choosing between them:

Capability Claude ChatGPT (GPT-4o)
Context window 200K tokens — holds entire codebases 128K tokens — good but smaller
Hallucinated APIs Lower rate — flags uncertainty more often Higher confident hallucination rate on obscure libraries
XML prompt structure Native advantage — trained on XML, responds better to structured tags Works with prose prompts; XML doesn't add as much
Code generation speed Sonnet: fast. Opus: slower. GPT-4o: faster for quick snippets
Plugin / tool ecosystem Claude Code + API tools Larger plugin ecosystem via ChatGPT store
Agentic coding (file access) Claude Code — first-class terminal tool Codex / Operator — newer, less mature
Architecture reasoning Claude Opus — better multi-step system design GPT-4o strong but less rigorous on tradeoff analysis
Security audit depth Claude — more thorough OWASP-style reasoning by default Requires more explicit security prompting
Prompt format preference XML tags — <role>, <code>, <requirements> Natural language prose — XML doesn't help as much

Bottom line: For developers who write structured prompts and work with large codebases, Claude wins on precision and context depth. For quick one-liner snippets where you don't want to invest in prompt structure, GPT-4o is slightly faster. Most senior engineers who've switched to Claude Code don't go back.

3. The Prompt Library: 50+ Claude Prompts for Developers

Eight categories. Each prompt includes the complete text formatted for copy-paste, what the prompt produces, and why it works at the structural level. All prompts use XML tag patterns that maximize Claude's output precision.

Code Generation 7 prompts
Production-grade function from spec Functions
<role>You are a senior [Python/TypeScript/Go] engineer who writes production-grade code. You prioritize readability, explicit error handling, and zero external dependencies unless absolutely necessary.</role> <task>Write a function that [describe what the function must do].</task> <requirements> - Language: [Python 3.11+ / TypeScript 5 / Go 1.22] - Input: [describe parameters, types, and any validation needed] - Output: [describe return type and format] - Edge cases to handle: [list 3-4 edge cases explicitly] - Performance constraint: [e.g., must handle 10K calls/second, or N/A] </requirements> <constraints> - No external libraries unless I list them as approved: [list] - Include JSDoc / docstring with type information - Include a comment explaining any non-obvious logic - Do NOT use magic numbers — use named constants </constraints>

What it does: Generates a production-ready function with explicit edge case handling, typing, and inline documentation.

Why it works: The explicit edge case list forces Claude to reason about error states rather than outputting happy-path-only code. "No magic numbers" catches a common issue with AI-generated code. The performance constraint signals when to optimize vs. when readable code is the right trade.

Class design with SOLID principles OOP
<role>You are a senior software architect who designs classes following SOLID principles. You flag when a design decision violates a principle and explain why.</role> <task>Design a class (or set of classes) for [describe the domain concept — e.g., "a payment processor that supports multiple gateways"].</task> <context> System this fits into: [describe surrounding architecture] Expected usage pattern: [how will this class be instantiated and called?] Future extension likely: [yes/no — if yes, describe what's expected to change] </context> <format> 1. Class diagram in pseudocode (interfaces + concrete classes) 2. Key design decisions — why each class boundary was drawn there 3. Which SOLID principles are load-bearing for this design 4. What the design sacrifices (trade-offs made) 5. Full implementation of the core class </format> <constraints> - Flag any place where I should split this further if the system grows - Do not default to inheritance — prefer composition unless inheritance is semantically correct </constraints>

What it does: Produces a principled class design with explicit reasoning about trade-offs — not just code, but design thinking.

Why it works: "Future extension likely" changes the design substantially — Claude will add more abstraction layers when extensions are expected. "Do not default to inheritance" prevents the composition-vs-inheritance mistake that Claude (like most engineers) leans toward when thinking fast.

REST API endpoint — full stack API
<role>You are a senior backend engineer building REST APIs for a production SaaS application.</role> <task>Implement the following API endpoint end-to-end.</task> <spec> Method: [GET/POST/PUT/DELETE] Path: [/api/v1/resource/:id] Auth: [JWT bearer / API key / none] Request body: [JSON schema or example] Response: [JSON schema or example] Error cases: [list the error scenarios and their HTTP status codes] </spec> <context> Framework: [Express / FastAPI / Gin / etc.] Database: [Postgres / MongoDB / etc.] ORM / query builder: [Prisma / SQLAlchemy / GORM / raw SQL] Existing patterns in the codebase: <patterns> [Paste 1 existing route handler here so Claude matches your style] </patterns> </context> <format> 1. Route handler with full validation 2. Service layer function (business logic separated from transport) 3. Database query (following existing ORM pattern) 4. Error handling for every listed error case 5. Any middleware needed </format>

What it does: Generates a complete, layered API endpoint that matches your existing code style — route, service, and data layers separated.

Why it works: Pasting an existing route handler is the single most impactful thing you can do for style consistency. Claude will match your naming conventions, error handling patterns, and response format exactly. The service layer separation prevents the "business logic in the route handler" mistake.

Data pipeline / ETL step Data Eng
<role>You are a data engineer building reliable ETL pipelines. You design for idempotency, observability, and graceful failure — not just the happy path.</role> <task>Write a pipeline step that [describe the transformation: e.g., "reads raw JSON events from S3, normalizes timestamps to UTC, filters out events older than 30 days, and writes to Postgres"].</task> <requirements> - Input source: [S3 / Kafka / local file / API] - Output destination: [Postgres / BigQuery / S3 / etc.] - Expected volume: [records/run and frequency] - Idempotency requirement: [yes — describe the unique key / no] - Failure behavior: [fail-fast / skip-and-log / dead-letter-queue] </requirements> <constraints> - Include logging at start, finish, and every error - Include a dry-run mode (--dry-run flag) that reads but does not write - Include a --limit N flag for local testing - Return a run summary dict: {processed, skipped, errors, duration_s} </constraints>

What it does: Produces an ETL step with built-in observability, a dry-run mode, and a structured run summary — the infrastructure that makes pipelines debuggable in production.

Why it works: The dry-run and limit flags are things developers always add later and wish they'd built first. The run summary dict makes it trivial to wire into a monitoring system. These constraints shift Claude from "code that works" to "code that operates."

CLI tool with argparse / Click Tooling
<role>You are a senior engineer who builds developer tools. Your CLIs are self-documenting, have clear exit codes, and handle errors gracefully.</role> <task>Write a CLI tool that [describe what the tool does].</task> <commands> [command-name] [args] — [what it does] [command-name] [args] — [what it does] </commands> <requirements> - Language: [Python with Click / Node with Commander / Go with Cobra] - Config: [.env file / config.yaml / flags only] - Output format: [human-readable text / JSON / both with --json flag] </requirements> <constraints> - --help text must be complete and accurate for every command - Non-zero exit codes on all error paths (document which code means what) - --verbose flag for debug output (off by default) - No output to stdout on error — errors go to stderr only </constraints>

What it does: Builds a well-structured CLI with proper exit codes, help text, and stderr separation — the baseline quality bar for any developer tool.

Why it works: "Errors go to stderr only" is one of the most frequently violated Unix conventions in AI-generated CLI code. Explicitly requiring it prevents pipelines from breaking when your tool emits error messages to stdout. Exit codes make it scriptable.

Async / concurrent implementation Async
<role>You are a senior engineer who is expert in [Python asyncio / Node.js async/await / Go goroutines / Rust tokio]. You think carefully about race conditions, backpressure, and cancellation before writing any concurrent code.</role> <task>Implement [describe the concurrent task — e.g., "fetch 500 URLs concurrently with a max concurrency of 20, retry failed requests up to 3 times with exponential backoff"].</task> <constraints> - Max concurrency: [N] — explain why this number was chosen - Timeout per operation: [Ns] - Retry policy: [N retries / no retries] - Cancellation: support graceful shutdown on SIGINT/SIGTERM - Error handling: individual item failures must not kill the entire job - Progress: emit progress to stderr every [N] items or every [N] seconds </constraints> <format> 1. Implementation 2. A brief explanation of the concurrency model chosen and its limits 3. One paragraph on what could go wrong at scale and how to detect it </format>

What it does: Generates production-safe concurrent code with backpressure control, graceful shutdown, and an explicit analysis of failure modes.

Why it works: The "what could go wrong at scale" section is the key differentiator — it forces Claude to think about the failure mode before it's a production incident. Most AI-generated async code skips backpressure entirely; the max concurrency constraint forces it to be handled explicitly.

SQL query — complex joins and optimization SQL
<role>You are a database engineer who writes performant SQL for production PostgreSQL / MySQL databases. You think about query plans before writing queries.</role> <task>Write a SQL query that [describe what the query must return].</task> <schema> [Paste your relevant CREATE TABLE statements here] </schema> <requirements> - Database: [PostgreSQL 15 / MySQL 8 / SQLite] - Expected table sizes: [e.g., users: 500K rows, orders: 2M rows] - Performance target: [under 100ms on production hardware / no constraint] - Existing indexes: [list relevant indexes] </requirements> <format> 1. The query 2. Which indexes this query uses (and which it's missing) 3. Estimated row scan volume 4. Any index you'd recommend adding 5. Alternative query if the first approach has a performance risk </format>

What it does: Produces a query plus a query plan analysis — not just SQL that returns correct results, but SQL that's safe to run at scale.

Why it works: Pasting schema is the single biggest quality lever for SQL generation. Without it, Claude guesses at column names and types. With it, the query is accurate and the index recommendations are specific. The estimated row scan volume catches N+1-style disasters before they hit production.

🐛 Debugging 6 prompts
Error diagnosis from stack trace Stack Trace
<role>You are a senior debugging engineer. You diagnose root causes, not symptoms. You ask for more information when you don't have enough context to be confident.</role> <task>Diagnose the following error and provide a fix.</task> <error> [Paste the full error message and stack trace here] </error> <context> What I was trying to do: [describe the user action or code path that triggered this] Environment: [OS, runtime version, relevant package versions] When it started: [always / after a specific change / intermittent] Relevant code around the error: <code> [Paste the function or class where the error occurs] </code> </context> <format> 1. Root cause (one sentence — what is actually wrong) 2. Why this error occurs (the mechanism, not just the symptom) 3. Fix (code-level change with explanation) 4. How to verify the fix worked 5. Related issues to check — what else might be broken with the same root cause </format>

What it does: Produces a root cause analysis with a verified fix and a scan for related issues — not just "here's the error and here's the fix."

Why it works: "Related issues to check" is the section that catches the follow-on bugs. Most developers fix the error they see and miss the three related errors with the same root cause. "When it started" gives Claude the critical signal for whether this is a regression (scope it to recent changes) or a latent bug (look deeper).

Intermittent / race condition diagnosis Concurrency
<role>You are an expert in diagnosing intermittent bugs and race conditions. You know that intermittent bugs are almost always deterministic — they just require the right conditions to reproduce.</role> <task>Help me diagnose this intermittent bug.</task> <symptoms> What happens: [describe the failure] Frequency: [1 in N runs / once a day / under specific load] Environment: [only in prod / only under load / only in CI / everywhere] </symptoms> <code> [Paste the relevant concurrent / async / multi-threaded code here] </code> <format> 1. Hypotheses ranked by probability (most likely first) 2. For the top hypothesis: explain the exact timing condition that triggers it 3. How to reproduce reliably (even if that requires a load test or specific delay) 4. Fix for the most likely cause 5. Logging / instrumentation to add to confirm the hypothesis before patching </format>

What it does: Generates a probabilistic diagnosis of intermittent bugs with specific reproduction steps — not just "add a mutex and hope."

Why it works: Asking for "logging to add before patching" is the key discipline — it prevents fixing the wrong hypothesis and forces instrumentation that will confirm the root cause. Frequency and environment context narrows Claude's hypothesis space dramatically.

Performance bottleneck diagnosis Performance
<role>You are a performance engineer who profiles code before optimizing it. You never guess at bottlenecks — you measure first.</role> <task>Help me diagnose a performance problem in the following code.</task> <symptoms> Observed latency: [Xms p50, Yms p99 — or just "it's slow"] Expected latency: [what it should be] When it's slow: [always / under load / with specific input sizes] Scale: [N users / N requests/sec / N rows] </symptoms> <code> [Paste the slow function or code path here] </code> <format> 1. Likely bottlenecks ranked by expected impact 2. For each: what to measure to confirm (specific profiler command or metric) 3. Fix for the highest-impact bottleneck 4. Order of operations for optimization (what to fix first, second, third) 5. What to NOT optimize (things that look slow but aren't the real problem) </format>

What it does: Produces a prioritized optimization roadmap with measurement steps — not premature optimization, but data-driven performance engineering.

Why it works: "What to NOT optimize" is the section that saves the most time. Claude is good at identifying false bottlenecks — things that look slow in the code but aren't the actual hotspot. This section forces it to be explicit about where not to spend time.

Edge case detection before shipping Edge Cases
<role>You are a senior QA engineer who thinks adversarially about code. Your job is to find every way this code can fail before it reaches production.</role> <task>Find all edge cases in the following code that could cause incorrect behavior or errors in production.</task> <code> [Paste the function or module here] </code> <context> What this code is expected to do: [describe the intended behavior] What inputs it receives in production: [describe real-world input range] What systems it calls: [list dependencies — databases, APIs, files] </context> <format> For each edge case found: - The input or condition that triggers it - What actually happens (the bug) - Severity: [Critical / High / Medium / Low] with reasoning - Fix Finish with: "Missing test cases" — list the tests that would catch these edge cases </format>

What it does: Runs an adversarial analysis of your code before it ships, with severity ratings and specific missing test cases.

Why it works: The "Missing test cases" section at the end is directly actionable — you can paste it into your test file immediately. Severity ratings prevent spending 2 hours on a Low-severity edge case while a Critical one ships.

Memory leak investigation Memory
<role>You are a systems engineer with deep experience diagnosing memory leaks in [Node.js / Python / Go / Java / C++] applications.</role> <task>Help me investigate a suspected memory leak.</task> <symptoms> Memory growth pattern: [steady growth / spike and hold / gradual increase over hours] Restart frequency required: [every X hours/days] When it's worst: [under load / after specific operations / always] Heap dump or profiler output (if available): <data> [Paste relevant profiler output, heap snapshot summary, or "not yet collected"] </data> </symptoms> <code> [Paste the code most likely involved — event handlers, caches, closures, background tasks] </code> <format> 1. Most likely leak sources given the symptoms 2. Step-by-step profiling plan to confirm (specific tools and commands) 3. Fix for the most likely cause 4. How to verify the leak is fixed (before and after metric) </format>

What it does: Produces a memory leak investigation plan with specific profiling commands — not just "check for circular references."

Why it works: The memory growth pattern is the most diagnostic input Claude has. Steady growth vs. spike-and-hold points to completely different root causes (linear accumulation vs. caching without eviction). Giving Claude this pattern shifts the hypothesis space significantly.

Log analysis — find the root cause Logs
<role>You are a site reliability engineer who reads logs to diagnose production incidents. You distinguish signal from noise and identify causal chains.</role> <task>Analyze these logs and identify the root cause of the incident.</task> <logs> [Paste the relevant log lines here — include at least a few minutes before the incident] </logs> <incident> What was observed: [describe the user-facing symptom] When it started: [timestamp] When it resolved (if it did): [timestamp or "still ongoing"] </incident> <format> 1. Timeline — reconstruct what happened in chronological order from the logs 2. Root cause — the first event that started the causal chain 3. Contributing factors — what made it worse 4. Immediate mitigation — what to do right now 5. Permanent fix — what to change so this doesn't recur 6. Gaps in logging — what was missing that would have made this faster to diagnose </format>

What it does: Reconstructs an incident from raw logs — timeline, root cause, mitigation, and fix — plus an honest assessment of logging gaps.

Why it works: "Gaps in logging" is the postmortem improvement that most teams skip. Building it into the prompt makes it automatic. The timeline reconstruction is where Claude adds the most value — correlating events across services that are hard to trace manually.

🔍 Code Review 6 prompts
Security audit — OWASP-style Security
<role>You are a senior application security engineer. You think like an attacker. You find vulnerabilities before they do. You are direct and do not soften your findings.</role> <task>Perform a security audit of the following code.</task> <code> [Paste the code to audit] </code> <context> What this code does: [one-line description] Inputs come from: [user input / internal API / trusted service] Data sensitivity: [handles PII / financial data / non-sensitive] Auth model: [JWT / session / API key / no auth] </context> <format> For each vulnerability found: - Vulnerability type (OWASP category if applicable) - Severity: Critical / High / Medium / Low - Exploit scenario: how would an attacker actually abuse this? - Fix: specific code change Finish with: "Hardening recommendations" — security improvements beyond vulnerability fixes </format> <constraints> - Do not report theoretical vulnerabilities without a realistic exploit path - Rate severity based on actual exploitability, not just theoretical risk </constraints>

What it does: Produces an adversarial security audit with realistic exploit scenarios and specific code fixes — not a generic checklist.

Why it works: "Do not report theoretical vulnerabilities without a realistic exploit path" is the key constraint. It filters out the false positive noise that makes most automated security tools painful to use. The exploit scenario requirement forces Claude to reason about actual attack paths, not just flag patterns.

Performance review — bottleneck identification Performance
<role>You are a performance engineer reviewing code that will run under production load. You think about latency, throughput, and resource consumption before approving any PR.</role> <task>Review the following code for performance issues.</task> <code> [Paste the code to review] </code> <context> Call frequency: [requests/sec or N times/day] Data scale: [row counts, payload sizes] Latency requirement: [p99 target] Infrastructure: [cloud function / long-running server / batch job] </context> <format> 1. Critical issues — problems that will cause failures or severe degradation at scale 2. Warning issues — problems that won't cause failures but will be expensive 3. Info — minor inefficiencies worth noting but not worth fixing now 4. For each Critical and Warning: estimated impact + fix 5. What benchmarks to run before shipping </format>

What it does: A tiered performance review — Critical, Warning, Info — with estimated impact and specific benchmarks to run.

Why it works: The three-tier severity model prevents alarm fatigue. "What benchmarks to run before shipping" makes the review actionable — you leave with a test plan, not just a list of concerns. Call frequency and data scale dramatically change what counts as a performance problem.

Architecture critique — a 10x engineer reviews your PR Architecture
<role>You are a senior staff engineer who reviews architecture decisions with a 5-year lens. You are direct, honest, and prioritize long-term maintainability over short-term delivery speed.</role> <task>Review this code change and give me an honest architectural critique.</task> <diff> [Paste your git diff or the full PR change here] </diff> <context> What this change is trying to accomplish: [describe the goal] Constraints we're working under: [time pressure / team size / tech debt context] </context> <format> 1. What this gets right 2. What concerns me about the long-term maintainability 3. Specific questions I'd ask in the PR review (the hard questions) 4. Alternative approach if the architectural concern is serious enough to warrant it 5. Ship / Ship with changes / Rethink recommendation with reasoning </format> <constraints> - Be direct. I would rather hear a hard truth than a diplomatic non-answer. - If the approach is fine with minor changes, say so. Don't manufacture concerns. </constraints>

What it does: Simulates a senior staff engineer's PR review with an explicit Ship / Ship with changes / Rethink recommendation.

Why it works: The "Be direct" constraint unlocks Claude's actual assessment. Without it, Claude defaults to diplomatic hedging that sounds like approval for anything. The "Ship / Ship with changes / Rethink" structure forces a decision, which is what you actually need from a reviewer.

Dependency audit Dependencies
<role>You are a senior engineer who treats every new dependency as a long-term maintenance cost and a potential security liability.</role> <task>Audit the dependencies in the following package file and flag any concerns.</task> <package-file> [Paste your package.json / requirements.txt / go.mod / Cargo.toml here] </package-file> <format> 1. High-risk dependencies — outdated, abandoned, or security-flagged 2. Over-engineered dependencies — libraries that could be replaced with 5 lines of code 3. Duplicate functionality — packages that overlap in what they do 4. Version pinning issues — anything that could cause dependency hell 5. Missing dependencies — patterns in the package list that suggest something important is missing </format>

What it does: Audits your dependency tree for risk, bloat, and duplication — the review that most teams skip until something breaks.

Why it works: "Over-engineered dependencies" is the most valuable category — moment packages that add 50KB to your bundle for functionality you could implement in a few lines. Claude is good at spotting these because it has seen the implementations of most popular libraries.

Code readability and naming review Readability
<role>You are a senior engineer who values code readability as a first-class concern. You believe that code is read 10x more than it's written, and you review naming and structure accordingly.</role> <task>Review the following code for readability, naming clarity, and structural organization.</task> <code> [Paste the code to review] </code> <format> 1. Naming issues — variables, functions, or classes with unclear or misleading names (suggest alternatives) 2. Abstraction issues — functions that do too much, or code that's over-abstracted 3. Comment quality — missing comments where logic is non-obvious, or comments that restate the obvious 4. Structure — sections that should be extracted into separate functions 5. Revised version of the most confusing section with improvements applied </format>

What it does: A readability audit focused on naming, abstraction, and structure — the dimensions of code quality that tools like linters miss entirely.

Why it works: "Comments that restate the obvious" identifies a common anti-pattern that clutters code without adding information. The revised section at the end is the most impactful output — seeing the improvement in context makes the feedback actionable immediately.

API contract review API Design
<role>You are a senior API designer who has seen hundreds of APIs evolve (and break) over time. You think about backwards compatibility and versioning before approving any public interface.</role> <task>Review this API design and flag any concerns before it ships.</task> <api-spec> [Paste your OpenAPI spec, route definitions, or API documentation draft here] </api-spec> <context> Consumer type: [internal / external / public] Versioning strategy: [URL versioning / header / no versioning yet] Expected lifetime: [MVP / production for 3+ years] </context> <format> 1. Breaking change risks — fields or behaviors that will be painful to change later 2. Missing fields — data that callers will inevitably need but isn't in the contract 3. Naming consistency issues — fields that don't follow established conventions 4. Versioning gaps — missing version signals that make future changes harder 5. Recommended changes before shipping </format>

What it does: An API contract review focused on long-term maintainability — what will be painful to change 18 months from now.

Why it works: "Missing fields" is the most valuable section. Claude has seen enough APIs to know what callers typically need next — created_at vs updated_at, pagination cursors, rate limit headers. The "Expected lifetime" context shifts Claude's recommendations significantly: MVP vs. 3-year production API have very different design tradeoffs.

📄 Documentation 6 prompts
Docstrings — complete and accurate Docstrings
<role>You write technical documentation that developers actually want to read. Your docstrings explain the why, not just the what.</role> <task>Write docstrings for every function and class in the following code.</task> <code> [Paste the code here] </code> <format> Follow [Google style / NumPy style / JSDoc / Go godoc / Rust rustdoc] format. For each function: - One-line summary (the most important sentence — what does it return or do?) - Parameters: type, description, and any constraints (e.g., must be positive) - Returns: type and description - Raises / throws: what errors can be raised and when - Example: one concrete usage example if the function is non-obvious </format> <constraints> - Do not restate the function name. "process_order() processes an order." adds zero information. - Example must use realistic values, not placeholder strings like "foo" or "bar" - If the function has side effects, document them explicitly </constraints>

What it does: Generates complete, accurate docstrings with realistic examples — not the placeholder text that AI usually produces.

Why it works: "Do not restate the function name" is the key constraint. AI-generated docstrings default to this anti-pattern constantly. The realistic example requirement catches another common failure: Claude using "foo", "bar", "test" as example values instead of domain-meaningful data.

README for a new project or library README
<role>You write developer documentation for open-source projects. You know that the first 30 seconds of a README determine whether a developer stays or leaves.</role> <task>Write a README for the following project.</task> <project> Name: [project name] What it does: [one-sentence description] Who it's for: [target developer audience] Primary use case: [the single most important thing users will do with this] </project> <format> 1. Title + one-sentence description (hook in the first sentence) 2. The problem it solves (2-3 sentences) 3. Quick start — working code example in under 5 lines (must actually run) 4. Installation 5. Core concepts (if non-trivial) — explain the mental model, not just the API 6. API reference (key functions with examples) 7. Configuration 8. Contributing </format> <constraints> - Quick start must work. Do not include placeholder code that won't run. - No marketing language ("blazing fast", "production-ready") — just facts - Lead with the user's problem, not the project's features </constraints>

What it does: Generates a complete README that leads with the developer's problem rather than your project's self-description.

Why it works: "Lead with the user's problem" is the structural insight. Most READMEs lead with what the project IS; great READMEs lead with what the user was frustrated about before they found it. "Quick start must work" prevents the most common README failure mode — example code that's outdated or incomplete.

API reference documentation API Docs
<role>You write API documentation for developers integrating external services. Your documentation reduces support tickets by answering every question a developer would ask before they ask it.</role> <task>Write API reference documentation for the following endpoints.</task> <endpoints> [Paste your route definitions, OpenAPI spec, or function signatures here] </endpoints> <format> For each endpoint: - HTTP method + path - One-sentence description (what does a successful call accomplish?) - Authentication requirements - Request parameters: name, type, required/optional, description, example value - Request body (if applicable): full JSON example with all fields - Response: HTTP status codes + response body examples for both success AND error cases - Rate limits (if applicable) - Code example in [curl / Python / JavaScript / your preference] </format>

What it does: Generates complete API reference docs with both success and error response examples — the documentation format that actually reduces integration time.

Why it works: Error response examples are the most commonly missing element in API docs. They're also what developers check first when their integration fails. Building them into the prompt structure makes it automatic rather than an afterthought.

Architecture decision record (ADR) ADR
<role>You are a senior engineer documenting architecture decisions for a team. Your ADRs explain not just what was decided but why — so that future engineers understand the context and don't inadvertently undo the decision.</role> <task>Write an Architecture Decision Record for the following decision.</task> <decision> What we decided: [describe the technical decision] Date: [date] Status: [Proposed / Accepted / Deprecated / Superseded by ADR-XXX] </decision> <context> Problem we were solving: [what forced this decision?] Options we considered: [list 2-4 alternatives] Why we chose this option: [the specific reasons] What we gave up: [what trade-offs did we accept?] </context> <format> Standard ADR format: 1. Title (ADR-[number]: [short decision name]) 2. Status 3. Context (the situation that required a decision) 4. Decision (what we decided to do) 5. Alternatives considered (with brief reasoning why each was rejected) 6. Consequences (positive and negative outcomes of this decision) 7. Revisit criteria (under what conditions should this decision be reconsidered?) </format>

What it does: Produces a complete ADR in standard format — including alternatives rejected and conditions for revisiting, the sections most ADRs skip.

Why it works: "Revisit criteria" is the ADR section that makes the decision useful long-term. Without it, decisions become permanent by default — nobody questions them because nobody knows what would justify questioning them. Documenting the trigger conditions upfront prevents technical debt from accumulating around outdated decisions.

Changelog for a release Changelog
<role>You write changelogs that developers and users actually read. You translate technical changes into user-facing impact.</role> <task>Write a changelog for the following release.</task> <release> Version: [v1.2.0] Release date: [date] </release> <commits> [Paste your git log or list of changes here] </commits> <format> Keep a Changelog format: - ### Added (new features) - ### Changed (changes to existing functionality) - ### Deprecated (features that will be removed) - ### Removed (features that were removed) - ### Fixed (bug fixes) - ### Security (security fixes — always list these first if present) For each entry: one sentence describing the user-facing impact. Not the implementation. Not "fixed bug in UserService.process()." Instead: "Fixed an issue where users could not check out after applying a discount code." </format>