·
Last changedVersion:
This version passed the hardening gate. Hardening applied 9 targeted changes and preserved all other text. Classified findings before hardening: 1. Classified findings closed: 0. Classified findings remaining: 1. Unclassified scanner findings remaining: 0. Review findings closed: 8. Review findings remaining: 2.
1
1
Expand | File | Group | Subtype | Severity | Status |
|---|---|---|---|---|---|
LICENSE | Excessive Agency & Rogue Autonomy | — | Low | Open |
1 finding
Enforce strict Separation of Concerns by dividing the application into distinct layers. Never mix UI rendering with business logic or data fetching.
Implement the MVVM (Model-View-ViewModel) pattern to manage UI state and logic.
ChangeNotifier (or use Listenable) to expose state. Expose immutable state snapshots to the View. Inject Repositories into ViewModels via the constructor. Catch errors from Repositories in the ViewModel and expose an error state, so the View can show a distinct error message with a retry action, separate from the empty state.Implement the Repository pattern to isolate data access logic and create a single source of truth.
Result wrappers. Keep API keys and tokens out of source code, use HTTPS for network calls, and store tokens in platform secure storage.Result for malformed data. Keep any cache separate for each requested id, clear it when the user signs out or switches, and let refresh actions fetch fresh data.Organize the codebase using a hybrid approach: group UI components by feature, and group Data/Domain components by type.
For existing projects, detect and keep the current state management, dependency injection, and folder conventions, and limit changes to the requested feature or files. Present any file moves or restructuring as a plan and get explicit user confirmation before acting, including before deleting files. Prefer gradual migration under version control.
Follow this sequential workflow when adding a new feature to the application. Copy the checklist to track progress.
freezed or built_value. Check the project's existing dependencies first and prefer what is already in use. Ask the user before adding a new package or running a code generation step, and use explicit version constraints for any package added.ChangeNotifier. Inject required Repositories/Use Cases. Expose immutable state and command methods.ListenableBuilder or AnimatedBuilder to listen to ViewModel changes.provider or get_it). Use the container the project already has, and ask the user before adding a new package.Get started with chainctlchainctl skill install public/flutter/flutter-apply-architecture-best-practices:latest
Bring Chainguard's hardening pipeline to your first-party skills — custom rulesets, automated remediation, full audit trail.
skills.cgr.dev/public/github.com/flutter/skills/flutter-apply-architecture-best-practices:latest
BSD-3-Clause
HARDENING.md
LICENSE
SKILL.md