Tools: Use native agent skill discovery - #80811
Conversation
|
Size Change: 0 B Total Size: 7.76 MB |
b97f9d1 to
3aea1db
Compare
3aea1db to
996937c
Compare
|
Flaky tests detected in 37f1da4. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/30465864292
|
jeryj
left a comment
There was a problem hiding this comment.
Sorry for being pedantic here, but my gut instinct is to split this into smaller PRs. I think moving the skills to a root is fine. I was worried about premature optimization, but since refactors are so cheap now, I do think it's better to go with a default skill structure for now and address context bloat as it comes up.
So, if this PR is just moving the agent skills structure, I'm fine to approve. I'm less sure about the CI checks and setup-skills. I'll need to look into those more.
|
The postintall script is responsible for creating the correct agent-specific (ie. claude) aliases depending on which platform (macos, linux, windows). It is based off what the skills npm package does when installing a skill Without that script, I guess our best alternative would be to manually commit those alias files as real skills that internally re-direct to the equivalent |
Gotcha. I'm understanding the framework more and seeing your point. What about when we remove or add new skills - does the |
|
Good questions, and actually a few missing gaps that I now addressed.
I also updated the guide to mention to re-run the setup script after changing the skill catalog. Edit: see update |
|
This looks like it's in the right direction 👍 What we had before was not skills, it was a folder of markdown files that we called "skills". Skills, as I understand them, have their existence mechanically understood by agents because they scan specific folders. |
|
@jeryj and @aduth — following this suggestion, I pushed an update that greatly simplifies the setup script (and related tests) by assuming that the entire |
I think it's still possible developers might have their own personal skills and I don't know that I'd go as far as to say it's entirely disposable. The command I shared in the thread would have preserved a developer's own, with the exception of any which have conflicting names (not super likely, and we'd have the option to choose to either force-override or skip in these cases). Is that possible to retain? It feels like removing the |
That setup would work well on a first pass, but it would not work well in a bunch of edge cases (naming conflicts, skill renaming / removal, etc). And as we cover all of these edge cases, we'd basically go back to the previous version. More in general, I believe that we should favor agent-agnostic tooling (ie. If a consumer of the repo has a skill in
If we're worried about wiping out existing |
|
Maybe it's fine. I'm not as sure on the point of "it's a personal skill, move it to whatever local configuration they have on their machine". Is it possible to have a personal skill tailored to a particular project that lives outside the project itself? I guess it could be a "global" skill and using description to provide clues to an agent that it's relevant to a particular project. |
that's what I personally do — in the skill description and body, I specify that it targets a specific project. Would you be ok to merge as-is, and refine the approach if/as needed? |
|
If |
|
Nice! I've pushed a final commit which adds some docs refinements, and also adds a prompt when running the I think this is a good starting point! |
|
@aduth Follow-up: Running the script again manually allows to force the override, hopefully a good compromise between automatizing the process without wiping out files unexpectedly. |
There was a problem hiding this comment.
Ideally, that tools/agents should be a workspace with a package.json file like other tools in that directory.

Follow up to #80597.
What?
Moves Gutenberg's committed skills to
.agents/skillsand makes them available through supported agents' native discovery or generated compatibility views.Why?
Universal instructions remain in
AGENTS.md; task-specific guidance should use agents' native skill discovery. This removes the legacy rootskills/layout and manual skill-loading guidance while retaining Claude Code compatibility.How?
SKILL.mdfrontmatter description for native discovery..agents/skillsas the repository skill catalog..claude/skillscompatibility view when its entries all match the catalog, keeping ordinary catalog changes synchronized automatically.npm run agents:setupis the explicit reconciliation command and asks before removing them.Testing Instructions
In a disposable checkout:
npm installand confirm.claude/skills/testing/SKILL.mdmatches.agents/skills/testing/SKILL.md.npm run postinstall; confirm the generated view updates..claude/skills/private/SKILL.md, then runnpm run postinstall; confirm it remains and the command directs you tonpm run agents:setup.npm run agents:setup, confirm the prompt, and verify it reconciles the generated view.npm run test:unit -- tools/agents/test/setup-skills.test.js --runInBand.Testing Instructions for Keyboard
Not applicable; this changes repository tooling and documentation only.
Screenshots or screencast
Not applicable.
Use of AI Tools
Codex was used to investigate the current skill layout, implement and test the setup script, and draft this pull request.