foundation-extractor — скилл для Claude Code
Скилл foundation-extractor для Claude Code составляет полный список дизайнерских токенов и исходных кодов компонентов. Собирает данные из репозитория перед предложением новых правил дизайна.
MIT ★ 529 обновлён 2026-11-17
npx skills add ShuaiMXu/happyhands --skill foundation-extractor -a claude-codeЧто делает foundation-extractor
Инструмент сканирует проект для формирования списка существующих токенов и компонентов, сохраняя пути к файлам для каждого найденного артефакта. Он разбирает CSS-переменные, значения в JS/TS-файлах, а также theme-объекты Tailwind без выполнения кода. Собранные данные маркируются как наблюдаемые, что исключает их автоматическое утверждение.
Система фиксирует категории токенов: цвет, отступы, тени, анимации и типографику. Если для одного имени найдено несколько значений, инструмент сохраняет их все как варианты. Для корректной работы требуются исходные файлы репозитория, в противном случае выдаётся диагностика needs-evidence.
Какие задачи решает
- создать реестр токенов для дизайн-системы
- обнаружить дубликаты в описании стилей
- подготовить данные для рефакторинга компонентов
- разделить утверждённые и существующие стили
Примеры запросов агенту
- foundation-extractor просканируй репозиторий на наличие токенов
- составь список всех
CSSпеременных и их значений через foundation-extractor - найди все используемые цвета и отступы в проекте
Как установить foundation-extractor
1Через Skills CLI (Vercel)
npx skills add ShuaiMXu/happyhands --skill foundation-extractor -a claude-code2Вручную: положить файлы
~/.claude/skills/foundation-extractor/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/foundation-extractor/
1Через Skills CLI (Vercel)
npx skills add ShuaiMXu/happyhands --skill foundation-extractor -a codex2Вручную: положить файлы
.agents/skills/foundation-extractor/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add ShuaiMXu/happyhands --skill foundation-extractor -a cursor2Вручную: положить файлы
.cursor/skills/foundation-extractor/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install ShuaiMXu/happyhands skills/product-design/foundation-extractor2Вручную: положить файлы
.github/skills/foundation-extractor/SKILL.md1Через Skills CLI (Vercel)
npx skills add ShuaiMXu/happyhands --skill foundation-extractor -a gemini-cli2Командой платформы
gemini skills install https://github.com/ShuaiMXu/happyhands --path skills/product-design/foundation-extractorВручную: положить файлы
.devin/skills/foundation-extractor/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о foundation-extractor
Как установить foundation-extractor в Claude Code?
Выполните команду npx skills add ShuaiMXu/happyhands --skill foundation-extractor -a claude-code. После этого конфигурация будет доступна по пути ~/.claude/skills/foundation-extractor/SKILL.md.
Что делает foundation-extractor?
Он формирует трассируемый список всех используемых в проекте дизайнерских токенов и источников компонентов, помогая разработчикам отделить фактическое состояние кода от целевого.
Что нужно для работы foundation-extractor?
Для анализа проекта требуются доступные исходные файлы репозитория; при их отсутствии инструмент возвращает ошибку needs-evidence.
Исходный текст
SKILL.md · MIT
--- name: foundation-extractor description: Inventory an existing product's design tokens and component sources when establishing or updating its Design Foundation. --- # Foundation Extractor Build a traceable inventory from the repository before proposing rules. Distinguish what exists from what is approved. - Cite the source path for every extracted artifact. - Mark discoveries `observed`; never promote them to `approved` automatically. - Preserve aliases and semantic token names when present. Treat raw literal values as inventory candidates. - Report duplicate or ambiguous artifacts for review instead of silently merging them. - Return `needs-evidence` when the repository or relevant source files are unavailable. The deterministic handler inventories CSS custom properties with their declared values: each token records its most frequent value, an inferred category (color, radius, type, space, shadow, motion — name first, value shape second) and, when a name resolves to several values, the full set as observed variants. Component files in component/UI directories complete the inventory. Every entry is promotable into the Experience Spec token shape without re-typing, and stays observed until a person approves it. Brand intent, component semantics, variants and states still require human or model-assisted review. JS/TS theme/token/palette declarations, static object exports in theme files and Tailwind default-export `theme` objects are parsed from the source snapshot without execution. Literal values, static property access, spreads, relative named imports and explicit re-exports retain original file/line references. Object paths namespace candidates so unrelated palettes are not silently merged. Explicit primitive/semantic/component object keys supply observed layer labels; missing labels remain unclassified. Dynamic expressions, unsupported module resolution, syntax errors and extraction budgets produce missing-evidence diagnostics. These observations do not prove runtime values, theme activation, complete consumers or rendered component coverage.
© ShuaiMXu · MIT · ShuaiMXu/happyhands