flutter-dependency-injection

flutter-dependency-injection is a skill for Claude Code, Codex from HoangNguyen0403/agent-skills-standard. It costs 29 tokens per session (520 once invoked), scanned A, original, MIT.

A guide to dependency injection in Flutter using injectable and getit. Dependency injection supplies classes with the services they need instead of making them create or locate those services themselves.

In plain words
What is it for?
Use it to register services and data sources, choose singleton or factory lifetimes, inject interfaces through constructors, and configure test mocks.
Why use it?
It reduces hidden dependencies and makes services, repositories, third-party tools, and test replacements easier to configure and manage.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to register services and data sources, choose singleton or factory lifetimes, inject interfaces through constructors, and configure test mocks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hoangnguyen0403/agent-skills-standard/flutter-dependency-injection
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add HoangNguyen0403/agent-skills-standard --skill flutter-dependency-injection
Clone the repo
git clone --depth 1 https://github.com/HoangNguyen0403/agent-skills-standard

Made for: Claude Code, Codex.

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 flutter-dependency-injection

README.md
[![agentmods](https://agentmods.dev/badge/skills/hoangnguyen0403/agent-skills-standard/flutter-dependency-injection/github.svg)](https://agentmods.dev/skills/hoangnguyen0403/agent-skills-standard/flutter-dependency-injection)
Your own site
<a href="https://agentmods.dev/skills/hoangnguyen0403/agent-skills-standard/flutter-dependency-injection"><img src="https://agentmods.dev/badge/skills/hoangnguyen0403/agent-skills-standard/flutter-dependency-injection/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for flutter-dependency-injection

Your own site · 80×15
<a href="https://agentmods.dev/skills/hoangnguyen0403/agent-skills-standard/flutter-dependency-injection"><img src="https://agentmods.dev/badge/skills/hoangnguyen0403/agent-skills-standard/flutter-dependency-injection.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 520 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.00029 $0.00520
Opus 5 $0.00015 $0.00260
Sonnet 5 $0.00006 $0.00104
Haiku 4.5 $0.00003 $0.00052

Measured 9d ago against content hash f9904eda1139, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

flutter-dependency-injection 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 9d 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/flutter/flutter-dependency-injection/SKILL.md · 68 lines

What it actually says

Dependency Injection

Priority: P1 (HIGH)

Structure

core/injection/
├── injection.dart  # Initialization & setup
└── modules/        # Third-party dependency modules (Dio, Storage)

Implementation Workflow

  1. Annotate classes — Use @injectable annotations; avoid manual registry calls.
  2. Choose scope — Default to @LazySingleton for repositories, services, and data sources (init on demand).
  3. Register BLoCs as factories — Use @injectable (Factory) for BLoCs to ensure state resets per instance. Never use @Singleton() for BLoCs.
  4. Inject abstractions — Always register implementations as abstract interfaces (as: IService).
  5. Register third-party deps — Use @module for external instances (Dio, Hive, SharedPreferences).
  6. Prefer constructor injection — Use mandatory constructor parameters; injectable resolves them automatically.

Registration & Test Mock Examples

See implementation examples for module registration and test mock swap patterns.

Reference & Examples

For module configuration and initialization templates: See references/REFERENCE.md.

Anti-Patterns

  • No Inline getIt Calls: Inject via constructor instead of calling GetIt in UI build()
  • No @Singleton BLoCs: Always use @injectable (Factory) to ensure state resets
  • No Concrete Class Injection: Always inject abstract interface (e.g., IOrderRepository)
  • No Manual Registration: Use @injectable annotations instead of manual getIt.register calls in production code

layer-based-clean-architecture | testing

Canonical response anchors

When this skill applies, preserve the following domain terminology or equivalent concrete examples in the answer when relevant:

  • Dependency Injection
  • abstract interface

Remediation anchors

  • Remediation anchors: factory registration, fresh CartBloc instance
Files

What ships with it

4 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. 9d ago First seen · 68 lines · 29 tokens per session scan A f9904eda1139

Subscribe to this mod's changes

flutter-dependency-injection is a skill published in the GitHub repository HoangNguyen0403/agent-skills-standard (565 stars, last pushed 3d ago), licensed MIT. It adds 29 tokens to every session and 520 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-09-03.

Related

Other skills, from other repositories

android-finance-spec

Use when generating, reviewing, or refactoring Android Kotlin code for financial apps that require BigDecimal/String precision, RTL/i18n safety, Kotlin style discipline, and "do not reinvent existing project patterns" constraints.

brycegao/android-finance-spec · 48 tokens

mobile-automation

Control Android and iOS devices, emulators and simulators — launch apps, tap, swipe, type, take screenshots, read the accessibility tree. Use when a task involves a mobile device or app, mobile UI testing, or reproducing a bug on a phone.

mobile-next/mobile-mcp · 58 tokens

building-ui

Complete guide for building beautiful apps with Expo Router. Covers fundamentals, styling, components, navigation, animations, patterns, and native tabs.

Intelligent-Internet/ii-agent · 30 tokens

use-dom

Use Expo DOM components to run web code in a webview on native and as-is on web. Migrate web code to native incrementally.

Intelligent-Internet/ii-agent · 32 tokens

ii-app

Use this skill when you need to initialize or restart local web and mobile app projects through the bundled Rust ii-app CLI instead of calling MCP tools.

Intelligent-Internet/ii-agent · 34 tokens

ios-simulator-preview

Show a live iOS Simulator in the dashboard's Browser side panel while building or testing an iOS app. Use when the user asks to preview an iOS/SwiftUI app, run an app in the simulator, "show me the app", test in the iOS simulator, or watch you drive an iOS app. macOS + Xcode only.

kirodotdev/KiroCrew · 78 tokens