Agent skill · Workflow
SOP to agent skill
Reads a written process, pulls out its steps, decisions and done criteria, asks you about the gaps, then writes a spec-valid SKILL.md and checks it before you install it. Use when asked to run the "SOP to agent skill" workflow.
The sop-to-agent-skill/ folder with SKILL.md.
The skill itself. Agents read the name and description first and load the rest only when a task matches.
sop-to-agent-skill/SKILL.md
---
name: sop-to-agent-skill
description: Reads a written process, pulls out its steps, decisions and done criteria, asks you about the gaps, then writes a spec-valid SKILL.md and checks it before you install it. Use when asked to run the "SOP to agent skill" workflow.
---
# SOP to agent skill
Reads a written process, pulls out its steps, decisions and done criteria, asks you about the gaps, then writes a spec-valid SKILL.md and checks it before you install it.
## Inputs
Ask for any of these that the user hasn't given:
- `sop` (e.g. "Every Friday: export open tickets from the help desk, tag anything older than 7 days as stale, count stale tickets per agent, post the counts in #support-leads and DM anyone with more than 5.")
- `agent` (e.g. "Claude Code")
## Steps
Run the steps in order. Refer to saved results by name. Don't skip a step that says STOP.
1. **Paste the process** — Start: Start with {{sop}} and the agent it's for: {{agent}}.
2. **Pull out the steps and decisions** — From {{sop}} only, list in order: the trigger (what starts it), the inputs it needs, each step as one action, every decision point with its rule, the tools or access each step needs, and what done looks like. Then list what's missing or ambiguous: decisions with no rule, steps that rely on knowledge the text doesn't give, and tools the agent may not have. Number the gaps. Save the result as `outline`.
3. **Answer the gaps** — STOP and ask the user to approve before continuing: Show the numbered gaps in {{outline}}, each with a suggested answer. Approve to accept the suggestions, or edit the outline with your own answers before continuing.
4. **Write the SKILL.md** — Load the `sop-to-skill` skill, then: Write a SKILL.md for {{agent}} from {{outline}}, using the answers given to the gaps. Name: lowercase letters, digits and single hyphens, at most 64 characters, describing the job. Description: what it does, then 'Use when …', under 1,024 characters. Body: purpose, Inputs, Steps, Rules, Done when, and one short example. Put long lookup tables in references/ files and link them. Save the result as `skill_md`.
5. **Spec check** — Review loop (max 3 passes): Check {{skill_md}} against the Agent Skills spec. Pass only if: the frontmatter has only name and description; the name is 1-64 lowercase letters, digits and single hyphens; the description says what it does and when to use it, in under 1,024 characters; every step is one instruction to the agent; every file the body links is included; nothing asks the agent to run commands or fetch URLs the process didn't mention; and every step in {{outline}} appears. Save the result as `skill_md`.
6. **Return the skill** — Finish: Return {{skill_md}} with the folder it goes in for {{agent}} (.claude/skills/<name>/, .agents/skills/<name>/ or .github/skills/<name>/), then suggest saving it on /skills/new.
## Done when
Every step has run, each approval was given, and you've reported what was produced and where it was saved.