dart-best-practices
БесплатноБез исполняемых скриптовНе проверенDart code quality conventions: naming, const/final/var hierarchy, single quotes, trailing commas, collection idioms, tear-offs, and import organization. Use…
от HoangNguyen0403★ 598 звёзд на GitHubОб этом скилле
Dart Best Practices
Priority: P1 (HIGH)
- Scoping:
- No global variables.
- Private globals (if required) must start with
_. - Immutability: Use
const>final>var. - Config: Use
--dart-definefor secrets. Never hardcode API keys. - Naming: Follow effective-dart (PascalCase classes, camelCase members).
- Strings: Prefer single quotes; use double quotes only for interpolation needs.
- Trailing Commas: Always use trailing commas for multi-line literals/params.
- Expression Bodies: Prefer
=>for single-expression functions/getters. - Collections:
- Use
.map,.where,.fold,.anyover manual loops when clarity improves. - Type empty collections (
<String>[],<String, User>{}) to avoiddynamic. - Use collection
if/forand spread operators for composable lists/maps. - Async: Always
awaitfutures unless intentionally fire-and-forget.
import 'models/user.dart'; // Good
import 'package:app/models/user.dart'; // Avoid local absolute
Anti-Patterns
- No var for non-obvious types: Use
finalor explicit type;varonly for locally-obvious short scopes. - No package imports within same package: Use relative imports for intra-package files.
- No top-level mutable state: Encapsulate in class or inject via DI.
- No anonymous lambdas for tear-offs: Prefer
list.forEach(doSomething)over anonymous form.
Установить dart-best-practices в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл dart-best-practices?
Dart code quality conventions: naming, const/final/var hierarchy, single quotes, trailing commas, collection idioms, tear-offs, and import organization. Use only for Dart style-focused changes or reviews; never activate for configuration-only lint setup, unrelated feature work, or widget tests.
Как установить скилл dart-best-practices?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл dart-best-practices запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic