presentation
Skill2 starsChanged 9 months agoMITView on GitHub
Generate presentation layer code (Freezed states, Riverpod notifiers, screens, widgets) from feature specifications. Creates the UI layer with proper state management. Use after /data to implement screens and state handling.
We split this skill into the rules it gives an agent
13 rules. 0 are common, 7 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 18 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Never imports data layer (models, repository implementations)
- Very specific: line 23
After /data has implemented repositories
- Distinctive: line 24
When creating screens from spec requirements
- Distinctive: line 25
When adding new screens or actions to existing features
- Very specific: line 52
If domain/data layers don't exist, ask user to run /domain and /data first.
- Very specific: line 64
Use reference files in reference/ directory as templates:
- Very specific: line 112
Sealed unions: - Use Freezed sealed class for exhaustive matching
- Distinctive: line 113
Domain entities only: - Never put DTOs in state
- Distinctive: line 122
Repository injection: - Read repository from ref, never import data layer
- Distinctive: line 146
Before finishing presentation layer:
- Distinctive: line 174
No data layer imports: - Only import from domain/
- Very specific: line 176
Disposal safety: - Always check _disposed after await
- Very specific: line 177
Pattern matching: - Use switch expression on sealed states
“Common” is measured: kept by at least 6 in 10 of the 18 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Presentation - Presentation Layer Generator
Generate presentation layer components that handle UI state and render screens using domain entities.
Philosophy
The presentation layer is domain-aware, data-blind:
- Imports domain entities and repository interfaces
- Never imports data layer (models, repository implementations)
- Uses Freezed sealed states for exhaustive pattern matching
- Uses Riverpod AsyncNotifier with disposal safety
This keeps the UI decoupled from data sources and serialization details.
When to Use This Skill
- After
/datahas implemented repositories - When creating screens from spec requirements
- When adding new screens or actions to existing features
- User asks to "create screen", "implement UI", "add presentation layer"
What This Skill Creates
lib/features/{feature}/presentation/
├── providers/
│ ├── {feature}_state.dart # Freezed sealed state
│ └── {feature}_notifier.dart # AsyncNotifier with safe state
├── screens/
│ └── {feature}_screen.dart # ConsumerWidget with pattern matching
└── widgets/
└── {feature}_item.dart # Extracted reusable widgetsWorkflow
Step 1: Locate Requirements
Check for:
lib/features/{feature}/.spec.md # Feature specification
lib/features/{feature}/domain/ # Domain entities
lib/features/{feature}/data/ # Repository implementationIf domain/data layers don't exist, ask user to run /domain and /data first.
Step 2: Analyze UI Requirements
From the spec, identify:
- Screens - Section 4.1 (list, detail, form, etc.)
- State Fields - What data each screen needs
- Actions - User interactions (refresh, create, delete, submit)
- Navigation - How screens connect
Step 3: Generate Code
Use reference files in reference/ directory as templates:
| Component | Reference File |
| List state | reference/providers/list_state.dart |
| Detail state | reference/providers/detail_state.dart |
| Form state | reference/providers/form_state.dart |
| Basic notifier | reference/providers/basic_notifier.dart |
| CRUD notifier | reference/providers/crud_notifier.dart |
| Form notifier | reference/providers/form_notifier.dart |
| List screen | reference/screens/list_screen.dart |
| Detail screen | reference/screens/detail_screen.dart |
| Form screen | reference/screens/form_screen.dart |
| List item widget | reference/widgets/list_item.dart |
| Form field widget | reference/widgets/form_field.dart |
Step 4: Run Code Generation
dart run build_runner build --delete-conflicting-outputsStep 5: Verify
dart analyze lib/features/{feature}/presentation/Commands
| Command | Purpose |
/presentation {feature} | Generate full presentation layer |
/presentation {feature} --only=providers | Generate only state and notifier |
/presentation {feature} --only=screens | Generate only screens |
/presentation {feature} --add-screen={Name} | Add new screen to existing feature |
Screen Types
| Type | Use When | State Complexity |
| List | Displaying collection | initial, loading, loaded(items), error |
| Detail | Single item view | initial, loading, loaded(item), error |
| Form | Create/edit | Form fields + isSubmitting, validation |
| Confirmation | Destructive actions | Minimal, action-focused |
State Design Principles
- Sealed unions - Use Freezed
sealed classfor exhaustive matching - Domain entities only - Never put DTOs in state
- Derived state - Compute
isEmpty,hasErrorfrom base state - Separate form state - Forms use field-based state, not sealed unions
Core pattern: sealed class with initial, loading, loaded(items), error(message)
Notifier Design Principles
- Disposal safety - Track
_disposedflag, check after every await - Repository injection - Read repository from ref, never import data layer
- Error mapping - Convert exceptions to user-friendly messages (via
/i18n) - Action methods - One public method per user action
Core pattern:
bool _disposed = false;
void _safeSetState(State s) { if (!_disposed) state = s; }
// Check _disposed after EVERY awaitScreen Pattern
Core pattern:
switch (state) {
StateInitial() || StateLoading() => CircularProgressIndicator(),
StateLoaded(:final items) => ListView.builder(/*...*/),
StateError(:final message) => Text(message),
}Checklist
Before finishing presentation layer:
- All screens from spec are created
- State uses domain entities only
- Notifier has
_disposedflag and_safeSetState - Screen uses
switchpattern matching on state - All user actions have corresponding notifier methods
- Loading states shown during async operations
- Error states display user-friendly messages (i18n keys)
- Empty states handled with helpful messages
- No data layer imports (no models, no repository implementations)
- Widgets extracted when screen exceeds 200 lines
build_runnerexecuted successfully
Naming Conventions
| Element | Convention | Example |
| State class | {Feature}State | BookmarksState |
| State file | {feature}_state.dart | bookmarks_state.dart |
| Notifier class | {Feature}Notifier | BookmarksNotifier |
| Notifier file | {feature}_notifier.dart | bookmarks_notifier.dart |
| Screen class | {Feature}Screen | BookmarksScreen |
| Screen file | {feature}_screen.dart | bookmarks_screen.dart |
| Widget | {Feature}{Component} | BookmarkListItem |
Presentation Layer Rules
- No data layer imports - Only import from domain/
- Freezed for states - Sealed unions for exhaustive matching
- Disposal safety - Always check
_disposedafter await - Pattern matching - Use
switchexpression on sealed states - Widgets for reuse - Extract when >50 lines or used multiple times
Guides
| Guide | Use For |
| patterns-guide.md | State patterns, notifier patterns, screen structures |
| examples.md | Complete before/after examples |
| reference/ | Actual code templates |
Related Skills
/data- Run first to implement repository/domain- Creates entities used by presentation/feature-init- Initialize feature scaffold/i18n- Localize user-facing strings and error messages/design- Polish UI/UX patterns after basic implementation/a11y- Add accessibility support/testing- Create widget tests
Other versions21 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 21
- MotiaDev/motia★ 19ksame name
- iii-hq/iii★ 19ksame name
- thedesignproject/agent-skills★ 88same name
- AlekseiUL/sprut-agent-kit★ 66same name
- AlemTuzlak/skills★ 45same name
- Vepricov/claude-brainlab★ 35same name
- aisa-group/promptinject-agent-skills★ 22same name
- AlekseiUL/heisenberg-team★ 17same name
- karem505/karem-arabic-presentation★ 9same name
- greglas75/zuvo★ 8same name
11 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use design-review.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
dillonluiSkilldesign-review
Review a view or flow for UX and UI issues. Provides severity-ranked, actionable findings grounded in established design heuristics. Use when the user asks for design feedback, UX review, or UI critique.
Also in 3 projects that use this
In this repository27 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- a11ySkill
- account-deletionSkill
- analyticsSkill
- authSkill
- ci-cdSkill
- coreSkill
- dataSkill
- deep-linkingSkill
- designSkill
- domainSkill
- feature-initSkill
- flavorsSkill
- force-updateSkill
- i18nSkill
- in-app-purchasesSkill
- initSkill
- local-authSkill
- network-connectivitySkill
- offlineSkill
- phone-authSkill
- planSkill
- push-notificationsSkill
- releaseSkill
- skill-createSkill
- social-loginSkill
- testingSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

