Coding

Browse our collection of 9 ready-to-use coding prompts

Prompt

Code Review Assistant

Review your code for security vulnerabilities, performance, and best practices.

code reviewbest practicesquality
Prompt

Bug Debugging Helper

Diagnose a bug with root-cause analysis and a ready-to-use fix.

debuggingtroubleshootingerrors
Prompt

Bug Debugging Helper

Diagnose a bug with root-cause analysis and a ready-to-use fix.

Systematically diagnose a software bug by analyzing the gap between expected and actual behavior, then provide ranked solutions with root-cause explanations.

DEBUGGING PROCESS:

1. Problem Characterization
   - Restate the bug in precise terms: what happens vs. what should happen
   - Classify the bug type (logic error, runtime exception, race condition, state management, integration issue, environment mismatch, etc.)
   - Identify whether the bug is deterministic or intermittent

2. Root Cause Analysis
   - Trace the execution path through the provided code, narrating what happens at each step
   - Identify the exact point where behavior diverges from expectation
   - Consider multiple hypotheses and evaluate each against the evidence (error message, observed behavior, code context)
   - Check for common culprits: off-by-one errors, null/undefined references, type coercion, async timing, scope issues, mutation of shared state

3. Solution Development
   - Provide the primary fix with a clear code change
   - Explain WHY this fix resolves the root cause (not just what to change)
   - If multiple root causes are plausible, provide a ranked list of solutions with diagnostic steps to confirm which applies
   - Include any necessary guard clauses, error handling, or defensive checks

4. Prevention Guidance
   - Suggest tests that would have caught this bug
   - Recommend patterns or practices to prevent similar bugs in the future
   - Note any related areas in the code that may have the same vulnerability

OUTPUT CONSTRAINTS:
- Always explain the reasoning chain, not just the answer
- If the information provided is insufficient to diagnose with confidence, state exactly what additional information is needed and why
- Provide copy-paste-ready code fixes, not just descriptions
- If "What I've Already Tried" is provided, explain why those attempts did not work before giving new solutions
- Never suggest "just restart it" or "clear cache" without a causal explanation

FORMAT:
## Diagnosis
[Root cause explanation in plain language]

## Why This Happens
[Technical trace through the code showing the failure point]

## Solution
[Primary fix with code]

## Alternative Hypotheses (if applicable)
[Other possible causes if diagnosis is uncertain]

## Prevention
[Tests and practices to avoid recurrence]

---

MY INFO:

Expected Behavior: (required)

Actual Behavior: (required)

Error Message (if any): (optional - include full stack trace when available)

Code Context: (required)

Programming Language / Framework: (optional)

What I've Already Tried: (optional)

Environment Details (OS, runtime version, browser): (optional)

Is the bug deterministic or intermittent?: (optional)
debuggingtroubleshootingerrors
Prompt

API Documentation Generator

Generate complete API endpoint docs with request/response schemas and examples.

documentationapiopenapi
Prompt

Unit Test Generator

Write a thorough unit test suite covering happy paths and edge cases.

testingunit teststdd
Prompt

Refactoring Assistant

Refactor code for readability, performance, or maintainability with explanations.

refactoringclean codeoptimization
Prompt

Git Commit Message Writer

Generate a Conventional Commits message from your code changes.

gitversion controlworkflow
Agent

Full-Stack App Builder

Build a complete, working web app from a natural language description.

full-stackweb appcode generation
Agent

System Architecture Diagrammer

Generate a system architecture diagram in Mermaid from your stack description.

architecturediagramsaws
Agent

API Flow Visualizer

Create a detailed sequence diagram for any API or microservice flow.

apisequence diagramdocumentation