Skip to content

chore: add Agent Skills#9515

Merged
reidbarber merged 13 commits intomainfrom
agent-skills
Feb 2, 2026
Merged

chore: add Agent Skills#9515
reidbarber merged 13 commits intomainfrom
agent-skills

Conversation

@reidbarber
Copy link
Member

@reidbarber reidbarber commented Jan 23, 2026

Related to #9508.

Adds a script to generate Agent Skills based on our documentation.

This yarn generate:skills script uses our existing markdown docs build output, and copies/formats them to match the Agent Skills spec. The script outputs these into our docs build in the .well-known/ directory.

Users will be able to install them by via npx skills:

npx skills add https://react-spectrum.adobe.com
npx skills add https://react-aria.adobe.com

More resources:

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

  1. Try running these in any project:

React Spectrum (S2):

npx skills add https://d1pzu54gtk2aed.cloudfront.net/pr/94a22af3fcd09be55c2614e05cdfb7730361d00f/

React Aria:

npx skills add https://d5iwopk28bdhl.cloudfront.net/pr/94a22af3fcd09be55c2614e05cdfb7730361d00f/

The skills should get placed in the current project.

  1. Check the new /ai docs pages:
  1. Verify the old /mcp links now redirect to the /ai mcp section:

and verify the old mcp pages aren't visible in search or in the sidebar.

🧢 Your Project:

@devongovett
Copy link
Member

do we need to commit these or can we deploy them as part of the docs build?

@reidbarber
Copy link
Member Author

reidbarber commented Jan 26, 2026

@devongovett I think the other options are:

  • Publish a custom CLI tool (run via npx) that pulls from docs CDN and places skills in the user's current directory
  • Include a setup.sh script in the rules directory that that pulls from docs CDN

I guess the setup.sh solution requires the least maintenance, but requires some extra work on the user's end.

@reidbarber
Copy link
Member Author

Discussed with the team, and it seems like we're leaning towards this solution:

  1. We release an Artifact with the zipped markdown docs each release.
  2. Have our skills include a script that downloads and unzips that (optionally, use the user's installed version?)

@reidbarber
Copy link
Member Author

Just noticed that npx skills added support for well-known vercel-labs/skills#138

so we might be able to just deploy these to the CDN and have them be installed that way.

@rspbot
Copy link

rspbot commented Jan 30, 2026

@rspbot
Copy link

rspbot commented Jan 30, 2026

@rspbot
Copy link

rspbot commented Jan 30, 2026

devongovett
devongovett previously approved these changes Jan 31, 2026
@rspbot
Copy link

rspbot commented Feb 2, 2026

@rspbot
Copy link

rspbot commented Feb 2, 2026

@reidbarber reidbarber enabled auto-merge February 2, 2026 19:53
"build:s2-docs": "yarn workspace @react-spectrum/s2-docs build",
"check:s2-docs-build": "node packages/dev/s2-docs/scripts/validateS2DocsBuild.mjs",
"build:mcp": "yarn workspace @react-spectrum/mcp build && yarn workspace @react-aria/mcp build",
"generate:skills": "node packages/dev/s2-docs/scripts/generateAgentSkills.mjs",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make a script target in s2

Suggested change
"generate:skills": "node packages/dev/s2-docs/scripts/generateAgentSkills.mjs",
"generate:skills": "yarn workspace @react-spectrum/s2 generate:skills",

"start:s2": "DOCS_ENV=dev LIBRARY=s2 parcel 'pages/s2/**/*.mdx' -p 4321 --config .parcelrc-s2-docs --dist-dir dist/s2 --cache-dir ../../../.parcel-cache/s2",
"start:react-aria": "DOCS_ENV=dev LIBRARY=react-aria parcel 'pages/react-aria/**/*.mdx' -p 1234 --config .parcelrc-s2-docs --dist-dir dist/react-aria --cache-dir ../../../.parcel-cache/react-aria",
"build": "yarn build:s2 --public-url $PUBLIC_URL && yarn build:react-aria --public-url $PUBLIC_URL",
"build": "yarn build:s2 --public-url $PUBLIC_URL && yarn build:react-aria --public-url $PUBLIC_URL && node scripts/generateAgentSkills.mjs",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you make a target this can change to

Suggested change
"build": "yarn build:s2 --public-url $PUBLIC_URL && yarn build:react-aria --public-url $PUBLIC_URL && node scripts/generateAgentSkills.mjs",
"build": "yarn build:s2 --public-url $PUBLIC_URL && yarn build:react-aria --public-url $PUBLIC_URL && yarn generate:skills",

mkdir -p dist/s2-docs/react-aria/$(PUBLIC_URL)
mkdir -p dist/s2-docs/s2/$(PUBLIC_URL)
mv packages/dev/s2-docs/dist/react-aria/* dist/s2-docs/react-aria/$(PUBLIC_URL)
if [ -d packages/dev/s2-docs/dist/react-aria/.well-known ]; then mv packages/dev/s2-docs/dist/react-aria/.well-known dist/s2-docs/react-aria/$(PUBLIC_URL); fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the if check?

@reidbarber reidbarber added this pull request to the merge queue Feb 2, 2026
Merged via the queue into main with commit 5fee021 Feb 2, 2026
27 of 29 checks passed
@reidbarber reidbarber deleted the agent-skills branch February 2, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants