gskinnerteam/flutter-hatcha-app/catalogue-items
Claude Code and agent skill by gskinnerteam/flutter-hatcha-app
- community
Checking that the SKILL.md file is still in the repository.
Project file conventions for GenUI catalogue items. Use when: adding a new widget to the catalogue, following the 5-step file convention, naming CatalogItem files, writing example data, using leaf/container/three-tier/factory patterns, working with ChildrenResolver, atomic components, nested GenUI controllers, or module sizing.
Install
npx vskill@latest install gskinnerteam/flutter-hatcha-app/catalogue-itemsSKILL.md
Creating GenUI Catalogue Items
This skill guides you through creating catalogue items — the bridge between AI-generated JSON and themed Flutter widgets.
When to Use
- Adding a new widget type to the GenUI catalogue
- Following the 5-step file convention for catalogue item files
- Writing example data (leaf vs container export rules)
- Using leaf, container, three-tier, or factory patterns
- Working with
ChildrenResolverfor container items - Creating atomic components or nested GenUI controllers
- Module sizing with
AppModuleCard
Package API: ForCatalogItem,CatalogItemContext,DataModel,DataContext,A2uiSchemasreference types, and the data binding pattern, see thegenuiskill. For building schemas withS.object,S.string, etc., see thejson-schema-builderskill.
Pre-requisites
Before creating a catalogue item, review the reference examples for advanced topics (DataModel updates, dataBinding, nested controllers, ChildrenResolver shapes, three-tier pattern).
1. File Structure (5-Step Convention)
Every catalogue item file MUST contain these 5 sections in this exact order:
Naming Conventions
| Element | Convention | Example | |
|---|---|---|---|
_name | Private, PascalCase string | 'MeterGauge' | |
_schema | Private final | _schema | |
| Extension type | Private, _ prefix + Data suffix | _MeterGaugeData | |
| Example data | Public, lowerCamelCase + ExampleData | meterGaugeExampleData | |
| CatalogItem | Public, lowerCamelCase | meterGauge |
Example Data Rules
- Always a stringified JSON array with
"id": "root"as the root component - Use
$_nameor${_name}to reference the catalogue item name - Reference other items' example data via their exported names
Container items (those with componentArrayReference or componentReference): Do NOT export example data as a public constant. Keep it inline within CatalogItem.exampleData to prevent other items from importing full component trees.
Leaf items (no children): Export example data as a public constant so container items can reference it.
See leaf example and container example for complete templates.
2. Widget Patterns
ForCatalogItemconstructor API,CatalogItemContextproperties, and data binding patterns, see thegenuiskill's catalog-api.md and data-binding.md.For schema types (S.object,S.string, etc.) and theA2uiSchemasvsS.*decision, see thegenuiskill's data-binding.md and thejson-schema-builderskill.
Schema Description Best Practices
The description is the system prompt for the AI. Be explicit:
- Bad:
"A list of labels." - Good:
"Ordinal text array (e.g., [\"\$\", \"\$\$\"]). Length 2-6. Each label max 5 characters."
Include constraints (min/max counts, value ranges, expected formats).
Leaf Widget Pattern
No children — return a widget directly from widgetBuilder. Export example data as a public constant.
See leaf example.
Container Widget Pattern
Uses componentArrayReference or componentReference for children. Use ChildrenResolver to handle all child reference shapes (static lists, data bindings, templates).
Keep example data inline (not exported) for container items. See container example.
Interactive Widget Pattern
Form widgets exist in separate subdirectories per context:
| Variant | Directory | Purpose | |
|---|---|---|---|
| Interactive | guest_invite/ or interview/ | User fills out forms, writes to DataModel |
3. Registering & Advanced Patterns
Registering a Catalogue Item
After creating the file, add the item to the appropriate Catalog list. Items are gathered in catalogue aggregation files (e.g., interview_input_catalogue_item.dart) and passed to the Catalog constructor.
Factory-Pattern Catalogue Items
When a catalogue item needs injected context (e.g. eventId, moduleId) not available in a static export, use a factory function:
Register factory items inside the controller's catalog getter (not as a static top-level constant):
4. Nested GenUI Controller Pattern
Some catalogue items create their own internal GenUI controller for complex nested UI. The item instantiates a controller with a mini-catalogue and its own system prompt.
Use when: the item needs to orchestrate multiple dynamic child components, requires its own system prompt, or needs complete isolation from the parent UI tree.
5. Atomic Components Pattern
For space-constrained layouts (compact cards, dense displays), use atomic components with minimal properties and preset styling via context.styles.
Available atomic components (lib/design_system/catalogue_items/atomic/):
Text—content+weight(light/normal/medium), usescaption(12px)Header—content, usesbody2(14px)Column—childIds+spacing(none/tight/normal/loose)Row—childIds+spacing(none/tight/normal/loose)MiniChecklist—header,items[]withlabel+ optionalsubitems,selectedValuesstate ref
Spacing presets: none=0, tight=4px, normal=8px, loose=16px
Use when: space-constrained cards (~250×294px), information-dense layouts, controllers needing ≤5 components. Limit depth to 3 levels (Column → Row → Text).
6. Module Sizing (AppModuleCard)
AppModuleCard (lib/design_system/widgets/app_module_card.dart) is the standard container for dashboard modules and charts.
- Width:
double.infinity - Height: Content-driven (no fixed constraint)
- `AppModuleCard.cardHeight`: Legacy constant (
300.0) for charts that self-constrain viaConstrainedBox
Styling
Access styles ONLY via context.styles and context.colors (BuildContext extensions). Never hardcode colors or text styles.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.github/skills/catalogue-items/SKILL.md
Popularity
- Repository stars
- 66
- Repository forks
- 7
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/gskinnerteam/flutter-hatcha-app/catalogue-items)