---
name: prompt-engineer-brief
description: "Builds a structured prompt with a role, constraints, examples and an output schema, plus a test case that shows whether it works. Use when a task needs a reusable, well-structured prompt with a role, rules, examples, an exact output format and a test to prove it works. Do not use for quick one-off questions or tuning model settings. Related topics: AI, writing."
---

# Prompt Engineer Brief

Builds a structured prompt with a role, constraints, examples and an output schema, plus a test case that shows whether it works.

## When to use

Use this skill when a task needs a reusable, well-structured prompt with a role, rules, examples, an exact output format and a test to prove it works. Do not use it for quick one-off questions or tuning model settings.

## Workflow

1. Ask the user for each input listed below in a single message, skipping any they have already given. Where options are listed, offer them, but accept other answers too.
2. Define the task, the user of the output and the variable parts of the input before writing any instruction.
3. Write instructions in a fixed order from role to output schema, expressing constraints as positive, testable rules.
4. Add one normal and one edge example, plus a rule and example aimed at the named failure.
5. Specify what the prompt does when input is missing or unclear.
6. Write a three-case test plan with the pass condition for each and the first parts to adjust on failure.

## Inputs

- **Task the prompt must perform** (longer free text)
- **Who uses the output** (free text, e.g. "Person or program")
- **Output format needed** (choose one: Free text, Markdown, JSON, Table, Code)
- **Constraints** (longer free text)
- **Good example** (longer free text)
- **Failure to prevent** (longer free text)

## Output

The finished prompt in one block, followed by a test plan with typical, edge and adversarial inputs, each with a pass condition and tuning notes.

## Prompt template

Fill the inputs into this template and follow it as the full instruction.

### Prompt Engineer Brief

Write a production-quality prompt for this task.

- Task the prompt must perform: {{Task the prompt must perform}}
- Who uses the output: {{Who uses the output}}
- Output format needed: {{Output format needed}}
- Constraints: {{Constraints}}
- Good example: {{Good example}}
- Failure to prevent: {{Failure to prevent}}

Write the prompt in this order: role in one sentence, the task with its purpose, the input described with its variable parts marked, step-by-step instructions where the order matters, constraints as positive rules, the output format with an exact schema or template, and one or two examples that cover a normal case and an edge case. State what to do when the input is missing or unclear, instead of leaving the model to guess. Address the stated failure directly with a rule and an example. Keep every sentence testable. After the prompt, give a test plan: one typical input, one edge input and one adversarial input, each with the output that would count as a pass. Note which parts to tune first if the test fails.

## Pitfalls

- Describing the output loosely, so each run returns a different shape that code cannot parse.
- Giving only a perfect example, so the prompt fails on the first messy input.
- Stacking dozens of rules with no priority, which leads to the important one being ignored.
