layered-architecture

layered-architecture is a skill for Claude Code from VeryGoodOpenSource/vgv-ai-flutter-plugin. It costs 18 tokens per session (4,114 once invoked), scanned A, original, MIT.

A set of rules for structuring Flutter apps as four separate layers: data, repositories, business logic, and presentation. It applies these rules across a monorepo, which is one code repository containing multiple related packages.

In plain words
What is it for?
Use it when building or reviewing Flutter features that follow a four-layer design. It guides package boundaries, dependencies, repository ownership, and local package references.
Why use it?
It prevents features from mixing responsibilities or depending on each other in the wrong direction. This makes shared data code easier to reuse and keeps changes easier to trace.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is path: ../user_api_client.

Part of the vgv-ai-flutter-plugin plugin — 15 skills, 1 agent, 3 hooks, 2 MCP servers shipped together

Good fit Use it when building or reviewing Flutter features that follow a four-layer design. It guides package boundaries, dependencies, repository ownership, and local package references.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/VeryGoodOpenSource/vgv-ai-flutter-plugin
agentmods
npx agentmods add skills/verygoodopensource/vgv-ai-flutter-plugin/layered-architecture

Made for: Claude Code.

Or install vgv-ai-flutter-plugin, the plugin that ships this one along with the rest of its 15 skills, 1 agent, 3 hooks, 2 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for layered-architecture

README.md
[![agentmods](https://agentmods.dev/badge/skills/verygoodopensource/vgv-ai-flutter-plugin/layered-architecture.svg)](https://agentmods.dev/skills/verygoodopensource/vgv-ai-flutter-plugin/layered-architecture)
Your own site
<a href="https://agentmods.dev/skills/verygoodopensource/vgv-ai-flutter-plugin/layered-architecture"><img src="https://agentmods.dev/badge/skills/verygoodopensource/vgv-ai-flutter-plugin/layered-architecture.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,114 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00018 $0.04114
Opus 5 $0.00009 $0.02057
Sonnet 5 $0.00004 $0.00823
Haiku 4.5 $0.00002 $0.00411

Measured 8d ago against content hash 636a5d54f597, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

layered-architecture scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/layered-architecture/SKILL.md · 404 lines

How it starts

The opening of the file, as written. The whole thing — 404 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Layered Architecture

Layered monorepo architecture for Flutter apps — four layers organized as independent Dart packages with strict unidirectional dependencies.


Core Standards

Apply these standards to ALL layered architecture work:

  • Four layers — Data, Repository, Business Logic, Presentation — every feature spans exactly these four layers
  • Unidirectional dependencies — Presentation → Business Logic → Repository → Data — never skip or invert a layer
  • Data and Repository layers live in packages/ — each is an independent Dart package with its own pubspec.yaml
  • Business Logic and Presentation live in lib/ — organized by feature within the app
  • Data layer packages contain zero domain/business logic — they must be reusable in unrelated projects
  • No inter-repository dependencies — repositories never import other repositories
  • No Flutter SDK in data or repository packages — scaffold with the very_good_cli MCP server create dart_package tool
  • One repository per domainuser_repository, weather_repository, auth_repository
  • Path dependencies for local packages — never git: or pub version references for packages in the same repo
  • Barrel exports at every package boundarysrc/ is never imported directly by consumers
  • Repositories accept data layer dependencies via constructor injection — never instantiate clients internally
  • App bootstrap wires all layersmain_<flavor>.dart creates clients and repositories, provides them via RepositoryProvider

Architecture Overview

Layer Responsibility Location Depends On Example
Data External communication — API calls, local storage, platform plugins packages/<name>_api_client/ External packages only user_api_client, local_storage_client
Repository Data orchestration — combines data sources, transforms models, caches packages/<name>_repository/ Data layer packages user_repository, weather_repository
Business Logic State management — processes user actions, emits state changes lib/<feature>/bloc/ or lib/<feature>/cubit/ Repository layer LoginBloc, ProfileCubit
Presentation UI — widgets, pages, views, layout lib/<feature>/view/ Business Logic layer LoginPage, ProfileView

Read the full file on GitHub · 404 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 404 lines · 18 tokens per session scan A 636a5d54f597

Subscribe to this mod's changes

layered-architecture is a skill published in the GitHub repository VeryGoodOpenSource/vgv-ai-flutter-plugin (160 stars, last pushed 3d ago), licensed MIT. It adds 18 tokens to every session and 4,114 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.