用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/johnlindquist/uxspec --skill extract命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | extract |
| description | Identify repeated patterns and consolidate them into $elements and shared tokens for systematic reuse |
Identify repeated patterns in a spec and consolidate them into $elements and shared tokens. Systematic reuse, not premature abstraction.
After visuals are defined and you notice repetition across states. When multiple states share similar elements (form fields, action buttons, status banners). When the spec has grown and consistency is drifting.
$elements)Look for patterns that appear in 2+ states with the same structure but different content:
Before:
"idle": {
"$visual": {
"slots": {
"body": [
{ "type": "group", "layout": "stack-v", "gap": "{spacing.xs}", "children": [
{ "type": "text", "content": "Email" },
{ "type": "input", "name": "email", "binding": { "inputType": "email" } }
]},
{ "type": "group", "layout": "stack-v", "gap": "{spacing.xs}", "children": [
{ "type": "text", "content": "Password" },
{ "type": "input", "name": "password", "binding": { "inputType": "password" } }
]}
]
}
}
}
After:
"$elements": {
"form-field": {
"type": "group", "layout": "stack-v", "gap": "{spacing.xs}",
"params": ["label", "name", "inputType"],
"children": [
{ "type": "text", "content": { "$bind": "label" } },
{ "type": "input", "name": { "$bind": "name" }, "binding"
Referenced as: { "$ref": "form-field", "label": "Email", "name": "email", "inputType": "email" }
Look for hard-coded values that should be tokens:
$tokens.color$tokens.font.sizestatus-banner element with variant and message params.variant, label, action params.After extraction:
UNKNOWN_ELEMENT_REFERENCE means a $ref name is wrong.$ref passes the right params.Extract for consistency, not for abstraction. Three similar lines of spec are better than a premature $element that only one state uses. But three states with identical form-field patterns? That's a missing element.