dart-run-static-analysis: a Dart team skill for dart analyze and dart fix
A Dart team skill that makes Claude run dart analyze, apply dart fix and keep analysis_options.yaml in order.
- Installs
- 19.5K
- on skills.sh
- Stars
- 537
- on GitHub
- Updated
- Oct 2026
- last repo commit
This skill gives Claude two workflows. The first runs the analyzer with the analyze_files MCP tool if your agent has it, or dart analyze <target_directory> otherwise. The second previews fixes with dart fix --dry-run, applies them with dart fix --apply, runs dart format ., then analyzes again. It triggers during development and before committing changes.
The skill also holds rules for analysis_options.yaml: an included rule set, strict casts, linter rules, formatter settings and plugins. It adds ways to suppress a warning by file, line or pubspec.yaml. It is one file and bundles no scripts. dart fix --apply and dart format . change your source files.
Good for
- Dart and Flutter developers who want lint and analyzer issues cleaned up
- Teams who want analysis run before every commit
- Anyone setting up strict type checks in analysis_options.yaml
Install dart-run-static-analysis
Claude Code
- 1
Copy this prompt.
Install the dart-run-static-analysis skill in Claude Code. Run this command: npx skills add https://github.com/dart-lang/skills --skill dart-run-static-analysis Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js.
From its listing on skills.sh. Source.
What's in the skill
When it loads
Execute `dart analyze` to identify warnings and errors, and use `dart fix --apply` to automatically resolve mechanical lint issues. Use during development to ensure code quality and before committing changes.
Sections in SKILL.md
- Contents
- Analysis Configuration
- Diagnostic Suppression
- Workflow: Executing Static Analysis
- Workflow: Applying Automated Fixes
- Examples
- Comprehensive analysis_options.yaml
- Inline Diagnostic Suppression
Key facts
- License
- BSD-3-Clause
- Installs on skills.sh
- 19,549 as of 2026-11-02
- Last repo commit
- 2026-10-16
- skills.sh audits
- Gen Agent Trust Hub: pass, Socket: pass, Snyk: pass
What it includes
Run the analyzer and review the output
Checks that analysis_options.yaml exists, runs analyze_files or dart analyze, reviews the output, and adds --fatal-infos if info-level issues must fail.
Try: “Run static analysis on this package and fix what it finds.”
Runs code ·
Workflow: executing static analysisPreview, apply and format with dart fix
Runs dart fix --dry-run, reviews the changes, applies them with dart fix --apply, formats with dart format . and re-runs the analyzer.
Runs code ·
Workflow: applying automated fixesRules for analysis_options.yaml
Include a standard rule set, enable strict-casts, strict-inference and strict-raw-types, set linter rules, formatter page_width and trailing_commas, and add analyzer plugins as dev_dependencies.
Write ·
Analysis configurationExclude files or ignore single diagnostics
Uses analyzer exclude globs, ignore_for_file, ignore on a line, and ignore comments in pubspec.yaml.
Write ·
Diagnostic suppressionA full analysis_options.yaml and inline suppression
Two worked examples for the configuration and suppression rules.
Read ·
Examples
From the official docs
Permissions
Low risk
Claude runs dart commands that rewrite your source files. Work in a git repository and review the diff before you commit.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
dart fix --apply and dart format change many files
The skill previews first with dart fix --dry-run. Review the diff and commit separately so you can revert. github.com
Technical details
| Scopes |
|
|---|
Questions
What does dart-run-static-analysis do?
It makes Claude run the Dart analyzer, then preview and apply automatic fixes with dart fix, format the code, and analyze again. It also tells Claude how to configure analysis_options.yaml.
How do I install it?
Use the install box at the top of this page. The dart-lang/skills README also gives one command that installs every skill in the repo into the standard .agents/skills folder, if you want the whole set.
Does it need the Dart MCP tools?
No. The steps use the analyze_files, dart_fix and dart_format MCP tools if available, and give the dart analyze, dart fix and dart format commands as the other route.
Is it safe to use?
dart fix --apply and dart format . edit your files, so run it in a git repository and review the diff. The skill tells Claude to preview with dart fix --dry-run and to check the proposed fixes first.
How is it different from dart-fix-runtime-errors?
dart-run-static-analysis is about running the analyzer and automated fixes, plus analysis_options.yaml setup. dart-fix-runtime-errors, another skill in the same Dart repo, is a longer workflow on fixing type, null-safety and override errors by hand after dart fix, ending with dart test. See its SKILL.md for the steps.
Information
updated Nov 2, 2026
- Repository
- dart-lang/skills
- Folder
skills/dart-run-static-analysis
Sources
Docs, issue trackers and discussions this page is built from.