example-tool
A reference implementation of the PAI SKILL.md convention. Copy this
directory as a starting point for any new skill.
Related docs: ../../SKILLS.md,
../SKILL.md, ../../AGENTS.md,
../../TOOLS.md.
1. Purpose
example-tool exists so that contributors and agents have a known-good
template to copy when creating a new PAI skill. It is not intended to
perform useful work on its own — its value is that every field is
populated, every required section exists, and the structure is easy to
adapt.
2. Instructions
When this skill is triggered, the agent should:
- Ask the user for
target_name if it was not provided. The name must
be kebab-case, lowercase, and not already present under /skills/.
- Create the directory
/skills/<target_name>/.
- Copy
/skills/example-tool/SKILL.md to
/skills/<target_name>/SKILL.md.
- Update the YAML frontmatter in the new file:
- Set
name to <target_name>.
- Rewrite
description, triggers, inputs, outputs,
constraints, and examples for the new skill.
- Reset
version to 0.1.0.
- Rewrite the body sections (Purpose, Instructions, Guardrails,
Example session, Testing, Changelog) to describe the new skill.
- Add a row for the new skill to the catalog table in
../../SKILLS.md and
../SKILL.md.
- Run
scripts/validate-skills.sh if it exists; otherwise prompt the
reviewer to validate by hand.
- Open a pull request.
3. Guardrails
The agent MUST NOT:
- Overwrite an existing skill directory without explicit user approval.
- Commit credentials, API tokens, or any file listed in
.gitignore.
- Declare triggers so broad that the skill would activate for unrelated
requests (e.g.,
"any request").
- Skip the catalog update in ../../SKILLS.md — a
skill that is not in the catalog is effectively invisible.
- Increase
version beyond 0.1.0 on initial creation.
4. Example session
User: I want to add a skill that generates release notes from a git range.
Agent: I'll use example-tool as a template. Skill name: generate-release-notes?
User: Yes.
Agent: Created /skills/generate-release-notes/SKILL.md from the template,
updated frontmatter (name, triggers, inputs for git_range), rewrote
the body, and added a row to SKILLS.md and skills/SKILL.md.
Ready for review.
5. Testing this skill
Manual-test steps:
- From a clean checkout, invoke the skill with
target_name=test-skill.
- Verify
/skills/test-skill/SKILL.md exists and its frontmatter
name is test-skill.
- Verify new rows appear in both ../../SKILLS.md
and ../SKILL.md.
- Run
scripts/validate-skills.sh (if present) and confirm exit 0.
git status should show only the new skill directory and the two
catalog edits — nothing else.
- Revert the test changes before committing.
6. Changelog
0.1.0 — Initial template skill.
1---2name: example-tool3description: A template skill demonstrating the PAI SKILL.md format.4---56# example-tool78A reference implementation of the PAI `SKILL.md` convention. Copy this9directory as a starting point for any new skill.1011Related docs: [../../SKILLS.md](../../SKILLS.md),12[../SKILL.md](../SKILL.md), [../../AGENTS.md](../../AGENTS.md),13[../../TOOLS.md](../../TOOLS.md).1415## 1. Purpose1617`example-tool` exists so that contributors and agents have a known-good18template to copy when creating a new PAI skill. It is not intended to19perform useful work on its own — its value is that every field is20populated, every required section exists, and the structure is easy to21adapt.2223## 2. Instructions2425When this skill is triggered, the agent should:26271. Ask the user for `target_name` if it was not provided. The name must28 be kebab-case, lowercase, and not already present under `/skills/`.292. Create the directory `/skills/<target_name>/`.303. Copy `/skills/example-tool/SKILL.md` to31 `/skills/<target_name>/SKILL.md`.324. Update the YAML frontmatter in the new file:33 - Set `name` to `<target_name>`.34 - Rewrite `description`, `triggers`, `inputs`, `outputs`,35 `constraints`, and `examples` for the new skill.36 - Reset `version` to `0.1.0`.375. Rewrite the body sections (Purpose, Instructions, Guardrails,38 Example session, Testing, Changelog) to describe the new skill.396. Add a row for the new skill to the catalog table in40 [../../SKILLS.md](../../SKILLS.md) and41 [../SKILL.md](../SKILL.md).427. Run `scripts/validate-skills.sh` if it exists; otherwise prompt the43 reviewer to validate by hand.448. Open a pull request.4546## 3. Guardrails4748The agent MUST NOT:4950- Overwrite an existing skill directory without explicit user approval.51- Commit credentials, API tokens, or any file listed in `.gitignore`.52- Declare triggers so broad that the skill would activate for unrelated53 requests (e.g., `"any request"`).54- Skip the catalog update in [../../SKILLS.md](../../SKILLS.md) — a55 skill that is not in the catalog is effectively invisible.56- Increase `version` beyond `0.1.0` on initial creation.5758## 4. Example session5960```61User: I want to add a skill that generates release notes from a git range.62Agent: I'll use example-tool as a template. Skill name: generate-release-notes?63User: Yes.64Agent: Created /skills/generate-release-notes/SKILL.md from the template,65 updated frontmatter (name, triggers, inputs for git_range), rewrote66 the body, and added a row to SKILLS.md and skills/SKILL.md.67 Ready for review.68```6970## 5. Testing this skill7172Manual-test steps:73741. From a clean checkout, invoke the skill with `target_name=test-skill`.752. Verify `/skills/test-skill/SKILL.md` exists and its frontmatter76 `name` is `test-skill`.773. Verify new rows appear in both [../../SKILLS.md](../../SKILLS.md)78 and [../SKILL.md](../SKILL.md).794. Run `scripts/validate-skills.sh` (if present) and confirm exit 0.805. `git status` should show only the new skill directory and the two81 catalog edits — nothing else.826. Revert the test changes before committing.8384## 6. Changelog8586- `0.1.0` — Initial template skill.