The description is specific enough to exclude a nearby task.
Turn a repeated prompt into a skill
Convert the prompt you paste every week into an Agent Skills folder with a specific trigger, an output contract, a guardrail and two pass tests.
You are converting a prompt I use repeatedly into an Agent Skills folder.
Inputs:
- Current prompt: [PROMPT]
- When I use it: [TRIGGER]
- Good output: [OUTPUT]
- Failure I want to prevent: [FAILURE]
Produce:
1. A `description` of at most two sentences that names the situation, not the topic. It must be specific enough that a different task will not load the skill.
2. The `SKILL.md` body: when to use, inputs, procedure, output contract and guardrail. Keep it under 500 words.
3. The folder layout: which files belong in `references/`, `scripts/` and `assets/`, if any.
4. Two test prompts with a pass condition for each: one that should trigger the skill, one that should not.
5. A "keep it a prompt" note: which parts are too one-off or too personal to put in a skill.
Rules:
- Do not name a model or a vendor-specific tool in the instructions.
- Do not include a secret, token or customer name.
- The guardrail must name the failure it prevents, not just say "be careful".
- The description is the trigger. If it could describe three unrelated tasks, rewrite it.
| Variable | What to put there |
|---|---|
[PROMPT] | The version you actually paste, with the placeholder values. The edits you make every time are the requirements. |
[TRIGGER] | The moment the skill should fire: “after a discovery call”, “before a release”, not “for writing”. |
[OUTPUT] | The sections or shape of a good answer, so a missing part is visible. |
[FAILURE] | The specific failure the skill must prevent: invented numbers, edited tests, missing caveats. |
How to use this template
Start from the prompt you actually use. The idealized version hides the constraints that make it work.
Write the description last, after the procedure. The trigger should summarize the job, not the topic.
Add one test that should not trigger the skill. A skill that loads for everything is a tax on every task.
Install it in one project, run it for a week, then decide whether to keep it. A skill you never load is a prompt with extra steps.
Guardrails before you trust the output
The SKILL.md has an output contract and a guardrail.
The folder contains no secret or customer data.
At least one test checks that the skill does not trigger.
Variations worth keeping
If the prompt needs a script
Put the script in `scripts/` and make the skill call it with explicit arguments. Do not paste code into the instructions; the agent will rewrite it.
If the prompt is personal judgment
Keep it a prompt. A skill that encodes your taste without a pass test will make every agent output sound the same.
Why convert a prompt at all
A prompt is a message; a skill is a file the agent can find next month. The conversion is worth it when the same prompt comes back with the same structure, the same guardrails and the same output contract. That repetition is the signal.
It is not worth it for a prompt you use once a quarter, a prompt that depends on a private conversation, or a prompt whose value is your judgment in the moment.
What makes a skill trigger
The description is the only part the agent sees before loading the skill. If it says “helps with writing”, it will fight with every writing task. If it says “rewrites a draft for one named reader and preserves caveats”, it fires when that is the job.
Write the description as a situation. Then test it against a nearby task that should not load the skill.
What good looks like
The body is short enough to read in one pass. It names the inputs, the procedure and the output. The guardrail names the failure: “remove an unsupported claim, do not soften it” is a guardrail; “be accurate” is not.
The two tests are the proof. One prompt should trigger the skill and pass; one should not trigger it at all.
Adapt it to your work
For a team, keep the skill in the repository and review changes like code. For a client, keep the client-specific references out of the shared skill and load them from a private folder.
Failure modes
- The skill is a second README. If the agent loads it for every task, the description is too broad.
- The skill hides a secret. A reference file with an API key is a leak, not a shortcut.
- The skill has no test. You will not know whether it helps or just adds tokens.
Related templates
/prompts/turn-a-prompt-into-a-skill.md. If the scenario is close but not right, send the gap to the help desk with the output you expected.
Found a gap in the library?
Send the scenario, the prompt that failed, or the harness change that broke your setup. The help desk takes questions and corrections from humans and agents, and every accepted fix updates the page date.