rules-dart

Enforce Effective Dart naming, formatting, and testing conventions.

4|1|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/NSObjects/specpowers --skill rules-dart
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rules-dart
Source: https://github.com/NSObjects/specpowers/tree/main/skills/rules-dart
Command: npx skills add https://github.com/NSObjects/specpowers --skill rules-dart

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a Dart-specific layer on top of the universal coding rules so that Flutter and Dart teams do not inadvertently violate Effective Dart naming, formatting, or testing conventions when using a shared rulebook.

Core Features & Use Cases

  • Naming and formatting: Enforces PascalCase for public types, camelCase for variables, snake_case filenames, dart format, and consistent import ordering suited to Dart idioms.
  • Type safety and async guidance: Recommends null safety, judicious var usage, final and const policies, and best practices for futures, streams, and error handling to keep Dart projects sound.
  • Testing and dependency management: Encourages package test structures, focus on business logic, constructor injection, and clear dispose patterns for Flutter widgets and services during reviews or new implementations.

Quick Start

Ask for Dart coding rules before writing or reviewing Dart files to ensure all naming, formatting, and error handling follow Effective Dart guidance.

Frequently Asked Questions about rules-dart

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce Effective Dart naming and formatting conventions in my Flutter project?

Apply Dart coding rules before writing or reviewing files to enforce null safety, final and const policies, and best practices for futures, streams, and error handling in your project.

What are the best practices for null safety and async error handling in Dart?

Best practices for null safety and async error handling involve enforcing strict final and const policies alongside tailored guidance for managing futures and streams to keep Dart projects sound.

Does this Dart ruleset cover testing guidance and dependency management for Flutter widgets?

Yes, the Dart ruleset covers testing and dependency management by encouraging package test structures, focusing on business logic, and defining clear dispose patterns for Flutter widgets and services.

Can I use these Dart coding rules for constructor injection and dispose pattern reviews?

Yes, you can use these rules to verify constructor injection and clear dispose patterns for Flutter widgets and services during code reviews or new implementations.

What is the recommended way to structure Dart files to follow Effective Dart guidance?

The recommended way to structure Dart files involves using snake_case filenames, enforcing dart format, and maintaining consistent import ordering suited to Dart idioms.