ui-state-design
Skill2 starsChanged 5 months agoMITView on GitHub
Use to design Android and Compose UI states for loading, empty, content, error, offline, permission and sensitive-data flows while preserving ViewModels, data layers and tests.
In this repository38 other files it gives its agents.
- AGENTS.mdAGENTS.md
- super-android-kotlin-firebaseSkill
- accessibilitySkill
- agp9-kotlin-migrationSkill
- android-architectureSkill
- android-coreSkill
- android-navigation-3Skill
- code-review-refactorSkill
- compose-contextual-design-systemSkill
- compose-performanceSkill
- context-aware-ui-designSkill
- debuggingSkill
- dependency-injectionSkill
- dependency-upgrade-safetySkill
- design-test-gateSkill
- edge-to-edge-adaptive-uiSkill
- firebase-ai-logicSkill
- firebase-authSkill
- firebase-cloud-functionsSkill
- firebase-coreSkill
- firebase-crashlytics-analyticsSkill
- firebase-emulator-ciSkill
- firebase-messagingSkill
- firestore-costs-quotasSkill
- firestoreSkill
- gradle-buildSkill
- jetpack-composeSkill
- kotlin-coreSkill
- macrobenchmark-baseline-profilesSkill
- networking-retrofit-ktorSkill
- play-store-releaseSkill
- r8-proguard-optimizationSkill
- room-datastoreSkill
- screen-ux-auditSkill
- security-privacySkill
- testingSkill
- workmanager-background-syncSkill
- xml-to-compose-migrationSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 8 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 32
Add or recommend previews and tests for critical states.
- Distinctive: line 37
Do not invent states that the ViewModel or data layer cannot produce.
- Distinctive: line 38
Do not hide errors behind generic messages when recovery matters.
- Distinctive: line 42
Prefer explicit UI models over scattered nullable flags.
- Distinctive: line 57
Do not assume these companion skills are installed.
- Distinctive: line 100
Use $super-android-kotlin-firebase to design UI states for this Firebase-backed screen.
- Distinctive: line 101
Use $super-android-kotlin-firebase to add empty, offline and permission-denied design guidance before Compose implementation.
- Distinctive: line 102
Use $super-android-kotlin-firebase to review this ViewModel state model for UX gaps.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Purpose
Make every important UI state intentional, testable and accessible.
When to use
- Designing or reviewing loading, empty, content, error, offline or permission states.
- Creating a screen state model before implementing Compose UI.
- Improving AI-generated UI that only handles the happy path.
- Connecting UI copy, affordances and tests to repository, network, Room, DataStore or Firebase behavior.
Inputs to inspect
- Gate result from
design-test-gate. - ViewModel state model and events.
- Repository/network/local/Firebase result types.
- Existing previews and tests.
- Error, permission, offline, auth and sync behavior.
- Accessibility labels and recovery actions.
Required workflow
- Confirm build/tests passed before redesigning states.
- Map the real state sources: local data, network, Firebase, permissions and user actions.
- Define visible states and transitions without changing data ownership.
- Design copy, actions and accessibility semantics for each state.
- Add or recommend previews and tests for critical states.
- Route implementation details to existing Compose, testing and data skills.
Rules
- Do not invent states that the ViewModel or data layer cannot produce.
- Do not hide errors behind generic messages when recovery matters.
- Preserve ViewModel, repository, Firebase and navigation contracts.
- Give offline and permission-denied states clear next actions.
- Include sensitive-data handling in state design when the domain requires it.
- Prefer explicit UI models over scattered nullable flags.
Related existing skills
Local skills to invoke
- jetpack-compose
- testing
- accessibility
- room-datastore
- networking-retrofit-ktor
- firebase-core
External companion skills to use when installed
Do not assume these companion skills are installed. Prefer the local skills above first, then consult Companion Skills for install and verification commands.
- aldefy/compose-skill — use for deeper Jetpack Compose, Material 3, design-to-code, theming or Compose architecture guidance.
- skydoves/android-testing-skills — use for deeper Android or Compose UI testing, semantics, assertions or test workflow guidance.
Files commonly touched
*UiState.kt*ViewModel.kt*Screen.kt*Route.kt- Repository result models
- Compose previews
- Unit and UI tests
Commands to validate
./gradlew assembleDebug
./gradlew test
./gradlew connectedDebugAndroidTest
./gradlew lintCommon mistakes to avoid
- Designing only content state.
- Using one generic error for auth, network, validation and permission failures.
- Changing repository behavior to fit a visual idea.
- Forgetting loading, empty, offline or stale-data states.
- Adding state that has no preview or test.
Checklist
- Build/tests gate passed.
- State sources identified.
- State matrix defined.
- Recovery actions clear.
- Accessibility semantics considered.
- Previews and tests planned.
- Existing data contracts preserved.
Example prompts
- Use $super-android-kotlin-firebase to design UI states for this Firebase-backed screen.
- Use $super-android-kotlin-firebase to add empty, offline and permission-denied design guidance before Compose implementation.
- Use $super-android-kotlin-firebase to review this ViewModel state model for UX gaps.
Expected response style
Respond with: gate status, state-source map, state matrix, UI copy/actions, related skills, validation commands and risks. Do not recommend data-layer changes unless a missing state contract blocks correct UI.
References
- ../../docs/audits/FUENTES_LOCALES.md
- references/ui-state-matrix-notes.md
- templates/ui-state-matrix-template.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
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.

