dart-rules

dart-rules is a skill for Claude Code from softspark/ai-toolkit. It costs 44 tokens per session (3,475 once invoked), scanned A, original, Apache-2.0.

A set of coding rules for Dart and Flutter applications, covering naming, null safety, classes, patterns, security, and testing. Flutter is a toolkit for building applications with Dart.

In plain words
What is it for?
Use it when writing or reviewing Flutter widgets, Dart packages, application state code, and Flutter tests.
Why use it?
It gives Dart and Flutter code shared conventions and safer handling of values that may be missing. It also documents expectations for application structure and tests.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the ai-toolkit plugin — 115 skills, 44 agents, 14 hooks shipped together

Good fit Use it when writing or reviewing Flutter widgets, Dart packages, application state code, and Flutter tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/softspark/ai-toolkit/dart-rules
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 softspark/ai-toolkit --skill dart-rules
Clone the repo
git clone --depth 1 https://github.com/softspark/ai-toolkit

Made for: Claude Code.

Or install ai-toolkit, the plugin that ships this one along with the rest of its 115 skills, 44 agents, 14 hooks.

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 dart-rules

README.md
[![agentmods](https://agentmods.dev/badge/skills/softspark/ai-toolkit/dart-rules/github.svg)](https://agentmods.dev/skills/softspark/ai-toolkit/dart-rules)
Your own site
<a href="https://agentmods.dev/skills/softspark/ai-toolkit/dart-rules"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/dart-rules/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 dart-rules

Your own site · 80×15
<a href="https://agentmods.dev/skills/softspark/ai-toolkit/dart-rules"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/dart-rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,475 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 warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 216
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
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.00044 $0.03475
Opus 5 $0.00022 $0.01737
Sonnet 5 $0.00009 $0.00695
Haiku 4.5 $0.00004 $0.00347

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

Security

Grade A, and why

dart-rules 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 6d 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.

app/skills/dart-rules/SKILL.md · 300 lines

How it starts

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

Dart/Flutter Rules

These rules come from app/rules/dart/ in ai-toolkit. They cover the project's standards for coding style, frameworks, patterns, security, and testing in Dart/Flutter. Apply them when writing or reviewing Dart/Flutter code.

Dart Coding Style

Naming

  • PascalCase: classes, enums, typedefs, extensions, mixins.
  • camelCase: variables, functions, methods, parameters, named constants.
  • snake_case: libraries, packages, directories, source files.
  • UPPER_SNAKE: not used in Dart. Use camelCase for constants.
  • Prefix private members with _: _internalState, _helper().

Null Safety

  • Enable sound null safety (default since Dart 2.12).
  • Use ? types only when null is semantically meaningful.
  • Use ! operator sparingly. Prefer null checks or ?? fallback.
  • Use late keyword only when initialization is guaranteed before access.
  • Use required keyword for mandatory named parameters.

Classes

  • Use const constructors for immutable classes.
  • Use factory constructors for caching, subtype selection, or validation.
  • Use named constructors for clarity: Point.fromJson(json).
  • Use final fields for immutable properties.
  • Use @immutable annotation on classes that should be immutable.

Functions

  • Use named parameters for functions with >2 parameters.
  • Use required for mandatory named parameters.
  • Use default values for optional parameters.
  • Use fat arrow (=>) for single-expression functions.
  • Always specify return types for public functions.

Collections

  • Use collection literals: [], {}, <String, int>{}.
  • Use if and for inside collection literals for conditional/iterative building.
  • Use spread operator: [...list1, ...list2].
  • Use whereType<T>() for type-safe filtering.
  • Prefer const collections when values are known at compile time.

Async

  • Use async/await for all asynchronous operations.
  • Return Future<T> from async functions. Never return void.
  • Use Stream<T> for continuous data (events, real-time updates).
  • Use Future.wait() for concurrent independent operations.
  • Use Completer<T> only when wrapping callback-based APIs.

Read the full file on GitHub · 300 lines

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. 6d ago First seen · 300 lines · 44 tokens per session scan A 5e2247bdb825

Subscribe to this mod's changes

dart-rules is a skill published in the GitHub repository softspark/ai-toolkit (170 stars, last pushed yesterday), licensed Apache-2.0. It adds 44 tokens to every session and 3,475 once invoked, about $0.0002 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

asc-shots-pipeline

Orchestrate iOS screenshot automation with xcodebuild/simctl for build-run, AXe for UI actions, JSON settings and plan files, Koubou-based framing (asc screenshots frame), and screenshot upload (asc screenshots upload). Use when users ask for automated screenshot capture, AXe-driven simulator flows, frame composition…

rorkai/app-store-connect-cli-skills · 79 tokens

beta-testing

Beta testing strategy for iOS/macOS apps. Covers TestFlight program setup, beta tester recruitment, feedback collection methodology, user interviews, signal-vs-noise interpretation, and go/no-go launch readiness decisions. Use when planning a beta, setting up TestFlight, collecting user feedback, or deciding if ready…

rshankras/claude-code-apple-skills · 67 tokens

qa-testing-android

Designs Android testing with Espresso, UI Automator, and Compose. Use when planning device matrices, screenshot tests, CI flows, or flake-control workflows.

vasilyu1983/AI-Agents-public · 37 tokens

qa-testing-mobile

Mobile QA for iOS and Android. Use when planning automation frameworks, device matrix, flake control, or CI/CD release gates.

vasilyu1983/AI-Agents-public · 31 tokens

accessibility-audit

Run a structured accessibility audit on an iOS/macOS app — automated XCUITest audits, Accessibility Inspector, manual VoiceOver/Dynamic Type passes, and App Store Accessibility Nutrition Label evaluation. Use before release, when preparing Nutrition Label declarations, or for EU Accessibility Act compliance.

rshankras/claude-code-apple-skills · 60 tokens

unit-test

A Go testing workflow for writing unit tests: small tests that check individual functions or components. It supports table-driven cases, where many inputs and expected results are organised in one test, and subtests.

johnqtcg/awesome-skills · 100 tokens