naming-conventions

Enforces Effective Dart casing and architectural role suffixes across Dart and Flutter codebases.

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/zakariaf/NearlyStop --skill naming-conventions-zakariaf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: naming-conventions
Source: https://github.com/zakariaf/NearlyStop/tree/main/.claude/skills/naming-conventions
Command: npx skills add https://github.com/zakariaf/NearlyStop --skill naming-conventions-zakariaf

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Inconsistent naming makes Dart and Flutter code hard to search, review, and refactor. This Skill enforces Effective Dart casing rules and architectural role suffixes so a class name, file name, or grep result immediately reveals which layer a symbol lives in. ## Core Features & Use Cases - Casing Enforcement: Applies UpperCamelCase for types, lowerCamelCase for members and constants, and lowercase_with_underscores for files, folders, and import prefixes. - Layer-Declaring Suffixes: Maps role suffixes (Screen, Notifier, Repository, Dao, Service, Gateway, Failure) to architectural layers so names carry structural meaning. - Semantic Naming Rules: Requires units in quantity names, boolean assertions with is/has/can/should prefixes, and bans Hungarian notation, get-prefixes, and SCREAMING_CAPS constants. - Use Case: When creating a new Riverpod ViewModel for a task list, the Skill directs you to name it TaskListNotifier in task_list_notifier.dart, with grouped and alphabetized imports. ## Quick Start Review this Dart file and rename any classes, constants, or files that violate Effective Dart naming conventions and the architectural suffix rules.

Frequently Asked Questions about naming-conventions

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

FAQPage Schema
How do I name classes and files in Dart?

Classes, enums, mixins, and typedefs use UpperCamelCase, while files and folders use lowercase_with_underscores. The file name must match its primary declaration, so TaskNotifier lives in task_notifier.dart with one primary public type per file.

What naming convention should Dart constants use?

Dart constants use lowerCamelCase, such as maxItemsPerPage, never SCREAMING_CAPS. Dart dropped the C-style convention, and the analyzer enforces this through the constant_identifier_names lint rule.

How should I name a Riverpod ViewModel in Flutter?

Name Riverpod ViewModels with the Notifier suffix, such as TaskListNotifier in task_list_notifier.dart, one per Screen. Avoid ViewModel, Controller, or VM suffixes on the Riverpod path; ViewModel is reserved for the Provider appendix only.

What is the difference between a Service and a Gateway in Dart architecture?

A Service is a capability interface you define, like ShareService, while a Gateway wraps a specific external plugin or native channel, like NotificationGateway over flutter_local_notifications. Concrete implementations stay in the composition root and never leak into shared code.

Should Dart boolean variables use is and has prefixes?

Yes, booleans should read as assertions using is, has, can, or should prefixes, such as isLoading, hasError, and canSubmit. This makes conditions read like prose and avoids ambiguous names like loading or valid.

How should Dart imports be ordered?

Group imports with dart: first, then package:, then relative imports, each group alphabetized, with exports in their own section after imports. Let dart format and the directives_ordering lint enforce this rather than sorting by hand.