Skip to content

Prompt library

Developer Prompt Library

Reusable prompts for recurring engineering tasks. Each one states when to use it, the inputs it needs, what good output looks like, its limitations and how to check the result before you rely on it.

Categories

  • Requirementsv1.0 · Beginner

    Feature Request to Acceptance Criteria

    Turn an informal feature request into testable acceptance criteria, with the assumptions and open questions made explicit.

    Use it when a request arrives as one sentence in a ticket, an email or a meeting note, and someone now has to build and test it. The prompt separates what was asked from what was assumed, then writes criteria that a tester could check without going back to the author to ask what they meant.

    Required inputs

    • feature_request
    • product_context
    • users_and_roles
    • constraints
    View prompt
  • Requirementsv1.0 · Beginner

    Requirements Ambiguity and Gap Review

    Review a requirements document for ambiguous wording, missing scenarios, contradictions and untestable statements before work starts.

    Use it on a specification, a set of user stories or a statement of work before you estimate or build from it. It finds the sentences two readers could interpret differently, the scenarios nobody wrote down and the requirements that contradict each other, and turns each one into a question you can take back to the author.

    Required inputs

    • requirements_text
    • domain_context
    • review_focus
    View prompt
  • Architecturev1.0 · Intermediate

    Architecture Decision Record Draft

    Draft an Architecture Decision Record from your notes on a decision, keeping the options, trade-offs and consequences honest and separate from your preferred answer.

    Use it after a team discussion has produced notes, a chat thread or a whiteboard photo, and the decision now needs to be written down so that people who join later understand why it was made. The prompt structures the context, the options considered and the consequences, and flags where your notes are silent.

    Required inputs

    • decision_topic
    • discussion_notes
    • constraints
    • decision_status
    View prompt
  • Architecturev1.0 · Intermediate

    REST API Design Review

    Review a proposed HTTP API contract for consistency, error handling, versioning and client-friendliness before implementation starts.

    Use it on a draft OpenAPI file, a list of endpoints or a design document before anyone writes handlers. It catches inconsistent naming, unclear failure behaviour, missing pagination and operations that cannot be retried safely, while changes are still cheap.

    Required inputs

    • api_contract
    • consumers
    • conventions
    View prompt
  • Backendv1.0 · Intermediate

    Endpoint Implementation Plan

    Produce a step-by-step implementation plan for one API endpoint that fits your existing code structure, before any code is written.

    Use it when you are about to add an endpoint to an existing service and want a plan you can check against the codebase first. The plan covers validation, layering, errors, data access and tests, and lists what it needs to confirm rather than guessing file names.

    Required inputs

    • endpoint_spec
    • code_structure
    • stack
    • non_functional_needs
    View prompt
  • Backendv1.0 · Intermediate

    Backend Error Handling Review

    Review a piece of backend code for swallowed errors, leaky messages, missing cleanup and unsafe retries.

    Use it on a service function, a request handler or a background job that talks to a database or another service. It points at the places where a failure would be hidden, misreported or left half-finished, with the specific lines to look at.

    Required inputs

    • code
    • language_and_framework
    • failure_context
    View prompt
  • Frontendv1.0 · Beginner

    Screen to Component Plan

    Break a screen description or wireframe into a component tree with props, state ownership and the states each component must handle.

    Use it before building a new screen. You describe what the screen shows and does, and the prompt proposes a component structure, decides where state should live, and lists loading, empty and error states so they are designed rather than discovered late.

    Required inputs

    • screen_description
    • framework
    • existing_components
    View prompt
  • Frontendv1.0 · Intermediate

    Accessibility Review of a UI Component

    Review the markup and behaviour of one UI component against common accessibility requirements and list concrete fixes.

    Use it on a single component such as a modal, form, menu or table before it is merged. It checks semantics, keyboard operation, focus management, labels, and colour and motion concerns, and tells you what it could not judge from code alone.

    Required inputs

    • component_code
    • component_purpose
    • target_standard
    View prompt
  • Securityv1.0 · Intermediate

    Threat Model a New Feature

    Produce a lightweight threat model for a feature: assets, trust boundaries, plausible threats and the mitigations to discuss.

    Use it at design time, before a feature that handles accounts, files, payments, personal data or integrations is built. It gives the team a structured list of what could go wrong and where to look, so the security conversation starts from something concrete.

    Required inputs

    • feature_description
    • architecture_summary
    • data_and_users
    • existing_controls
    View prompt
  • Securityv1.0 · Intermediate

    Injection Risk Review of a Diff

    Review a code change for injection risks: SQL, command, template, path and header injection from untrusted input reaching an interpreter.

    Use it on a pull request that touches database access, shell calls, file paths, HTML rendering or outgoing requests. It traces where input enters, where it ends up and whether anything stands between, so that you review data flow rather than skimming lines.

    Required inputs

    • diff
    • language_and_libraries
    • input_sources
    View prompt
  • Testingv1.0 · Intermediate

    Characterisation Tests for Legacy Code

    Plan and draft characterisation tests that pin down what a legacy function actually does today, so it can be changed safely.

    Use it when you must change code that has no tests and whose intended behaviour nobody can confirm. The prompt proposes inputs that exercise each branch, writes tests that assert current behaviour as observed, and flags behaviour that looks like a bug so you can decide what to do with it.

    Required inputs

    • legacy_code
    • test_framework
    • known_behaviour
    View prompt
  • Testingv1.0 · Beginner

    Test Case Design from Acceptance Criteria

    Derive a prioritised set of test cases from acceptance criteria, including boundary, negative and permission cases.

    Use it when you have acceptance criteria and need to turn them into a test plan that a person can execute or automate. It expands each criterion into specific cases, adds the negative and boundary cases that are usually forgotten, and reports where a criterion is too vague to test.

    Required inputs

    • acceptance_criteria
    • system_context
    • test_level
    View prompt
  • Debuggingv1.0 · Beginner

    Stack Trace Root-Cause Analysis

    Read a stack trace alongside the relevant code and produce ranked hypotheses for the root cause, each with a way to test it.

    Use it when an error has a stack trace and you want to move from the symptom to a cause. The prompt asks for competing hypotheses rather than one confident answer, and for a cheap check that would confirm or rule out each, so you debug by evidence instead of by trusting a guess.

    Required inputs

    • stack_trace
    • relevant_code
    • what_changed_and_how_it_happens
    View prompt
  • Debuggingv1.0 · Advanced

    Intermittent Failure Investigation Plan

    Build an investigation plan for a failure that happens only sometimes: what to record, what patterns to look for and which experiments to run.

    Use it for flaky tests, rare production errors and problems that disappear when you try to reproduce them. The prompt helps you decide what evidence to collect first, lists the usual causes of intermittency such as timing, shared state and environment, and proposes experiments that narrow them down.

    Required inputs

    • failure_description
    • frequency_and_pattern
    • system_description
    • available_evidence
    View prompt
  • Databasev1.0 · Advanced

    Migration Locking and Safety Review

    Review a schema migration for locking, downtime, data-loss and rollback risks before it runs against a live database.

    Use it before applying a migration to a database that is serving traffic. It looks at each statement for locks that could block reads or writes, long table rewrites, destructive changes and mismatches between the migration and the application code that runs during the deployment.

    Required inputs

    • migration_sql
    • database_engine
    • table_facts
    • deployment_process
    View prompt
  • Databasev1.0 · Advanced

    Slow Query Review

    Analyse a slow SQL query and its execution plan to find the likely causes and the changes worth testing.

    Use it when a specific query is slow and you have its text, the table definitions and the execution plan. The prompt reads the plan, locates the expensive steps and proposes changes ranked by likely benefit and risk, each with a way to measure whether it helped.

    Required inputs

    • query
    • schema
    • execution_plan
    • constraints
    View prompt
  • Refactoringv1.0 · Intermediate

    Refactoring Plan in Small Safe Steps

    Turn a refactoring goal into an ordered series of small, individually verifiable steps with a safety net for each.

    Use it before a refactoring that touches more than one function: restructuring a module, replacing a dependency or splitting a class. The prompt breaks the goal into steps that each leave the code working, says how to check each step, and identifies what tests must exist before you begin.

    Required inputs

    • refactoring_goal
    • code_overview
    • test_situation
    • constraints
    View prompt
  • Refactoringv1.0 · Beginner

    Safe Extract-Function Refactoring

    Extract a block of code into a well-named function while preserving behaviour, with the data flow and side effects spelled out.

    Use it when a long function mixes several jobs and you want to pull one out. The prompt analyses what the block reads, writes and returns, picks parameters and a return shape, and lists the behaviour risks such as shared mutable state or early returns, so the extraction does not change what the code does.

    Required inputs

    • source_function
    • block_to_extract
    • language_and_conventions
    View prompt
  • Docsv1.0 · Beginner

    Module Documentation for New Joiners

    Write onboarding documentation for a code module that explains what it is for, how it fits together and where to start, using only what the code shows.

    Use it when a module has no documentation and new team members keep asking the same questions. Give it the code and a few facts, and it drafts a guide with the purpose, the main flow, key concepts, how to run and change it safely, and a list of things only a person who knows the system can confirm.

    Required inputs

    • module_code
    • audience
    • known_context
    • doc_format
    View prompt
  • Docsv1.0 · Intermediate

    Operational Runbook Draft

    Draft an operational runbook for a service or alert: how to recognise the problem, check it, fix it safely and know when to escalate.

    Use it when an alert or recurring operational task needs written steps so that whoever is on duty, including someone unfamiliar with the service, can act without guessing. You provide the symptoms and what you know about checking and fixing it, and the prompt shapes it into a runbook with verification steps and escalation.

    Required inputs

    • alert_or_task
    • system_knowledge
    • reader
    • escalation
    View prompt