222 prompts · page 4 of 5

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.

CodingImprove errors
Rewrite cryptic error messages to be actionable

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#dx#errors#ux#refactor
View
CodingDesign state machine
Turn messy if-else business rules into a state machine

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_...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#architecture#refactor#state-machine#design
View
CodingBuild cron
Write and explain a cron expression

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#cron#scheduling#devops
View
CodingDesign pagination
Design pagination for a list API

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:...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#api#architecture#pagination#design
View
CodingExplain legacy code
Reverse-engineer undocumented legacy code

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): {...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#legacy#refactor#documentation#code-review
View
CodingRemove feature flag
Remove a stale feature flag safely

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#refactor#feature-flags#cleanup
View
CodingAudit datetime
Audit code for timezone and DST bugs

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#datetime#bugs#code-review#timezone
View
CodingDesign idempotency
Add idempotency to a payment or write endpoint

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)...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#api#distributed-systems#idempotency#reliability
View
CodingWrite fuzzer
Write a fuzzing harness for a parser

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...

Claude Opus 4.8GPT-5
#fuzzing#testing#security#parsing
View
CodingWrite commit
Write a clean commit message from a diff

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#git#commits#documentation#workflow
View
CodingFix N+1
Find and fix N+1 query problems

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#performance#orm#database#refactor
View
CodingAdd graceful shutdown
Implement graceful shutdown for a service

You are a backend reliability engineer. Service description: {{service_description}} Language/framework: {{language}} What is in flight when it stops: {{in_flight_work}} Orchestrat...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#devops#reliability#backend#deployment
View
CodingFix type error
Fix a stubborn type error with proper narrowing

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#types#typescript#debugging#refactor
View
CodingPlan migration
Plan a zero-downtime database migration

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#database#migration#devops#reliability
View
CodingBuild rate limiter
Choose and implement a rate limiting algorithm

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}}...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#api#rate-limiting#distributed-systems#design
View
CodingReview snapshot
Decide whether a snapshot test change is intended

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#testing#code-review#snapshot
View
CodingDesign CLI
Design a clean CLI tool interface

You are a CLI design expert who follows established conventions (POSIX flags, sane defaults, scriptability). Tool purpose: {{purpose}} Main actions users perform: {{actions}} Langu...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#cli#design#dx#tooling
View
CodingFix float math
Fix floating-point precision bugs in money math

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#bugs#numerics#money#code-review
View
CodingBuild webhook handler
Build a robust webhook receiver

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#webhooks#api#backend#reliability
View
CodingConvert recursion
Convert recursion to iteration to avoid stack overflow

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#algorithms#refactor#recursion#performance
View
CodingValidate config
Write a validated config schema with good defaults

You are an expert in robust application configuration. Config sources: {{sources}} Settings the app needs: {{settings}} Language/framework and validation library: {{language_and_li...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#config#validation#backend#dx
View
CodingPlan bisect
Plan a git bisect to find a regression

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#git#debugging#regression#workflow
View
CodingDiagnose deadlock
Diagnose a deadlock from thread dumps

You are a concurrency expert. Symptom: {{symptom}} Thread dump / stack traces of stuck threads: {{thread_dump}} Relevant locking code: ```{{language}} {{code}} ``` Analyze: 1. The...

Claude Opus 4.8GPT-5
#concurrency#debugging#deadlock#systems
View
CodingWrite contract tests
Write contract tests for an external API you depend on

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#testing#integration#api#contracts
View
CodingModel from JSON
Generate typed models from a messy JSON sample

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....

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#json#types#modeling#parsing
View
CodingWrite README
Write a README that gets people running fast

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#documentation#readme#onboarding
View
CodingSecurity review
Security-review a code snippet for common vulns

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#security#code-review#vulnerabilities
View
CodingRate-limit events
Choose and implement debounce vs throttle

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#frontend#performance#events#javascript
View
CodingExtract pure logic
Extract pure logic from side-effect-heavy code

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#refactor#testing#architecture#functional
View
CodingFix encoding
Debug character encoding and mojibake issues

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#encoding#unicode#debugging#data
View
CodingRefactor tests
Improve a test suite's structure and naming

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#testing#refactor#code-review#quality
View
CodingAdd backpressure
Add backpressure to a producer-consumer pipeline

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#concurrency#streaming#architecture#performance
View
CodingWrite Makefile
Write a self-documenting Makefile

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#build#make#devops#tooling
View
CodingAdd retry logic
Implement retries with backoff and jitter correctly

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#reliability#retry#backend#resilience
View
CodingWrite codemod
Write a codemod to apply a change across a codebase

You are an expert in automated refactoring with {{tool}}. The transformation I want: {{transformation}} Before example: ```{{language}} {{before_example}} ``` After example: ```{{l...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#codemod#refactor#ast#tooling
View
CodingDesign caching
Design a cache and its invalidation strategy

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#caching#architecture#performance#design
View
CodingDesign error format
Design a consistent API error response format

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#api#design#errors#contracts
View
CodingWrite benchmark
Write a trustworthy microbenchmark

You are a performance benchmarking expert for {{language}}. Two implementations to compare: ```{{language}} {{implementations}} ``` Realistic input distribution: {{input_profile}}...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#performance#benchmarking#testing
View
CodingSelf-review PR
Run a thorough self-review on your own PR

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#code-review#git#quality#workflow
View
CodingEvolve schema
Evolve an event/message schema without breaking consumers

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#events#schema#architecture#compatibility
View
CodingFix accessibility
Make a UI component accessible

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#accessibility#frontend#aria#ux
View
CodingImprove logging
Turn noisy logs into useful structured logging

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#logging#observability#devops#refactor
View
CodingPlan upgrade
Plan a risky major dependency upgrade

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#dependencies#upgrade#maintenance#planning
View
CodingExplain error
Decode a cryptic compiler or runtime error

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#debugging#errors#learning
View
CodingGenerate test data
Build realistic test data factories

You are a test-data design expert for {{language}}. Entities and their fields/constraints: {{entities}} Relationships between them: {{relationships}} Test framework / faker library...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#testing#fixtures#test-data#factories
View
CodingExplain bit logic
Explain and verify tricky bit-manipulation code

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#bitwise#low-level#explain#debugging
View
CodingExtract service
Plan extracting a service out of a monolith

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#architecture#microservices#refactor#planning
View
CodingTask decomposition
Break a feature into agent-ready tasks

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#ai-coding#planning#agents#workflow
View
CodingRoot-cause debugging
Drive an AI agent through root-cause debugging

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#ai-coding#debugging#root-cause#testing
View
CodingCode review
Review a pull request like a staff engineer

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...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#ai-coding#code-review#quality#security
View

Browse other categories