widgetbook-component
Create and register Widgetbook use-cases for UI components in packages/app_ui and packages/widgetbook. Trigger when adding new design system components or…
от 7span★ 43 звезды на GitHub
Установить widgetbook-component в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Widgetbook Component Skill
Guidelines for documenting and cataloging UI components from packages/app_ui into packages/widgetbook.
1. Directory Structure
Mirror the component level (atoms, molecules, organisms) inside packages/widgetbook/lib/widgets/:
packages/widgetbook/lib/widgets/
├── atoms/
│ ├── app_text.dart
│ └── spacing.dart
├── molecules/
│ ├── app_button.dart
│ └── app_text_field.dart
└── organisms/
└── custom_dialog.dart
2. Writing a Use-Case
Use the @widgetbook.UseCase annotation and configure knobs so developers can test variations interactively:
import 'package:app_ui/app_ui.dart';
import 'package:flutter/material.dart';
import 'package:widgetbook/widgetbook.dart';
import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook;
@widgetbook.UseCase(
name: 'Default',
type: [ComponentName],
)
Widget default[ComponentName]UseCase(BuildContext context) {
final label = context.knobs.string(
label: 'Label',
initialValue: 'Sample Text',
);
final isEnabled = context.knobs.boolean(
label: 'Is Enabled',
initialValue: true,
);
return Center(
child: [ComponentName](
text: label,
isEnabled: isEnabled,
),
);
}
3. Code Generation Command
After adding or updating a @widgetbook.UseCase:
melos run widgetbook-gen
This updates packages/widgetbook/lib/main.directories.g.dart.
4. Verification
Run static analysis on the widgetbook package:
flutter analyze packages/widgetbook
Confirm zero errors and zero warnings.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл widgetbook-component?
Create and register Widgetbook use-cases for UI components in packages/app_ui and packages/widgetbook. Trigger when adding new design system components or modifying UI atoms/molecules/organisms.
Как установить скилл widgetbook-component?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл widgetbook-component запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
AnthropicGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
webapp-testing
AnthropicToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
brand-guidelines
AnthropicApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
web-artifacts-builder
AnthropicSuite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…