# Template and Workflow Skills — Claude Code Skills & SKILL.md

Source: https://www.geekswithgeeks.com/en/claude-code-skills/p-template

> Produce documents and multi-step workflows in a consistent shape.

## Consistency by construction

Many tasks are about producing the **same kind of output** reliably: release notes, incident reports, design docs, meeting summaries, API documentation, commit messages. A skill with a **template** (in `templates/`), a short **style guide** (in `references/`) and a worked **example** makes every output follow your format and tone. **Workflow skills** chain several steps with checkpoints: gather facts (with scripts), draft, check against rules, ask the user to approve, then finish. Useful ideas: ask for **missing inputs once, up front**; put **approval gates** before irreversible actions; end with a **checklist of what was done**; and offer an **escape hatch** ("if the repository has no tags, ask which commit to start from"). Keep creative freedom where it helps (wording) and strictness where it matters (structure, numbers, names).

## A workflow with approval gates (illustrative)

Checkpoints before anything irreversible. Not run here.

```markdown
## Workflow
1. **Gather** (no side effects): run `scripts/collect.py`; if inputs are missing, ask for them once.
2. **Draft**: fill `templates/incident-report.md` using only collected facts.
3. **Check**: confirm every number and timestamp appears in the collected data.
4. **Approval gate**: show the draft and ask "Publish to the wiki? (yes/no)". Stop if no.
5. **Publish**: run `scripts/publish.py --page <name>` (only after a clear yes).
6. **Report**: list what was done and the page URL.
```

## Ask for missing inputs once

Gather all required inputs up front instead of interrupting repeatedly.

**Quiz:** Where should a workflow skill place an approval gate?

- [x] Before irreversible or external actions such as publishing or deleting
- [ ] After everything is already done
- [ ] Never
- [ ] Only at the very first line

*Answer:* Before irreversible or external actions such as publishing or deleting. Approval is useful only before the action it guards.
