# Write and evaluate AI prompts

Writes, refactors, and evaluates LLM prompts. Templates, structured output schemas, evaluation rubrics, test suites.

Curated by The Design Project. Adapted from the original skills repo.

## How TDP uses it

Every AI feature has a prompt as config. I use this to refactor flaky prompts, convert ad-hoc prompts to structured (JSON / function calling), and write evals so I know if changes actually improved things.

Activation and available tools depend on the host and installed version.

## Your first task

Bring: The current prompt, representative inputs, expected outputs, and known failure examples.

Task: Define the output format and missing-input behavior, then run old and revised prompts on the same cases.

Check: Compare correctness, format compliance, and failure handling; include unfamiliar inputs in the evaluation.

## When to use this workflow

Use this workflow when a repeated prompt produces inconsistent, incomplete, or hard-to-review output. Gather examples of both acceptable and failed results before rewriting it. The goal is to make the task and evaluation clearer, not merely to make the prompt longer.

## A worked example

For a component-audit exercise, define the required output fields: component, source, observed issue, evidence, recommendation, and unknowns. Supply the same representative inputs to the old and revised prompts. Compare whether findings are correct and grounded, not just whether the new response follows the requested table format.

## Decisions and common mistakes

Test missing context and conflicting sources. The prompt should make uncertainty visible rather than encourage a confident guess. Include a nearby task that should be outside scope so the instructions do not turn every request into an audit or an implementation.

## What to hand off

Keep the evaluation examples and record which revision improved which failure. When a prompt becomes a stable procedure used repeatedly, consider packaging it as a skill. Preserve links to current project context so the procedure does not become a stale copy of the product rules.

## Step-by-step setup

1. Choose one task, provide the relevant files or brief, and define the expected output.
2. Review the source and prerequisites; install the skill or open the original resource.
3. Apply it with current project context.
4. Review the result against the actual requirements.
5. Save approved outputs and record limitations.

```bash
npx skills add thedesignproject/agent-skills -s prompt-engineer
```

[Full skill source](https://github.com/thedesignproject/agent-skills/tree/main/skills/prompt-engineer)

## Starter request

Refactor this prompt with explicit inputs, output schema, failure behavior, and evaluation cases. Compare it against the current version using the same examples.

## Use it in a workflow

### Copy and AI prompts

Building or rewriting landing pages, pricing pages, onboarding flows, or AI features.

1. [Apply marketing psychology](https://designproject.io/resources/skills/marketing-psychology/) — Anchor copy / pricing / CTAs in real behavioral principles
2. [Write and evaluate AI prompts](https://designproject.io/resources/skills/prompt-engineer/) — Refactor the AI-powered features behind that copy into structured, evaluated prompts

[Browse all agent skills](https://designproject.io/resources/skills/)

[Original TDP skills repo](https://designproject.io/skills-repo/)

Canonical: https://designproject.io/resources/skills/prompt-engineer/

## Keep learning

- [Use the Figma MCP](https://designproject.io/resources/skills/figma-use/)
- [Context OS principles](https://designproject.io/resources/skills/context-principles/)
- [How to write a design.md file: a step-by-step guide](https://designproject.io/resources/guides/write-design-md/)
