222 prompts · page 2 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.

CodingWrite Bash
Write a Bash automation script

Write a Bash script that does the following: Task: {{task}} Requirements: - Start with a strict mode header (set -euo pipefail). - Accept these inputs as arguments or flags: {{inpu...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#bash#scripting#automation
View
CodingModernize async
Convert callback code to async/await

Convert the following {{language}} code from callbacks or promise chains to async/await. Code: {{code}} Requirements: - Preserve the exact behavior and error handling. - Use try/ca...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#async#javascript#refactor
View
CodingWrite README
Write a README for a project

Write a README.md for this project. Project name: {{project_name}} What it does: {{description}} Tech stack: {{stack}} How to install and run: {{setup}} Include these sections: - A...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#documentation#readme#markdown
View
CodingValidate input
Add input validation to a function

Add robust input validation to the following {{language}} function. Code: {{code}} Validation rules to enforce: {{rules}} Requirements: - Reject invalid input early with clear erro...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#validation#security#robustness
View
CodingAnalyze complexity
Analyze time and space complexity

Analyze the time and space complexity of this {{language}} code. Code: {{code}} Provide: 1. The Big O time complexity with the reasoning. 2. The Big O space complexity with the rea...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#algorithms#complexity#performance
View
CodingMock data
Generate realistic mock data

Generate {{count}} rows of realistic mock data in {{format}} format. Each record should have these fields with these constraints: {{fields}} Requirements: - Make values realistic a...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#test-data#mocks#fixtures
View
CodingFix git
Resolve a git problem

I am stuck in git and need help fixing it safely. What I was trying to do: {{goal}} What happened instead: {{problem}} Output of git status and any error: {{git_output}} Give me: 1...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#git#version-control#troubleshooting
View
CodingBuild CLI
Build a command-line tool

Build a command-line tool in {{language}} that does the following. Purpose: {{purpose}} Commands and options it should support: {{commands}} Requirements: - Parse arguments with th...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#cli#tooling#implementation
View
CodingSimplify logic
Simplify tangled conditional logic

Simplify the tangled conditional logic in this {{language}} code without changing behavior. Code: {{code}} Approach: - Use guard clauses and early returns to flatten nesting. - Com...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#refactor#readability#logic
View
CodingIntegration test
Write an integration test

Write an integration test for the following flow using {{framework}}. Flow to test: {{flow}} Components involved: {{components}} Requirements: - Set up and tear down any needed sta...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#testing#integration#automation
View
CodingExplain regex
Explain an existing regular expression

Explain this regular expression in detail. Regex: {{regex}} Flavor or language: {{regex_flavor}} Provide: 1. A one-sentence summary of what it matches. 2. A breakdown of each token...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#regex#explanation#pattern-matching
View
CodingFind edge cases
Find missing edge cases in code

Review this {{language}} function and find edge cases it does not handle. Code: {{code}} What the function is supposed to do: {{intended_behavior}} List every edge case or unusual...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#edge-cases#robustness#review
View
CodingConfig setup
Set up environment configuration

Set up environment-based configuration for a {{stack}} application. Settings the app needs: {{settings}} Deliver: 1. A sample .env.example file with every variable and a comment fo...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#configuration#environment#devops
View
CodingImplement pseudocode
Turn pseudocode into working code

Implement the following pseudocode as working {{language}} code. Pseudocode: {{pseudocode}} Requirements: - Translate the logic faithfully. - Choose appropriate data structures for...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#implementation#algorithms#pseudocode
View
CodingImprove naming
Suggest better names for variables and functions

Improve the naming in this {{language}} code. Code: {{code}} For each poorly named variable, function, or class: - Show the old name and a better name. - Briefly explain why the ne...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#naming#readability#refactor
View
CodingAdd logging
Add useful logging to code

Add logging to the following {{language}} code using {{logging_library}}. Code: {{code}} Guidelines: - Log at the right level (debug, info, warn, error) for each event. - Include u...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#logging#observability#debugging
View
CodingApply pattern
Apply a design pattern to a problem

I have a design problem and want to know if a pattern fits. The problem: {{problem}} Current code or structure: {{current_code}} Do the following: 1. Recommend the most suitable de...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#design-patterns#architecture#refactor
View
CodingWrite parser
Parse a custom file format

Write a parser in {{language}} for the following data format. Description of the format: {{format_description}} A sample of the input: {{sample_input}} The structure I want it pars...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#parsing#file-formats#data
View
CodingSecurity review
Review code for security issues

Perform a security review of this {{language}} code. Code: {{code}} Context (what it does, where input comes from): {{context}} Check for: injection (SQL, command, etc.), missing i...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#security#review#vulnerabilities
View
CodingWrite migration
Write a database migration

Write a database migration for {{migration_tool}} on {{dialect}}. The change needed: {{change}} Current relevant schema: {{current_schema}} Requirements: - Provide both the up and...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#database#migration#schema
View
CodingSummarize diff
Summarize what a code diff does

Summarize what the following diff does for someone who has not seen the code. Diff: {{diff}} Provide: 1. A two-sentence high-level summary of the change. 2. A bullet list of the me...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#diff#code-review#summary
View
CodingAdd types
Add types to untyped code

Add precise type annotations to this {{language}} code. Code: {{code}} Requirements: - Type all parameters, return values, and key variables. - Define interfaces or types for any o...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#types#typescript#static-analysis
View
CodingPlan tasks
Break a feature into coding tasks

Break this feature down into a clear, ordered list of implementation tasks. Feature request: {{feature}} Current tech stack: {{stack}} Known constraints: {{constraints}} Produce: 1...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#planning#tasks#architecture
View
CodingExtract effects
Refactor side effects out of a function

Refactor this {{language}} function to separate pure logic from side effects. Code: {{code}} Goals: - Extract the core computation into a pure function with no I/O or mutation of e...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#refactor#testability#pure-functions
View
CodingFix slowness
Diagnose a performance bottleneck

Help me find and fix a performance problem in this {{language}} code. Code: {{code}} Symptoms: {{symptoms}} Rough scale of the data or load: {{scale}} Do the following: 1. Identify...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#performance#optimization#profiling
View
CodingWrite API client
Write a client for an API

Write a small client in {{language}} for the following API. API details: - Base URL: {{base_url}} - Endpoints I need: {{endpoints}} - Authentication: {{auth}} Requirements: - One f...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#api#http#client
View
CodingRead stack trace
Trace a bug from a stack trace

Help me trace a bug back to its root cause from this stack trace. Stack trace: {{stack_trace}} Relevant code from the frames mentioned: {{code}} What I was doing when it happened:...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#debugging#stacktrace#root-cause
View
CodingSchedule job
Write a scheduled job

Write a scheduled job that does the following. Task to run: {{task}} How often it should run: {{schedule}} Environment or scheduler: {{scheduler}} Requirements: - Provide the sched...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#cron#scheduling#devops
View
CodingHandle errors
Add proper error handling to code

Improve the error handling in this {{language}} code. Code: {{code}} Guidelines: - Catch errors at the right level; do not swallow them silently. - Distinguish recoverable from unr...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#error-handling#robustness#refactor
View
CodingCompare options
Compare two ways to solve a problem

I am choosing between two approaches to solve a coding problem. Help me decide. The problem: {{problem}} Approach A: {{approach_a}} Approach B: {{approach_b}} Constraints that matt...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#decision#architecture#tradeoffs
View
CodingWrite K8s manifest
Write a Kubernetes deployment manifest

Write Kubernetes manifests to deploy a {{stack}} service. Details: - Container image: {{image}} - Port the app listens on: {{port}} - Replicas: {{replicas}} - Environment variables...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#kubernetes#devops#deployment
View
CodingRegression test
Write a test for a bug before fixing it

I found a bug and want to write a regression test that fails now and passes after the fix. The bug: {{bug_description}} The buggy code: {{code}} How to reproduce it: {{repro}} Test...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#testing#regression#bugfix
View
CodingUnderstand codebase
Onboard to an unfamiliar codebase area

Help me understand this part of a codebase I am new to. Files or code: {{code}} What I am trying to do: {{goal}} Explain: 1. The overall responsibility of this code. 2. How data fl...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#onboarding#code-reading#architecture
View
CodingTransform data
Transform data from one shape to another

Write {{language}} code that transforms data from one shape to another. Input shape (with a sample): {{input_shape}} Desired output shape (with a sample): {{output_shape}} Mapping...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#data#transform#mapping
View
CodingFind coverage gaps
Find untested paths in code

Analyze this code and its existing tests to find coverage gaps. Code: {{code}} Existing tests: {{tests}} Identify: 1. Branches, conditions, or code paths that no test currently exe...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#testing#coverage#quality
View
CodingWrite changelog
Generate a changelog from commits

Write a changelog entry for version {{version}} based on these changes. Changes (commits or notes): {{changes}} Format: - Group entries under headings: Added, Changed, Fixed, Remov...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#changelog#documentation#release
View
CodingWrite Makefile
Write a Makefile for common tasks

Write a Makefile for a {{stack}} project that wraps these common tasks. Tasks I run often: {{tasks}} Requirements: - Create a target for each task with a clear name (install, build...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#makefile#tooling#automation
View
CodingMemory leak hunt
Diagnose a production memory leak from a heap snapshot

You are a performance engineer specializing in {{runtime}} memory profiling. Context: - Service: {{service_description}} - Symptom: RSS grows from {{start_mem}} to {{end_mem}} over...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#debugging#performance#memory#profiling
View
CodingFlaky test fix
Find and fix the root cause of a flaky test

You are a test-reliability engineer. A test in {{framework}} fails about {{flake_rate}} of CI runs but passes locally. Test code: {{test_code}} Code under test: {{source_code}} Fai...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#tests#ci#debugging#reliability
View
CodingStack trace decode
Decode a cryptic stack trace and pinpoint the failing call

Act as a senior {{language}} debugger. Here is a stack trace from {{environment}}: {{stack_trace}} Relevant code if it helps: {{code_context}} Walk me through it: 1. Translate the...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#debugging#errors#stacktrace
View
CodingMigration plan
Plan a strangler-fig migration off a legacy module

You are a staff engineer planning an incremental migration. Legacy component: {{legacy_description}} Target design: {{target_description}} Constraints: zero downtime, every step in...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#architecture#refactor#migration
View
CodingSQL tuning
Optimize a slow SQL query using its execution plan

You are a database performance specialist for {{database}}. Slow query: {{query}} Schema and indexes: {{schema}} Execution plan (EXPLAIN ANALYZE or equivalent): {{plan}} Table size...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#sql#performance#database#indexing
View
CodingRegex authoring
Build and stress-test a regex from a precise spec

You are a regex expert writing for the {{regex_flavor}} engine. Goal: match {{what_to_match}}. Must match these: {{positive_examples}} Must NOT match these: {{negative_examples}} C...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#regex#validation#parsing
View
CodingConcurrency audit
Audit concurrent code for race conditions and deadlocks

You are a concurrency specialist in {{language}} using {{concurrency_model}} (threads, async, goroutines, actors). Code: {{code}} Shared state and invariants that must hold: {{inva...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#concurrency#debugging#code-review#threading
View
CodingAPI design
Design a versioned REST/RPC API contract

You are an API designer. Design the contract for: {{api_purpose}}. Consumers: {{consumers}} Style: {{style}} (REST, gRPC, GraphQL). Non-functional needs: {{nfr}} (pagination, idemp...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#architecture#api#design#rest
View
CodingDocker hardening
Harden and shrink a production Dockerfile

You are a container/DevOps engineer. Review and rewrite this Dockerfile for a {{language}} {{app_type}}. Current Dockerfile: {{dockerfile}} Goals: minimal final image, fast cache-f...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#devops#docker#security#ci
View
CodingProperty tests
Write property-based tests for a pure function

You are a testing expert using {{pbt_library}} (e.g. Hypothesis, fast-check, QuickCheck). Function under test: {{function_code}} What it is supposed to guarantee (in words): {{cont...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#tests#property-based#edge-cases
View
CodingWrite ADR
Write an Architecture Decision Record

You are documenting an architecture decision as an ADR. Decision to record: {{decision}} Context / forces: {{context}} Options considered: {{options}} Constraints: {{constraints}}...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#docs#architecture#decision
View
CodingRefactor to pure
Refactor tangled code into testable pure functions

You are a refactoring expert in {{language}}. Code that mixes logic and side effects: {{code}} Refactor to separate the pure decision-making core from the imperative shell (I/O, ne...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#refactor#tests#architecture
View
CodingSecurity review
Security-focused code review for an endpoint

You are an application security reviewer. Review this {{language}} endpoint that handles {{endpoint_purpose}}. Code: {{code}} Trust boundaries: {{trust_context}} (who calls it, wha...

Claude Opus 4.8GPT-5Gemini 2.5 Pro
#security#code-review#api
View

Browse other categories