Skip to content

feat(mcp): add agent skills for component building and token discovery#695

Open
GarthDB wants to merge 9 commits intomainfrom
feat/agent-skills
Open

feat(mcp): add agent skills for component building and token discovery#695
GarthDB wants to merge 9 commits intomainfrom
feat/agent-skills

Conversation

@GarthDB
Copy link
Member

@GarthDB GarthDB commented Feb 10, 2026

Overview

This PR adds Agent Skills to the Spectrum Design Data MCP server to help AI agents build Spectrum components by orchestrating existing MCP tools into complete workflows.

Changes

Agent Skills (Markdown Guides)

  • Component Builder (): Guides agents through building Spectrum components by orchestrating MCP tools to discover schemas, find tokens, and validate configurations
  • Token Finder (): Helps agents discover the right design tokens for colors, spacing, typography, and component styling
  • Agent Skills README (): Documentation explaining what Agent Skills are and how to use them

New MCP Tools

  • ****: One-shot tool that generates a complete component configuration with recommended tokens and props
  • ****: Analyzes existing component configuration and suggests improvements including token recommendations, validation fixes, and best practices

Documentation Updates

  • Updated main README with Agent Skills section
  • Updated with Agent Skills information and workflow patterns
  • Updated project structure documentation

Testing

  • Added comprehensive tests for workflow tools (29 tests passing)
  • All existing tests continue to pass

Architecture

Agent Skills are markdown guides that orchestrate existing MCP tools into complete workflows. They don't execute code directly but guide AI agents on:

  • Which MCP tools to use
  • How to combine multiple tools
  • Best practices and examples
  • Real-world usage patterns

This follows the pattern established by React Spectrum's AI integration.

Related

Testing

All tests pass:

29 tests passed

Changeset

Minor version bump for @adobe/spectrum-design-data-mcp

@changeset-bot
Copy link

changeset-bot bot commented Feb 10, 2026

🦋 Changeset detected

Latest commit: 3c659a0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@adobe/spectrum-design-data-mcp Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@GarthDB
Copy link
Member Author

GarthDB commented Feb 10, 2026

Run report for a9c53a40

Total time: 13.4s | Comparison time: 13.1s | Estimated loss: 328.5ms (2.4% slower)

Action Time Status Info
⬛️ SetupProto(0.51.4) 0ms Skipped
🟩 SyncWorkspace 7ms Passed
🟩 SyncProject(componentSchemas) 0.4ms Passed
🟩 SyncProject(tokens) 0.5ms Passed
🟩 SyncProject(spectrum-design-data-mcp) 0.3ms Passed
⬛️ SetupToolchain(node:20.17.0) 1.3s Skipped
🟩 InstallWorkspaceDeps(node:20.17.0) 10s Passed
🟩 RunTask(spectrum-design-data-mcp:test) 2.1s Passed
🟩 RunTask(spectrum-design-data-mcp:ci) 7.8ms Passed
Touched files
.changeset/agent-skills-feature.md
llms.txt
pnpm-lock.yaml
tools/spectrum-design-data-mcp/README.md
tools/spectrum-design-data-mcp/build-spectrum-components/README.md
tools/spectrum-design-data-mcp/build-spectrum-components/SKILL.md
tools/spectrum-design-data-mcp/build-spectrum-components/component-builder.md
tools/spectrum-design-data-mcp/build-spectrum-components/token-finder.md
tools/spectrum-design-data-mcp/moon.yml
tools/spectrum-design-data-mcp/package.json
tools/spectrum-design-data-mcp/src/config/intent-mappings.js
tools/spectrum-design-data-mcp/src/constants.js
tools/spectrum-design-data-mcp/src/index.js
tools/spectrum-design-data-mcp/src/tools/schemas.js
tools/spectrum-design-data-mcp/src/tools/tokens.js
tools/spectrum-design-data-mcp/src/tools/workflows.js
tools/spectrum-design-data-mcp/src/utils/component-helpers.js
tools/spectrum-design-data-mcp/src/utils/token-helpers.js
tools/spectrum-design-data-mcp/src/utils/validation.js
tools/spectrum-design-data-mcp/test/skills/agent-skills-integration.test.js
tools/spectrum-design-data-mcp/test/tools/workflows.test.js
tools/spectrum-design-data-mcp/test/utils/component-helpers.test.js
tools/spectrum-design-data-mcp/test/utils/token-helpers.test.js
tools/spectrum-design-data-mcp/test/utils/validation.test.js

GarthDB and others added 8 commits February 10, 2026 09:55
…ls tests, wire moon ci

- Add constants, intent-mappings config, validation and token/component helpers
- Refactor workflows, tokens, schemas to use shared utilities and constants
- Rename agent-skills to build-spectrum-components; use --- delimiter in SKILL.md
- Add integration tests for Component Builder and Token Finder workflows
- Add unit tests for validation, token-helpers, component-helpers
- Add moon test inputs and ci task for GitHub Actions

Co-authored-by: Cursor <cursoragent@cursor.com>
Add c8 code coverage instrumentation to spectrum-design-data-mcp to match
other tools in the monorepo. Initial coverage report shows 77.33% overall
coverage with excellent coverage (99%+) in the refactored utils modules.

- Add c8 ^10.1.3 as devDependency
- Update test script from "ava" to "c8 ava"
- Coverage directory already ignored via root .gitignore

Co-authored-by: Cursor <cursoragent@cursor.com>
- Add token-to-implementation mapping tools (resolve, reverse-lookup, list)
- Add react-spectrum-token-map.json with 109+ token mappings (PoC)
- Add comprehensive test suite for implementation map tools
- Refactor release workflows to use reusable publish-packages workflow
- Update MCP config to remove unused doc servers
- Add devEngines to package.json for proto v0.55.0+ compatibility

Co-authored-by: Cursor <cursoragent@cursor.com>
Updates copyright headers in newly added files from 2026 to 2024
to match the actual year of creation.

Files updated:
- src/config/intent-mappings.js
- src/constants.js
- src/utils/component-helpers.js
- src/utils/token-helpers.js
- src/utils/validation.js
- test/utils/component-helpers.test.js
- test/utils/token-helpers.test.js
- test/utils/validation.test.js

All tests continue to pass (93/93).

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant