Agent Wranglers

AID-55Recommended

Write a description that says when to use the skill

Every skill's description says what it does, when to use it and the words people type to ask for it, in under 1024 characters.

How to do it

The agent sees only the descriptions when it picks a skill, so a vague one never runs or runs at the wrong time. Start with what the skill does. Then add "Use when" followed by the trigger words, such as "release", "ship" or "publish". Say what it does not cover when a nearby skill does. The Agent Skills format caps the description at 1024 characters. Claude Code cuts the description and its extra when_to_use text at 1536 characters in its list. Turn off automatic loading for skills only a person should start, such as a deploy. Claude Code uses disable-model-invocation: true, and Codex uses allow_implicit_invocation: false. Test that it triggers as Test each skill and keep it current says.

Examples

Markdown example

---
name: refund-order
description: Refund one paid order at Example Shop through the payment provider and email the customer. Use when asked to refund, reverse or give money back for an order. Not for subscriptions, which use cancel-subscription.
disable-model-invocation: true
---

Shell example

# Every description has a trigger sentence and fits the limit
for f in .claude/skills/*/SKILL.md; do
  d=$(sed -n 's/^description: //p' "$f")
  [ -n "$d" ] && [ ${#d} -le 1024 ] && grep -q "Use when" <<<"$d" || echo "FAIL $f"
done

How to check

A script fails when a description is empty, over 1024 characters or has no "Use when" sentence. Ask a fresh session five task prompts per skill. It picks the right skill for all five.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/ai-assisted-development/agent-skills/skill-description">Agent Wranglers AI-assisted development playbook</a>. In code you write, add a comment next to it with the same link.