flutter/dart-skills-lint-setup
|- Use this skill when you need to set up validation for AI agent skills in a Dart project for the first time. Adds the linter as a dev_dependency, creates a configuration file, and generates a baseline for legacy repos.
npx skills add https://github.com/flutter/agent-plugins --skill dart-skills-lint-setup
This skill covers first-time wiring of dart_skills_lint into a
repository. For ongoing use — running the linter, interpreting
output, and writing custom rules — see the
dart-skills-lint-validation
skill. For copy-pasteable CI workflow and pre-commit hook recipes,
see the Recipes section of the README.
dart_skills_lint as a dev_dependency. dev_dependencies:
dart_skills_lint: ^0.5.0
Isolate the dependency in a tool/ package when you can,
instead of putting it on the root pubspec.yaml — keeps the
linter's deps out of your runtime closure. If you must add it
to multiple pubspec.yaml files, ensure the ref: (commit
hash) is identical across all of them so resolution doesn't
diverge.
dart_skills_lint.yaml at the repository root so boththe CLI and any embedded test invocation share the same config:
dart_skills_lint:
rules:
check-relative-paths: error
check-trailing-whitespace: error
directories:
- path: ".agents/skills"
Rules enabled by default — check-absolute-paths,
valid-yaml-metadata, invalid-skill-name,
description-too-long — only need to be listed if you want to
change their severity. See RULES.md for the
full list.
with pre-existing skills that have legacy violations you don't
want to fix immediately:
dart run dart_skills_lint:cli --skills-directory=.agents/skills --generate-baseline
This writes the current set of failures into an ignore file so
the next run exits clean. New violations introduced after the
baseline still surface as errors.
GitHub Actions recipe from the README
verbatim, or follow the
pre-commit hook recipe below it.
The dart-skills-lint-validation skill takes over from here for
day-to-day use.
Take flutter/dart-skills-lint-setup from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.