Category

Coding

Programming, debugging, and architecture prompts.

55 prompts
Add Diagnostics Before Guessing

Instrument first, theorize second — logging with a stated plan for capturing the failure.

Add Types Incrementally

Type one file with runtime behavior frozen, and make the type-checker output the proof.

Adversarial Security Review

Have the AI attack your own code: ranked vulnerabilities, a concrete exploit for each, and the fix.

Bisect a Regression

Walk the history between a known-good commit and main to find the culprit diff.

Break a God Function Apart

Split an oversized function into well-named pieces without changing external behavior.

Check the Diff Against the Plan

Audit finished work against the plan it was supposed to follow — gaps only, no style notes.

Commit and Open a PR

Close out a session with a why-focused commit and a PR that carries a test plan.

Conventional Commit Message

A properly formatted commit whose body explains why, derived only from the staged diff.

Convert Code Between Languages

An idiomatic port, not a transliteration — with anything that doesn't translate flagged rather than faked.

Debug a Performance Problem

Find the N+1s, blocking calls, and hot loops, ranked by impact-per-effort.

Design a Database Schema

CREATE TABLE statements with constraints, indexes, and the reasoning behind each choice.

Design a REST API

Endpoint-by-endpoint design including the error responses most API specs forget.

Design a System Component

A component design with data model, API surface, the hard parts, and what to defer to v2.

Document a Function or Module

Complete JSDoc or docstrings with precise types, throws, constraints, and a usage example.

Document What You Built

Update docs strictly from the diff, with no invented features.

Explain a Concept With Real Code

A concept taught through code you'd actually ship, plus when not to use it.

Explain Inherited Code

Onboard onto unfamiliar code fast — inputs, side effects, and the footguns the author baked in.

Explore Before You Plan

Make the agent read and explain a subsystem before it touches a single line of it.

Feature From a Specification

Build exactly the listed requirements against your existing patterns — and nothing more.

Fix a Bug Without Breaking Things

Find every affected code path and the same bug elsewhere before landing the minimal fix.

Function From Requirements

A typed, documented function built to spec — with three unit tests covering the edge and error cases.

Generate Test Fixtures

Happy path, boundary values, and a deliberate failure case — each with a note on what it covers.

Integration Tests for an API Route

Cover the success path, validation, auth failures, 404s, and side effects of one endpoint.

Learn a Language by Comparison

Map a language you know onto one you don't, with the gotchas and habits that will hurt you.

Map the Blast Radius of a Change

Find every caller a signature change would break, and the safe order to migrate them.

Modernize an API Call Incrementally

Migrate off a deprecated dependency one file at a time, stopping the moment tests fail.

Optimize a Slow Query

Read the execution plan, name the real bottleneck, and get a rewrite plus the exact index to add.

Phased Implementation Plan

A numbered plan with a verification step per phase, produced before any code is written.

Post-Mortem the Session

Convert what went wrong into a one-line rule your agent config carries forward.

Production Readiness Review

A pre-ship review of security, error handling, scale, and observability — no style nitpicks.

Pull Context From an Issue

Have the agent read the ticket itself, find the relevant code, and propose a plan.

Pull Request Description

Turn a diff into a scannable PR write-up with risks, rollback, and a reviewer checklist.

Refactor to Match a Pattern

Point at a file you already like and have the agent bring another one in line with it.

Regex From Examples

Give match and non-match examples, get a regex plus a plain-English breakdown and extra test strings.

Remove Dead Code Defensively

Require proof of zero callers before anything is deleted, and approval before it happens.

Reproduce an Intermittent Bug

Rank the likely causes of a flaky bug and get a deterministic way to reproduce the top one.

Reproduce, Then Fix

Force a failing test that captures the bug before any fix is allowed to land.

Review an Architecture Decision

An honest, unhedged comparison of two approaches with a named recommendation.

Review the Diff, Not the Repo

Keep review scoped to what actually changed — correctness issues only.

Scaffold a Project Structure

A minimal folder layout, boilerplate, and dependency list for a new project — nothing you didn't ask for.

Scope Into Agent-Sized Tasks

Split a rough goal into tasks small enough that each is one focused session.

TDD Pair: Failing Test First

Get the failing test and edge cases before any implementation exists — the AI stops after the test.

Test-Coverage Review

List the untested edge cases in a diff, then write the tests that would catch them.

Trace Data Flow

Follow a value through every function that touches it, with side effects and an ASCII flow diagram.

Triage With a Subagent

Delegate a read-only investigation so the findings come back without context bloat.

Write a README

A no-fluff README with only the sections your project actually needs filled in.

Write a Spec by Interviewing Me

Turn a vague idea into a written spec by making the model interrogate you first.

Write Missing Tests

Generate a test suite for untested code covering normal paths, edge cases, and error conditions.

Code Documentation Generator

Generate clear docs for a chunk of code — overview, parameters, usage, and gotchas.

Rubber Duck Debugging

Explain your code out loud and let the AI catch where your logic and the code disagree.

Write a Python Script From a Description

Turn a plain-language task description into a working Python script with error handling and a usage example.

Scaffold a Next.js Component

Generate a typed, styled Next.js component skeleton from a description.

Explain This Code Simply

Get a beginner-friendly, line-by-line explanation of any code snippet.

Refactor for Readability

Clean up code for clarity and maintainability without changing behavior.

Debug This Error

Get a clear root-cause explanation and the smallest fix for an error.