Prompts that ship

AI Prompt Library

Search, filter and copy production-tested prompts. Organized by workflow, not hype.

6 prompts
💻 Coding

Refactor to production-ready

Refactor the following code for readability, performance, and error handling. Explain each change with rationale.

```
{code}
```
💻 Coding

Design an API endpoint

Design a REST endpoint for {feature}. Include route, request/response schema (Zod), auth, edge cases, and example curl.
💻 Coding

Write unit tests

Write thorough unit tests for the following function using {framework}. Cover happy path, edge cases, and failure modes.

```
{code}
```
💻 Coding

Build an AI agent spec

Design an AI agent that {goal}. Return system prompt, tool definitions with JSON schemas, memory strategy, guardrails, failure handling, evaluation set and cost estimate per run.
💻 Coding

Debug with root-cause analysis

Here is an error and the relevant code. Give the most likely root cause, two alternative hypotheses, the minimal fix, and a regression test.

{error}

```
{code}
```
💻 Coding

GPT-6 Astra Full-Stack System Refactor & Test Suite

Act as GPT-6 Astra senior lead engineer. Review the following code, refactor it for production readiness, implement type safety with Zod/TypeScript, handle edge cases, and generate complete unit tests using {framework}.

```
{code}
```