@adobe/design-data-skill 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -186,7 +186,7 @@ file or class name and description of purpose be included on the
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
189
+ Copyright 2026 Adobe
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/design-data-skill",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Claude Code skill for Spectrum design tokens and component schemas via the design-data CLI",
5
5
  "type": "module",
6
6
  "files": [
@@ -33,4 +33,4 @@
33
33
  ],
34
34
  "author": "Adobe",
35
35
  "license": "Apache-2.0"
36
- }
36
+ }
@@ -11,49 +11,48 @@ when_to_use: >
11
11
  "Spectrum component options", validate tokens, design-data primer, query tokens,
12
12
  suggest token, resolve token value, component schema, design system config,
13
13
  @adobe/design-data, design-data CLI.
14
- allowed-tools: Bash(npx @adobe/design-data *)
14
+ allowed-tools: mcp__design-data__design-data-primer, mcp__design-data__design-data-query, mcp__design-data__design-data-suggest, mcp__design-data__design-data-component, mcp__design-data__design-data-resolve
15
15
  ---
16
16
 
17
17
  # Spectrum Design Data
18
18
 
19
19
  Access Spectrum design tokens, component schemas, and design-system structure
20
- via the `@adobe/design-data` CLI.
20
+ via the `@adobe/design-data-mcp` MCP server (in-process wasm — no CLI binary required).
21
21
 
22
22
  ## Bootstrap
23
23
 
24
- On first use, ensure the CLI is installed:
24
+ Add `@adobe/design-data-mcp` to your project's `.cursor/mcp.json` (or equivalent
25
+ MCP config) to activate the tools:
25
26
 
26
- ```
27
- npx @adobe/design-data --version
27
+ ```json
28
+ {
29
+ "mcpServers": {
30
+ "design-data": {
31
+ "command": "npx",
32
+ "args": ["-y", "@adobe/design-data-mcp"]
33
+ }
34
+ }
35
+ }
28
36
  ```
29
37
 
30
- `npx` installs the binary automatically on first run. For frequent use or
31
- air-gapped environments, install globally to avoid the per-invocation
32
- network check:
38
+ The server uses an embedded Spectrum snapshot — no environment variables or
39
+ dataset path configuration required for read operations.
33
40
 
34
- ```
35
- npm install -g @adobe/design-data
36
- ```
41
+ ## Tools
37
42
 
38
- ## Commands
43
+ ### `design-data-primer`
39
44
 
40
- **Session overview** — call at the start of a design-token session to understand
41
- the available data:
45
+ Get a structural overview of the embedded Spectrum dataset: token count,
46
+ available mode-sets (color-scheme, scale, contrast), component list, taxonomy
47
+ fields, and data provenance. **Call this at the start of a design-token session.**
42
48
 
43
- ```
44
- npx @adobe/design-data primer --format json
45
- ```
49
+ No required inputs.
46
50
 
47
- Returns: token count, mode-sets, component list, fields, and data provenance
48
- (embedded snapshot or fetched version).
51
+ ### `design-data-query`
49
52
 
50
- ***
53
+ Filter Spectrum tokens by a query expression. Returns an array of matching token objects.
51
54
 
52
- **Query tokens** — filter by name, property, component, state, or any combination:
53
-
54
- ```
55
- npx @adobe/design-data query --filter "<expr>" --format json
56
- ```
55
+ Required input: `filter` (string)
57
56
 
58
57
  Expression syntax examples:
59
58
 
@@ -62,51 +61,42 @@ Expression syntax examples:
62
61
  * `"property=color-*"` — all color property tokens
63
62
  * `"colorScheme=dark"` — dark-scheme tokens
64
63
 
65
- Returns an empty array when no tokens match (not an error). Exit code 1 only
66
- when the expression itself is malformed.
64
+ Returns an empty array when no tokens match.
67
65
 
68
- ***
66
+ ### `design-data-suggest`
69
67
 
70
- **Suggest tokens** — natural-language intent → ranked token matches:
68
+ Suggest Spectrum tokens matching a natural-language intent using keyword-overlap
69
+ scoring. Returns matches ranked by confidence.
71
70
 
72
- ```
73
- npx @adobe/design-data suggest "<intent>" --format json
74
- npx @adobe/design-data suggest "<intent>" --format json --limit 10
75
- ```
71
+ Required input: `intent` (string) — e.g. `"primary CTA button background color"`
72
+ Optional input: `limit` (number, default 5)
76
73
 
77
- Example: `"primary CTA button background color"`
74
+ ### `design-data-component`
78
75
 
79
- ***
76
+ Get the full component declaration for a Spectrum component by ID. Returns the
77
+ component's displayName, description, and all available options (variants, sizes,
78
+ states, boolean props, etc.).
80
79
 
81
- **Component schema** — full component declaration:
80
+ Required input: `id` (string) — kebab-case component ID, e.g. `button`, `action-button`
82
81
 
83
- ```
84
- npx @adobe/design-data component <id>
85
- ```
86
-
87
- Example: `npx @adobe/design-data component button`
82
+ Call `design-data-primer` first to see available component IDs.
88
83
 
89
- Returns: displayName, description, options (variants, sizes, states, etc.).
90
- This command always outputs JSON; it does not accept a `--format` flag.
84
+ ### `design-data-resolve`
91
85
 
92
- ***
86
+ Resolve the concrete value of a Spectrum token property for a given mode-set context.
87
+ Returns the winning token with its resolved value.
93
88
 
94
- **Resolve token value** — resolve a token for a given mode-set context:
95
-
96
- ```
97
- npx @adobe/design-data resolve <property> --format json
98
- npx @adobe/design-data resolve <property> --format json --color-scheme light --scale medium
99
- ```
100
-
101
- Example: `npx @adobe/design-data resolve background-color-default --format json --color-scheme dark`
89
+ Required input: `property` (string) — token property name, e.g. `background-color-default`
90
+ Optional inputs: `colorScheme` (`"light"` or `"dark"`), `scale` (`"desktop"` or `"mobile"`),
91
+ `contrast` (`"regular"` or `"high"`)
102
92
 
103
93
  ## Workflow
104
94
 
105
- 1. **Start with `primer`** to understand what data is available.
106
- 2. **Use `query`** when you know the component/property/state.
107
- 3. **Use `suggest`** when the user describes an intent in natural language.
108
- 4. **Use `component`** to check all available options for a specific component.
109
- 5. **Use `resolve`** to get the concrete value for a token in a given context.
95
+ 1. **Start with `design-data-primer`** to understand what data is available.
96
+ 2. **Use `design-data-query`** when you know the component/property/state.
97
+ 3. **Use `design-data-suggest`** when the user describes an intent in natural language.
98
+ 4. **Use `design-data-component`** to check all available options for a specific component.
99
+ 5. **Use `design-data-resolve`** to get the concrete value for a token in a given context.
110
100
 
111
101
  ## When working in Cursor
112
102
 
@@ -118,19 +108,8 @@ Cursor Settings → Rules → **Add Rule** → **Remote Rule (GitHub)** → past
118
108
  https://github.com/adobe/spectrum-design-data/tree/main/tools/design-data-skill/skills/design-data
119
109
  ```
120
110
 
121
- For always-available tool access (higher context cost), add `@adobe/design-data-mcp` to
122
- `.cursor/mcp.json` in your project root:
123
-
124
- ```json
125
- {
126
- "mcpServers": {
127
- "design-data": {
128
- "command": "npx",
129
- "args": ["-y", "@adobe/design-data-mcp"]
130
- }
131
- }
132
- }
133
- ```
111
+ For always-available tool access (higher context cost), add the MCP server to
112
+ `.cursor/mcp.json` as shown in the Bootstrap section above.
134
113
 
135
114
  For custom datasets with validate/diff/write, use the `design-data-agent` skill or
136
115
  `@adobe/design-data-agent-mcp` instead — see