@adobe/design-data-skill 1.1.0 → 1.3.1
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 +1 -1
- package/package.json +12 -3
- package/skills/design-data/SKILL.md +53 -70
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
|
|
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
|
|
3
|
+
"version": "1.3.1",
|
|
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": [
|
|
@@ -31,6 +31,15 @@
|
|
|
31
31
|
"design-tokens",
|
|
32
32
|
"design-data"
|
|
33
33
|
],
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"ava": "^6.0.1"
|
|
36
|
+
},
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=20.12.0"
|
|
39
|
+
},
|
|
34
40
|
"author": "Adobe",
|
|
35
|
-
"license": "Apache-2.0"
|
|
36
|
-
|
|
41
|
+
"license": "Apache-2.0",
|
|
42
|
+
"scripts": {
|
|
43
|
+
"test": "ava"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -6,54 +6,57 @@ description: >
|
|
|
6
6
|
token values, component options, naming conventions, or wants to
|
|
7
7
|
validate/explore design-token data. Also triggers when a .design-data.toml
|
|
8
8
|
config is involved or the user mentions the design-data CLI.
|
|
9
|
+
metadata:
|
|
10
|
+
author: adobe
|
|
11
|
+
version: "1.3.1"
|
|
12
|
+
designDataVersion: "0.7.0"
|
|
9
13
|
when_to_use: >
|
|
10
14
|
Trigger on: token names (color, spacing, typography, dimension), "which token",
|
|
11
15
|
"Spectrum component options", validate tokens, design-data primer, query tokens,
|
|
12
16
|
suggest token, resolve token value, component schema, design system config,
|
|
13
17
|
@adobe/design-data, design-data CLI.
|
|
14
|
-
allowed-tools:
|
|
18
|
+
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
19
|
---
|
|
16
20
|
|
|
17
21
|
# Spectrum Design Data
|
|
18
22
|
|
|
19
23
|
Access Spectrum design tokens, component schemas, and design-system structure
|
|
20
|
-
via the `@adobe/design-data` CLI.
|
|
24
|
+
via the `@adobe/design-data-mcp` MCP server (in-process wasm — no CLI binary required).
|
|
21
25
|
|
|
22
26
|
## Bootstrap
|
|
23
27
|
|
|
24
|
-
|
|
28
|
+
Add `@adobe/design-data-mcp` to your project's `.cursor/mcp.json` (or equivalent
|
|
29
|
+
MCP config) to activate the tools:
|
|
25
30
|
|
|
26
|
-
```
|
|
27
|
-
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"mcpServers": {
|
|
34
|
+
"design-data": {
|
|
35
|
+
"command": "npx",
|
|
36
|
+
"args": ["-y", "@adobe/design-data-mcp"]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
28
40
|
```
|
|
29
41
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
network check:
|
|
42
|
+
The server uses an embedded Spectrum snapshot — no environment variables or
|
|
43
|
+
dataset path configuration required for read operations.
|
|
33
44
|
|
|
34
|
-
|
|
35
|
-
npm install -g @adobe/design-data
|
|
36
|
-
```
|
|
45
|
+
## Tools
|
|
37
46
|
|
|
38
|
-
|
|
47
|
+
### `design-data-primer`
|
|
39
48
|
|
|
40
|
-
|
|
41
|
-
|
|
49
|
+
Get a structural overview of the embedded Spectrum dataset: token count,
|
|
50
|
+
available mode-sets (color-scheme, scale, contrast), component list, taxonomy
|
|
51
|
+
fields, and data provenance. **Call this at the start of a design-token session.**
|
|
42
52
|
|
|
43
|
-
|
|
44
|
-
npx @adobe/design-data primer --format json
|
|
45
|
-
```
|
|
53
|
+
No required inputs.
|
|
46
54
|
|
|
47
|
-
|
|
48
|
-
(embedded snapshot or fetched version).
|
|
55
|
+
### `design-data-query`
|
|
49
56
|
|
|
50
|
-
|
|
57
|
+
Filter Spectrum tokens by a query expression. Returns an array of matching token objects.
|
|
51
58
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
npx @adobe/design-data query --filter "<expr>" --format json
|
|
56
|
-
```
|
|
59
|
+
Required input: `filter` (string)
|
|
57
60
|
|
|
58
61
|
Expression syntax examples:
|
|
59
62
|
|
|
@@ -62,51 +65,42 @@ Expression syntax examples:
|
|
|
62
65
|
* `"property=color-*"` — all color property tokens
|
|
63
66
|
* `"colorScheme=dark"` — dark-scheme tokens
|
|
64
67
|
|
|
65
|
-
Returns an empty array when no tokens match
|
|
66
|
-
when the expression itself is malformed.
|
|
68
|
+
Returns an empty array when no tokens match.
|
|
67
69
|
|
|
68
|
-
|
|
70
|
+
### `design-data-suggest`
|
|
69
71
|
|
|
70
|
-
|
|
72
|
+
Suggest Spectrum tokens matching a natural-language intent using keyword-overlap
|
|
73
|
+
scoring. Returns matches ranked by confidence.
|
|
71
74
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
npx @adobe/design-data suggest "<intent>" --format json --limit 10
|
|
75
|
-
```
|
|
75
|
+
Required input: `intent` (string) — e.g. `"primary CTA button background color"`
|
|
76
|
+
Optional input: `limit` (number, default 5)
|
|
76
77
|
|
|
77
|
-
|
|
78
|
+
### `design-data-component`
|
|
78
79
|
|
|
79
|
-
|
|
80
|
+
Get the full component declaration for a Spectrum component by ID. Returns the
|
|
81
|
+
component's displayName, description, and all available options (variants, sizes,
|
|
82
|
+
states, boolean props, etc.).
|
|
80
83
|
|
|
81
|
-
|
|
84
|
+
Required input: `id` (string) — kebab-case component ID, e.g. `button`, `action-button`
|
|
82
85
|
|
|
83
|
-
|
|
84
|
-
npx @adobe/design-data component <id>
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
Example: `npx @adobe/design-data component button`
|
|
86
|
+
Call `design-data-primer` first to see available component IDs.
|
|
88
87
|
|
|
89
|
-
|
|
90
|
-
This command always outputs JSON; it does not accept a `--format` flag.
|
|
88
|
+
### `design-data-resolve`
|
|
91
89
|
|
|
92
|
-
|
|
90
|
+
Resolve the concrete value of a Spectrum token property for a given mode-set context.
|
|
91
|
+
Returns the winning token with its resolved value.
|
|
93
92
|
|
|
94
|
-
|
|
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`
|
|
93
|
+
Required input: `property` (string) — token property name, e.g. `background-color-default`
|
|
94
|
+
Optional inputs: `colorScheme` (`"light"` or `"dark"`), `scale` (`"desktop"` or `"mobile"`),
|
|
95
|
+
`contrast` (`"regular"` or `"high"`)
|
|
102
96
|
|
|
103
97
|
## Workflow
|
|
104
98
|
|
|
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.
|
|
99
|
+
1. **Start with `design-data-primer`** to understand what data is available.
|
|
100
|
+
2. **Use `design-data-query`** when you know the component/property/state.
|
|
101
|
+
3. **Use `design-data-suggest`** when the user describes an intent in natural language.
|
|
102
|
+
4. **Use `design-data-component`** to check all available options for a specific component.
|
|
103
|
+
5. **Use `design-data-resolve`** to get the concrete value for a token in a given context.
|
|
110
104
|
|
|
111
105
|
## When working in Cursor
|
|
112
106
|
|
|
@@ -118,19 +112,8 @@ Cursor Settings → Rules → **Add Rule** → **Remote Rule (GitHub)** → past
|
|
|
118
112
|
https://github.com/adobe/spectrum-design-data/tree/main/tools/design-data-skill/skills/design-data
|
|
119
113
|
```
|
|
120
114
|
|
|
121
|
-
For always-available tool access (higher context cost), add
|
|
122
|
-
`.cursor/mcp.json` in
|
|
123
|
-
|
|
124
|
-
```json
|
|
125
|
-
{
|
|
126
|
-
"mcpServers": {
|
|
127
|
-
"design-data": {
|
|
128
|
-
"command": "npx",
|
|
129
|
-
"args": ["-y", "@adobe/design-data-mcp"]
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
```
|
|
115
|
+
For always-available tool access (higher context cost), add the MCP server to
|
|
116
|
+
`.cursor/mcp.json` as shown in the Bootstrap section above.
|
|
134
117
|
|
|
135
118
|
For custom datasets with validate/diff/write, use the `design-data-agent` skill or
|
|
136
119
|
`@adobe/design-data-agent-mcp` instead — see
|