api-shape-explorer — скилл для Claude Code: параллельные варианты API
Скилл запускает несколько субагентов сразу, чтобы получить радикально разные варианты интерфейса модуля и сравнить их до написания кода.
npx skills add zebbern/claude-code-guide --skill api-shape-explorer -a claude-codeЧто делает api-shape-explorer
Скилл опирается на идею «Design It Twice» из книги «A Philosophy of Software Design»: первая придуманная форма интерфейса редко оказывается лучшей. Сначала агент собирает требования — какую задачу решает модуль, кто его вызывает, какие операции нужны, что спрятать внутрь, а что выставить наружу.
Дальше через Task tool запускаются 3+ субагента одновременно. Каждому выдаётся своё ограничение: одному — уложиться в 1–3 метода, другому — поддержать максимум сценариев, третьему — оптимизироваться под самый частый случай, четвёртому — взять за образец конкретную библиотеку. Каждый возвращает сигнатуру, пример вызова, список скрытой сложности и свои компромиссы.
Варианты показываются по очереди, потом идёт сравнение: простота интерфейса, глубина модуля (маленький интерфейс над большой реализацией против обратного), лёгкость правильного использования и лёгкость ошибиться. Разбор идёт прозой, без таблиц. Код скилл не пишет — он только про форму интерфейса, поэтому не стоит ждать от него готовой реализации. Если запустить субагентов без разных ограничений, они выдадут похожие варианты, и вся ценность сравнения пропадёт.
Какие задачи решает
- выбрать форму интерфейса модуля до того, как написан код
- сравнить несколько подходов к API, а не остановиться на первом
- разложить требования к модулю на вопросы и зафиксировать их
- понять, что спрятать внутри модуля, а что вынести наружу
- оценить, тянет ли интерфейс эффективную реализацию
Примеры запросов агенту
- Спроектируй интерфейс модуля кеширования через api-shape-explorer
- Прогони design it twice для API клиента оплаты
- Сравни разные формы интерфейса для модуля работы с файлами
Как установить api-shape-explorer
1Через Skills CLI (Vercel)
npx skills add zebbern/claude-code-guide --skill api-shape-explorer -a claude-code2Вручную: положить файлы
~/.claude/skills/api-shape-explorer/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/api-shape-explorer/
1Через Skills CLI (Vercel)
npx skills add zebbern/claude-code-guide --skill api-shape-explorer -a codex2Вручную: положить файлы
.agents/skills/api-shape-explorer/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add zebbern/claude-code-guide --skill api-shape-explorer -a cursor2Вручную: положить файлы
.cursor/skills/api-shape-explorer/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install zebbern/claude-code-guide api-shape-explorer2Вручную: положить файлы
.github/skills/api-shape-explorer/SKILL.md1Через Skills CLI (Vercel)
npx skills add zebbern/claude-code-guide --skill api-shape-explorer -a gemini-cli2Командой платформы
gemini skills install https://github.com/zebbern/claude-code-guide --path skills/api-shape-explorerВручную: положить файлы
.devin/skills/api-shape-explorer/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add zebbern/claude-code-guide --skill api-shape-explorer -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о api-shape-explorer
Как установить api-shape-explorer в Claude?
Выполните npx skills add zebbern/claude-code-guide --skill api-shape-explorer -a claude-code. После этого скилл лежит в ~/.claude/skills/api-shape-explorer/SKILL.md.
Что делает api-shape-explorer?
Генерирует несколько радикально разных вариантов интерфейса модуля через параллельных субагентов, показывает их по очереди и сравнивает по простоте, глубине и удобству использования.
Он пишет код модуля?
Нет. Скилл занимается только формой интерфейса: сигнатуры, примеры вызова, скрытая сложность и компромиссы. Реализацию вы пишете сами.
Исходный текст
SKILL.md · MIT
--- name: api-shape-explorer description: Generate multiple radically different interface designs for a module using parallel sub-agents. Use when user wants to design an API, explore interface options, compare module shapes, or mentions "design it twice". --- # Design an Interface Based on "Design It Twice" from "A Philosophy of Software Design": your first idea is unlikely to be the best. Generate multiple radically different designs, then compare. ## Workflow ### 1. Gather Requirements Before designing, understand: - [ ] What problem does this module solve? - [ ] Who are the callers? (other modules, external users, tests) - [ ] What are the key operations? - [ ] Any constraints? (performance, compatibility, existing patterns) - [ ] What should be hidden inside vs exposed? Ask: "What does this module need to do? Who will use it?" ### 2. Generate Designs (Parallel Sub-Agents) Spawn 3+ sub-agents simultaneously using Task tool. Each must produce a **radically different** approach. ``` Prompt template for each sub-agent: Design an interface for: [module description] Requirements: [gathered requirements] Constraints for this design: [assign a different constraint to each agent] - Agent 1: "Minimize method count - aim for 1-3 methods max" - Agent 2: "Maximize flexibility - support many use cases" - Agent 3: "Optimize for the most common case" - Agent 4: "Take inspiration from [specific paradigm/library]" Output format: 1. Interface signature (types/methods) 2. Usage example (how caller uses it) 3. What this design hides internally 4. Trade-offs of this approach ``` ### 3. Present Designs Show each design with: 1. **Interface signature** - types, methods, params 2. **Usage examples** - how callers actually use it in practice 3. **What it hides** - complexity kept internal Present designs sequentially so user can absorb each approach before comparison. ### 4. Compare Designs After showing all designs, compare them on: - **Interface simplicity**: fewer methods, simpler params - **General-purpose vs specialized**: flexibility vs focus - **Implementation efficiency**: does shape allow efficient internals? - **Depth**: small interface hiding significant complexity (good) vs large interface with thin implementation (bad) - **Ease of correct use** vs **ease of misuse** Discuss trade-offs in prose, not tables. Highlight where designs diverge most. ### 5. Synthesize Often the best design combines insights from multiple options. Ask: - "Which design best fits your primary use case?" - "Any elements from other designs worth incorporating?" ## Evaluation Criteria From "A Philosophy of Software Design": **Interface simplicity**: Fewer methods, simpler params = easier to learn and use correctly. **General-purpose**: Can handle future use cases without changes. But beware over-generalization. **Implementation efficiency**: Does interface shape allow efficient implementation? Or force awkward internals? **Depth**: Small interface hiding significant complexity = deep module (good). Large interface with thin implementation = shallow module (avoid). ## Anti-Patterns - Don't let sub-agents produce similar designs - enforce radical difference - Don't skip comparison - the value is in contrast - Don't implement - this is purely about interface shape - Don't evaluate based on implementation effort
© zebbern · MIT · zebbern/claude-code-guide