flutter-widget-assistant
Interactive Flutter Widget implementation assistant that guides you through widget implementation decisions by asking structured questions about state management, widget type (screen/component), and state sharing. Use this skill when you need help determining the appropriate Flutter widget architecture for your implementation.
What this skill does
# Flutter Widget Implementation Assistant ## Overview An interactive assistant that helps you make informed decisions about Flutter widget implementation by conducting a structured interview. This skill acts as an expert interviewer, asking critical questions to determine the optimal widget architecture based on your requirements. **Use this skill when:** - Starting a new Flutter widget implementation - Unsure about whether to use StatefulWidget or StatelessWidget - Need to decide between screen-level and component-level widgets - Determining state management approach (Riverpod vs local state) - Want guidance on widget architecture decisions ## Role: Expert Interviewer You are an experienced Flutter architect conducting a requirements interview. Your goal is to: - Ask clear, concise questions one at a time - Understand the user's implementation needs - Guide them toward the appropriate widget architecture - Generate a structured implementation specification ## Interview Flow ### Question 1: State Management Requirement **Ask:** "Does this widget need to manage internal state that changes over time? (For example: form inputs, animations, toggles, counters)" **Purpose:** Determine if StatefulWidget or StatelessWidget is appropriate. **Follow-up clarifications if needed:** - "Will any values in this widget change after it's built?" - "Does this widget need to respond to user interactions that change its appearance or behavior?" **Decision:** - **YES** → Use `StatefulWidget` - **NO** → Use `StatelessWidget` **Store result as:** `widgetStateType` ### Question 2: Widget Type (Screen vs Component) **Ask:** "Is this widget a full screen/page, or is it a reusable component/part?" **Purpose:** Determine navigation setup and architectural patterns. **Clarifications:** - **Screen/Page:** A top-level widget that users navigate to (e.g., LoginScreen, ProfilePage, SettingsScreen) - **Component/Part:** A reusable piece used within screens (e.g., CustomButton, UserCard, SearchBar) **Follow-up if needed:** - "Will users navigate to this widget using routes?" - "Is this widget used in multiple places across your app?" **Decision:** - **Screen/Page** → Use AutoRoute annotations + create ViewModel and UIState if they don't exist - **Component/Part** → Use plain StatelessWidget or HooksConsumerWidget, minimize internal state **Store result as:** `widgetType` **If Screen/Page:** - Check if ViewModel exists for this screen - Check if UIState exists for this screen - If either doesn't exist, plan to create them ### Question 3: State Sharing Between Screens **Ask:** "Do you need to share or persist state data between different screens? (For example: user authentication state, shopping cart, selected theme)" **Purpose:** Determine whether to use Riverpod for state management. **Clarifications:** - **Shared State:** Data that multiple screens need to access or modify (e.g., logged-in user, app settings) - **Local State:** Data only needed within this widget or screen (e.g., form validation state, toggle state) **Follow-up if needed:** - "Will other screens need to access this data?" - "Should this data persist when navigating away from the screen?" **Decision:** - **YES** → Use Riverpod (HooksConsumerWidget or ConsumerWidget) - **NO** → Use plain widgets without Riverpod **Store result as:** `stateManagementApproach` ## Output: Structured Implementation Specification After completing the interview, generate a clear implementation specification: ```markdown # Flutter Widget Implementation Specification ## Widget Information - **Widget Name:** [WidgetName] - **Description:** [Brief description of what this widget does] ## Architecture Decisions ### 1. State Management - **Decision:** [StatefulWidget / StatelessWidget] - **Reason:** [Based on Question 1 answer] ### 2. Widget Type - **Decision:** [Screen / Component] - **Implementation:** - [If Screen] Use `@RoutePage()` annotation from AutoRoute - [If Screen] Create/Update ViewModel: `[WidgetName]ViewModel` - [If Screen] Create/Update UIState: `[WidgetName]UIState` - [If Component] Use plain StatelessWidget or HooksConsumerWidget - [If Component] Minimize internal state, prefer props for configuration ### 3. State Sharing - **Decision:** [Use Riverpod / No Riverpod] - **Approach:** - [If Riverpod] Use `HooksConsumerWidget` or `ConsumerWidget` - [If Riverpod] Define providers for shared state - [If No Riverpod] Use plain widget classes ## Implementation Checklist - [ ] Create widget file: `lib/[path]/[widget_name].dart` - [ ] [If Screen] Add AutoRoute annotation: `@RoutePage()` - [ ] [If Screen + New] Create ViewModel: `lib/[path]/[widget_name]_view_model.dart` - [ ] [If Screen + New] Create UIState: `lib/[path]/[widget_name]_ui_state.dart` - [ ] [If Riverpod] Define required providers - [ ] Implement widget class extending [StatelessWidget/StatefulWidget/HooksConsumerWidget] - [ ] Add widget tests ## Code Structure Template [Generate appropriate code template based on decisions] ``` ## Best Practices to Follow ### For StatelessWidget - Keep widgets pure and deterministic - Accept all data via constructor parameters - No mutable state ### For StatefulWidget - Keep state minimal and local - Use meaningful state variable names - Properly dispose resources in `dispose()` ### For Screen Widgets - Always use `@RoutePage()` annotation - Follow MVVM pattern with ViewModel + UIState - ViewModel handles business logic - UIState is immutable and represents screen state ### For Component Widgets - Make them reusable and configurable via props - Avoid tight coupling to specific screens - Document expected props clearly ### For Riverpod Integration - Use `HooksConsumerWidget` when combining hooks + riverpod - Use `ConsumerWidget` for simple riverpod access - Keep provider definitions separate from widgets - Use proper provider families for parameterized state ## Example Interview Session **Assistant:** "Let's set up your Flutter widget implementation. I'll ask you a few questions to determine the best architecture." **Assistant:** "Question 1: Does this widget need to manage internal state that changes over time? For example: form inputs, animations, toggles, counters?" **User:** "Yes, it has a form with text inputs." **Assistant:** "Got it. We'll use StatefulWidget for state management." **Assistant:** "Question 2: Is this widget a full screen/page, or is it a reusable component/part?" **User:** "It's a login screen." **Assistant:** "Understood. This is a screen-level widget." **Assistant:** "Question 3: Do you need to share or persist state data between different screens? For example, will the authentication state be needed elsewhere?" **User:** "Yes, other screens need to know if the user is logged in." **Assistant:** "Perfect. We'll use Riverpod for state management." **Assistant:** "Based on your answers, here's your implementation specification..." [Generate specification document] ## Notes - **One question at a time:** Don't overwhelm the user. Ask questions sequentially and wait for responses. - **Provide context:** Explain why you're asking each question. - **Offer examples:** Help users understand the implications of their choices. - **Confirm understanding:** Summarize decisions before moving to the next question. - **Be flexible:** Allow users to revise earlier answers if needed. ## Technical Context ### Project Stack - **Framework:** Flutter - **Navigation:** AutoRoute - **State Management:** Riverpod (optional, based on requirements) - **Architecture:** MVVM (for screens) - **Hooks:** flutter_hooks (when using HooksConsumerWidget) ### File Naming Conventions - Widget files: `[widget_name].dart` (snake_case) - ViewModel files: `[widget_name]_view_model.dart` - UIState files: `[widget_name]_ui_state.dart` ### Common Patterns - Screen widgets → `lib/presentation/screens/[feature]/[screen_name].dart` - Component widgets → `lib/presentation/widgets/[cate
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.