Coding Prompts
Ready-to-use prompts for writing, refactoring, debugging, and reviewing code. Paste one in, fill the variables, and get a focused result instead of a blank chat.
You are a developer experience engineer who specializes in error messaging. Here are error messages currently emitted by my code: {{current_errors}} Audience seeing these: {{audien...
You are a software architect who models workflows as explicit state machines. Current logic (informal rules or code): {{current_logic}} Entities and their statuses: {{entities_and_...
You are a scheduling expert. I want a job to run: {{schedule_in_words}} Cron flavor: {{cron_flavor}} Server timezone: {{timezone}} Provide: 1. The exact cron expression. 2. A field...
You are an API design expert. Endpoint: {{endpoint_description}} Expected dataset size and growth: {{dataset_scale}} Sort order(s) users need: {{sort_requirements}} Backing store:...
You are a software archaeologist. I inherited this undocumented code and need to understand it before touching it. ```{{language}} {{code}} ``` Known context (may be incomplete): {...
You are a refactoring specialist cleaning up a fully-shipped feature flag. Flag name: {{flag_name}} Final state to keep (on or off): {{final_state}} Code using the flag: ```{{langu...
You are a date and time correctness expert. Code that handles dates/times: ```{{language}} {{code}} ``` Where users are: {{user_locations}} Where the server runs: {{server_location...
You are a distributed systems engineer. I need to make this endpoint safe to retry. Endpoint and what it does: {{endpoint_description}} Side effects (charges, emails, rows created)...
You are a fuzzing expert using {{fuzzer}} for {{language}}. Target function (a parser/decoder): ```{{language}} {{function_code}} ``` Write: 1. A fuzz harness that takes raw bytes...
You are a meticulous engineer writing a commit message. Diff: ```diff {{diff}} ``` Convention to follow: {{convention}} Write: 1. A subject line under 72 chars in the imperative mo...
You are an ORM performance expert for {{orm}}. Code that loads and renders data: ```{{language}} {{code}} ``` Models/relationships involved: {{models}} Find every N+1 pattern (lazy...
You are a backend reliability engineer. Service description: {{service_description}} Language/framework: {{language}} What is in flight when it stops: {{in_flight_work}} Orchestrat...
You are a type-system expert in {{language}}. Code and the exact type error: ```{{language}} {{code}} ``` Error message: {{error_message}} Solve it without using escape hatches (no...
You are a database migration expert for {{database}}. Change I want: {{schema_change}} Table size: {{table_size}} Deployment model (how app and DB versions overlap): {{deploy_model...
You are an API infrastructure engineer. What I am protecting: {{resource}} Desired limit and burst behavior: {{limit_behavior}} Scope (per IP, per user, per key, global): {{scope}}...
You are a careful code reviewer evaluating a failing snapshot test. The snapshot diff: ```diff {{snapshot_diff}} ``` The code change that caused it: ```diff {{code_diff}} ``` Decid...
You are a CLI design expert who follows established conventions (POSIX flags, sane defaults, scriptability). Tool purpose: {{purpose}} Main actions users perform: {{actions}} Langu...
You are an expert in numerical correctness, especially for money. Code doing the math: ```{{language}} {{code}} ``` Domain: {{domain}} Symptom: {{symptom}} Audit for: 1. Binary flo...
You are a backend engineer building a production webhook receiver for {{provider}}. Events I care about: {{events}} Language/framework: {{language}} What each event triggers: {{act...
You are an algorithms expert. Recursive function: ```{{language}} {{code}} ``` It overflows on input like: {{problem_input}} Convert it to an iterative version: 1. If it is tail-re...
You are an expert in robust application configuration. Config sources: {{sources}} Settings the app needs: {{settings}} Language/framework and validation library: {{language_and_li...
You are a git workflow expert. Bug description: {{bug_description}} Known good ref: {{good_ref}} Known bad ref: {{bad_ref}} How I can detect the bug programmatically: {{detection_m...
You are a concurrency expert. Symptom: {{symptom}} Thread dump / stack traces of stuck threads: {{thread_dump}} Relevant locking code: ```{{language}} {{code}} ``` Analyze: 1. The...
You are a testing engineer specializing in integration boundaries. External API I depend on: {{api}} Endpoints and the shape my code expects: {{expectations}} Language/test framewo...
You are a data modeling expert for {{language}}. Sample JSON (may have inconsistencies, nulls, mixed types): ```json {{json_sample}} ``` Notes about the data: {{notes}} Produce: 1....
You are a technical writer who writes READMEs developers actually follow. Project details: - What it does: {{what_it_does}} - Stack and how to run it: {{stack_and_run}} - Prerequis...
You are an application security reviewer. Code: ```{{language}} {{code}} ``` Context (what this handles, trust boundary, who calls it): {{context}} Review for: 1. Injection (SQL, c...
You are a frontend/event-handling expert. Event and where it fires: {{event_context}} What I want the user to experience: {{desired_behavior}} Constraints (leading/trailing call, c...
You are a refactoring expert who values testable, side-effect-free cores. Current function: ```{{language}} {{code}} ``` Refactor it using a functional core / imperative shell spli...
You are a text-encoding expert. Symptom (paste the garbled output): {{garbled_output}} What it should read: {{expected_text}} The pipeline the text travels through (input -> storag...
You are a test-quality reviewer. Test file: ```{{language}} {{test_code}} ``` Improve it without changing what is covered: 1. Rename tests to describe behavior and expected outcome...
You are a streaming/concurrency systems engineer. Pipeline: {{pipeline_description}} Producer rate vs consumer rate: {{rates}} What must never happen (drop data, OOM, latency spike...
You are a build-tooling expert. Tasks I run regularly: {{tasks}} Project stack: {{stack}} Write a Makefile that: 1. Has a default "help" target that auto-lists targets with descrip...
You are a reliability engineer. What I am calling and its failure modes: {{call_description}} Which errors are retryable vs not: {{error_classes}} Latency/budget constraints: {{con...
You are an expert in automated refactoring with {{tool}}. The transformation I want: {{transformation}} Before example: ```{{language}} {{before_example}} ``` After example: ```{{l...
You are a caching expert. What I am caching and how it is read: {{cache_target}} How and when the underlying data changes: {{change_pattern}} Tolerance for staleness: {{staleness_t...
You are an API design expert. API context: {{api_context}} Current inconsistent error examples: {{current_errors}} Clients consuming it: {{clients}} Design a single error response...
You are a performance benchmarking expert for {{language}}. Two implementations to compare: ```{{language}} {{implementations}} ``` Realistic input distribution: {{input_profile}}...
You are a demanding senior reviewer doing a pre-submit review of my own pull request. PR intent: {{pr_intent}} The diff: ```diff {{diff}} ``` Review like you will block it if neede...
You are an event-driven architecture expert. Current event schema: {{current_schema}} Change I want to make: {{desired_change}} Serialization format: {{format}} Consumers and wheth...
You are a web accessibility expert who knows ARIA and the WAI-ARIA authoring patterns. Component code: ```{{language}} {{component_code}} ``` Component type and behavior: {{compone...
You are an observability engineer. Current logging in this code: ```{{language}} {{code}} ``` What I usually need to find during incidents: {{incident_needs}} Log pipeline/aggregat...
You are a maintenance engineer planning a major version upgrade. Dependency and version jump: {{dependency_and_versions}} How heavily my code uses it: {{usage_surface}} Stack and c...
You are an expert at decoding obscure {{language}} errors. The full error / stack trace: {{error_text}} The code around where it happens (if known): ```{{language}} {{code}} ``` Ex...
You are a test-data design expert for {{language}}. Entities and their fields/constraints: {{entities}} Relationships between them: {{relationships}} Test framework / faker library...
You are an expert in low-level bit manipulation. Code: ```{{language}} {{code}} ``` What it is supposed to do (if known): {{intent}} Do the following: 1. Walk through each bitwise...
You are a software architect experienced in incremental decomposition. The capability to extract: {{capability}} How it is coupled today (shared DB tables, in-process calls, shared...
You are a senior engineer planning work for an AI coding agent. Feature request: {{feature}}. Codebase context: {{stack}}. Constraints: {{constraints}}. Decompose this into a task...
Act as a debugging partner working a single bug to root cause. Observed behavior: {{symptom}}. Expected behavior: {{expected}}. Relevant code or logs: {{evidence}}. Work the proble...
You are a staff engineer reviewing a pull request. Diff or description: {{diff}}. What the change is meant to do: {{intent}}. Language and framework: {{stack}}. Review in priority...