iamantoniodinuzzo/flutter-toolkit/audit-application-layer
Claude Code and agent skill by iamantoniodinuzzo/flutter-toolkit
- community
Checking that the SKILL.md file is still in the repository.
Audit a Flutter application-layer file or folder against the project's documented Riverpod v3 notifier rules, async-mutation patterns, and cohesion/coupling rules — Flutter framework imports in application code, datasource bypass (skipping the repository facade), presentation imports, hard-wired repository construction instead of provider injection, god notifiers, redundant manual try/catch in notifiers, mutation methods returning values instead of Future<void>, and unconstrained provider state…
Install
npx vskill@latest install iamantoniodinuzzo/flutter-toolkit/audit-application-layerSKILL.md
The same SKILL.md was published earlier as iamantoniodinuzzo/flutter-toolkit/audit-application-layer.
Audit Application Layer
Runtime and resources
Use the current agent's native file, search, shell, and question tools; plain-text questions and direct sequential scans are valid fallbacks. Subagents are optional and require host permission. Bundled paths below are relative to this installed skill directory; application paths are relative to the target Flutter project. Resolve sibling skills through the installed skill registry (or sibling directories), never by assuming a skills/ folder in the application. If a required dependency is absent, name it and report the affected step as unavailable; never invent its rules or claim complete coverage.
Statically scans Flutter application-layer source files against bundled Riverpod v3 notifier rules and async-mutation patterns. Emits a violations table, then offers targeted fixes.
Rule source
Rules are bundled locally in rules. This skill does not delegate to ai_toolkit/ — it is self-contained.
Phase 0 — Resolve input
Read the user's request and extract one of:
- Single file: a path ending in
.dart - Feature folder: a path that contains an
application/directory
If neither is clear, ask exactly one question:
"Provide a.dartfile path underapplication/, or a feature folder path containing anapplication/directory."
Do not proceed until a path is confirmed.
Phase 1 — Load rule catalog
Read rules/CATALOG.md in full before scanning.
Do not read individual rule doc files yet — the catalog contains all heuristics needed for Phase 3. Open a specific rule doc only if you need to clarify a borderline case or produce a more detailed fix explanation.
Phase 2 — Discover files
Single-file mode
Target file = the provided .dart path.
Classify it as application-file.
If the provided file is NOT under application/, classify as non-application and apply only APP-DEP-01 (framework import check) if it is not under presentation/ either.
Folder mode
Discover files with a permitted read-only subagent, otherwise scan directly. Use this prompt:
Classify each file as application-file.
Phase 3 — Scan
For each application-file:
- Read the full file contents.
- Apply every heuristic in
rules/CATALOG.md. - For each match: record
{file, line_number, rule_id, severity, message, fix_hint, autofix_safe}.
Heuristic application notes:
- APP-DEP-01: flag any
import 'package:flutter/widgets.dart'or
import 'package:flutter/material.dart' or import 'package:flutter/cupertino.dart' in files under application/. Riverpod imports (package:riverpod_annotation, package:riverpod, package:flutter_riverpod) are allowed and must NOT be flagged.
- APP-NOTIF-02: flag
try {blocks inside a class that extends or mixes in
AsyncNotifier, Notifier, StreamNotifier, AutoDisposeAsyncNotifier, AutoDisposeNotifier, or any class whose name ends in Notifier. The key signal is manual try/catch around await expressions for error reporting — the AsyncErrorLogger and Riverpod's single-error-channel via state assignment already handle this. Do NOT flag try/catch that converts an infra exception to a domain exception (which is data-layer work and valid if present for a specific reason).
- APP-NOTIF-01: flag public async methods (not
build) inside notifier classes that
declare a return type other than Future<void> or void. Specifically flag Future<T> methodName( where T is not void. Mutation methods must surface errors via state (single error channel) and return Future<void>.
- APP-STATE-01: flag provider annotations (
@riverpod) where the inferred or declared
state type is dynamic, Object? (as a state type, not a param), or Map without type parameters. Specifically look for AsyncValue<dynamic>, AsyncValue<Map>, StateProvider<dynamic>, StateProvider<Map>, or class-level state = assignments where the assigned value is typed dynamic.
- APP-COUPLE-01: in files under
application/, flagimportlines whose path contains
datasource/data_source, and usages of types ending in Datasource/DataSource (constructor calls, ref.read(xxxDatasourceProvider), type annotations).
- APP-COUPLE-02: in files under
application/, flagimportlines whose path contains
/presentation/.
- APP-COUPLE-03: in notifier classes, flag assignments matching
=\s*\w*(Repository(Impl)?|Data[Ss]ource)\( — manual construction of repository/datasource implementations instead of provider resolution. Skip test files.
- APP-COHESION-01: count public (non-
_, non-build) method declarations per notifier
class; flag the class line when > 7. Also flag application files > 300 lines as a secondary signal.
Phase 4 — Report
Emit the violations grouped by file:
If no violations are found, say so explicitly:
Phase 5 — Fix prompt
After the report, ask:
On response:
- "none" or no response: done.
- "all" or specific IDs:
- For each violation matching the selected IDs:
- If
autofix_safe: true: apply the edit directly, show diff. - If
autofix_safe: false: show the specific change needed and ask the
user to confirm before editing. Provide the exact code transformation.
- After all edits, re-run Phase 3 on touched files only.
- Confirm which violations were resolved.
Never edit files that were not explicitly approved by the user.
Usage examples
audit the application layer of features/authaudit this notifier: lib/src/features/auth/application/auth_notifier.dartfind application violations in features/booking/application//audit-application-layer lib/src/features/auth/application//audit-application-layer lib/src/features/booking/
Notes
- Application paths resolve from the project root; bundled references resolve from this installed skill directory.
- This skill does not shell out to
dart analyze; it reads files directly. - It does not overlap with
riverpod-reviewer(which auditsref.watch/ref.read
placement in widgets) or audit-domain-layer / audit-data-layer.
- The single-error-channel pattern is documented in
rules/patterns/async-notifier-command-api.md.
- To add or modify rules, edit
rules/CATALOG.mdonly.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/audit-application-layer/SKILL.md
Popularity
- 7-day trend score
- 0
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/iamantoniodinuzzo/flutter-toolkit/audit-application-layer)