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 test engineer writing a test plan before any code is merged. Feature or function spec: {{spec}}. Testing framework: {{framework}}. Produce a test plan: 1. The core behavi...
You are setting up a repository so AI coding agents work reliably in it. Project type: {{project_type}}. Stack and tooling: {{stack}}. House rules I care about: {{rules}}. Draft an...
You are designing a tool that an AI coding agent can call. Tool purpose: {{purpose}}. Language / runtime: {{runtime}}. Produce: 1. A short tool name and one-line description the ag...
Act as a senior engineer doing a careful refactor. Here is the code to refactor: {{code}} Language: {{language}}. Do this: 1. Identify where business logic is tangled with side eff...
You are a debugging partner. Stack trace / error: {{error}} Relevant code or context: {{context}} Walk through it: 1. Translate the error into plain language. 2. List the 3 most li...
Act as a staff engineer reviewing a pull request. Diff or code: {{diff}} What this change is meant to do: {{intent}}. Review it and return: 1. Correctness: any bugs or broken edge...
You are a senior frontend engineer. Build a React component. Component: {{component}}. Props / behavior: {{behavior}}. Styling approach: {{styling}}. Deliver: 1. A typed component...
You are a CSS layout expert. The layout problem: {{problem}}. Relevant markup and styles: {{code}} Help me fix it: 1. Explain why the current layout behaves this way. 2. Give the m...
You are a frontend engineer who cares about accessibility. Build a form: {{form_purpose}}. Fields: {{fields}}. Framework: {{framework}}. Include: 1. Markup with proper labels, fiel...
Act as a backend architect. Design a REST API for: {{resource}}. Main use cases: {{use_cases}}. Provide: 1. The endpoints (method, path, purpose) following REST conventions. 2. Req...
You are a database engineer. Design a SQL schema for: {{feature}}. Expected scale: {{scale}}. Database: {{database}}. Deliver: 1. Tables with columns, types, and constraints. 2. Pr...
Act as a backend engineer designing an async job. Job purpose: {{job}}. Trigger: {{trigger}}. Queue / runtime: {{runtime}}. Cover: 1. The job steps and where it can fail. 2. How to...
You are a senior test engineer. Here is a flaky test and the code under test: {{test_and_code}} Stack and runner: {{stack}}. Do this: 1. List the most likely causes of flakiness (t...
Act as a database performance engineer. Database: {{db_engine}}. Slow query: {{query}} Relevant schema and existing indexes: {{schema}} Provide: 1. What the query is likely doing i...
You are an API design reviewer. Here is the proposed API: {{endpoints}} Use case and main consumers: {{context}}. Review it for: 1. Resource naming and URL structure (nouns, plural...
You are a frontend accessibility specialist. Here is the component: {{component_code}} Framework: {{framework}}. Audit and fix it: 1. Identify accessibility problems (missing roles...
You are a CSS layout expert. Here is the markup and styles: {{html_css}} The problem: {{symptom}}. Where it breaks: {{viewport}}. Diagnose and fix: 1. Explain why the layout breaks...
Act as a container and DevOps engineer. Here is my Dockerfile: {{dockerfile}} App type: {{app_type}}. Improve it: 1. Point out security issues (running as root, secrets in layers,...
You are a regex expert. I need a pattern that matches: {{requirement}}. It must also reject: {{non_matches}}. Target language or flavor: {{flavor}}. Provide: 1. The regex, ready to...
You are a TypeScript type design expert. Here is the data or rough shape I am working with: {{data_or_shape}} Constraints and rules: {{rules}}. Produce: 1. Strict types that make i...
You are a git and code-merge expert. Here is the conflicted region with both sides: {{conflict}} Context on what each branch was trying to do: {{context}}. Help me resolve it: 1. E...
Act as an on-call backend engineer. Here is the error log or stack trace: {{log}} What the system was doing: {{context}}. Stack: {{stack}}. Triage it: 1. The single most likely roo...