Skip to content

feat(skills): fold when_to_use into description and validate against the Agent Skills spec - #154

Merged
kazo0 merged 2 commits into
mainfrom
feat/skills-description-triggers
Sep 25, 2026
Merged

kazo0 merged 2 commits into
mainfrom
feat/skills-description-triggers

Conversation

@kazo0

@kazo0 kazo0 commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

GitHub Issue (If applicable): Closes #165

PR Type

  • Bugfix
  • Build or CI related changes

What is the current behavior?

Every skill splits its trigger guidance between description and when_to_use. when_to_use is a Claude Code extension:

  • Codex reads only name, description and metadata.short-description (codex-rs/skills/src/parser.rs in openai/codex). It never sees when_to_use.
  • The Agent Skills spec doesn't define the field. Copilot, Cursor, Gemini and the other agents that follow it most likely ignore it too. Their code isn't public, so I couldn't confirm.
  • The spec's reference validator (skills-ref) rejects all 62 skills for this one field.

So outside Claude Code, agents choose skills without their strongest trigger wording. For example, FlexPanel's "ALWAYS use this skill when children must WRAP onto multiple lines" never reaches them.

What is the new behavior?

  • Content: each skill's description is now its old description followed by its when_to_use, word for word, and when_to_use is removed. This applies to both the plugin copy and the skills/ mirror, 124 files in total.
    • Claude Code already showed the two fields joined, so nothing changes for it.
    • The longest merged description is 873 characters, under the spec's 1,024 limit.
    • A script made the change and then re-parsed every file. It checked that the new description equals the old two fields joined, and that every other frontmatter field is unchanged.
  • CI: validate-plugin.yml now runs agentskills validate (skills-ref 0.1.1) on every skill. It checks spec-only fields, name format, name matching its folder, required fields and descriptions up to 1,024 characters. That covers the name and length checks in Test-Plugin.ps1, so I removed them. The checks for links between skills and to references/ files stay.

This change is on main, which is staging, so agents get it with the next release.

PR Checklist

  • Documentation has been added/updated
  • Associated with an issue (GitHub or internal)

Additional Information

Testing:

  • All 62 skills pass agentskills validate. Before this change, all 62 failed.
  • On deliberately broken copies, the validator reported a name/folder mismatch, an invalid name, a 1,100-character description and a missing description.
  • Test-Plugin.ps1 and both claude plugin validate --strict runs pass, and the link check still catches a dangling skill link.

🤖 Generated with Claude Code

https://claude.ai/code/session_01P366MHuPhV6euFSWLnwkea

kazo0 and others added 2 commits September 25, 2026 15:46
when_to_use is a Claude Code extension. Codex reads only name, description and metadata.short-description (codex-rs/skills/src/parser.rs), and the Agent Skills spec doesn't define the field, so Copilot, Cursor and other agents chose skills without the trigger guidance it held (e.g. FlexPanel's "ALWAYS use this skill when children must WRAP").

Each description is now the old description plus its when_to_use, verbatim. Claude Code already showed them joined, so nothing changes for it. The longest is 873 chars, under the spec's 1,024.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01P366MHuPhV6euFSWLnwkea
Runs the spec's reference validator (skills-ref) on every skill. It covers the name and description rules Test-Plugin.ps1 checked, with the stricter 1,024-char description limit, so those checks are removed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01P366MHuPhV6euFSWLnwkea
@kazo0
kazo0 merged commit d0edc6e into main Sep 25, 2026
3 checks passed
@kazo0
kazo0 deleted the feat/skills-description-triggers branch September 25, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent skills: make trigger guidance visible to every agent and validate against the Agent Skills spec

1 participant