# lint-and-style-config

> Claude/Codex skill by [@zakariaf](https://omgskills.com/library/zakariaf/index.md) · 61 stars · Updated 2026-09-23

Enforces a strict analysis\_options.yaml built on very\_good\_analysis with strict-casts/strict-raw-types, a fixed set of silence-producing bug classes promoted to error (unawaited\_futures, discarded\_futures, empty\_catches, use\_build\_context\_synchronously, cancel\_subscriptions, close\_sinks, avoid\_dynamic\_calls, exhaustive\_cases, avoid\_print), dart format as the sole whitespace authority, generated-file excludes mirrored to coverage, and line-scoped-only suppression discipline; teaches the version-pinned-include trap (a missing include silently disables all rules), the errors-only-re-ranks-vs-linter-enables mechanic, and the sealed-switch analyze-vs-compile gap. Use when editing analysis\_options.yaml, adding or disabling a lint, writing an \`// ignore:\`/\`// ignore\_for\_file:\`, bumping the Dart SDK or very\_good\_analysis version, wiring riverpod\_lint, or explaining why discarded\_futures, use\_build\_context\_synchronously, close\_sinks, or missing\_provider\_scope fires.

Tags: agent-skills, ai-agents, best-practices, claude-code, codex, coding-agent, cursor, dart, dartlang, developer-tools, drift, flutter, flutter-architecture, github-copilot, go-router, llm, material-design, mvvm, riverpod, skills

## Install

```sh
git clone https://github.com/zakariaf/Flutter-Skills /tmp/Flutter-Skills && ln -s /tmp/Flutter-Skills/skills/lint-and-style-config ~/.claude/skills/lint-and-style-config
```

## From README

Lint & Style Config Style is not taste; it is toolchain-enforced. dart format owns whitespace, the analyzer owns correctness, and a small set of silence-producing bug classes are promoted to build-failing errors. This skill governs the analysisoptions.yaml itself and the mechanics that decide whether it actually does anything. Applies whenever you edit that file, add or silence a lint, or bump the SDK/ruleset. Read the reference for the task at hand: references/rule-catalog.md — every promoted rule and its bug class, the deliberate downgrades, the contested publicmemberapidocs call, and the complexity-limit table. references/config-mechanics.md — the include-pin trap, errors:-re-ranks vs linter:-enables, sealed-switch analyze-vs-compile, coverage mirroring, the riverpodlint plugin, and suppression discipline. Copy examples/analysisoptions.yaml into the package root as the starting config. Run scripts/verify-include-pin.sh and scripts/lint-gates.sh before a PR.

## Links

- HTML page: https://omgskills.com/library/zakariaf/flutter-skills/skills/lint-and-style-config/
- GitHub: https://github.com/zakariaf/Flutter-Skills
- Author: [@zakariaf](https://omgskills.com/library/zakariaf/index.md)

## More from this repo

- [accessibility-as-code](https://omgskills.com/library/zakariaf/flutter-skills/skills/accessibility-as-code/index.md) — Enforces accessibility as a correctness property authored into each widget — Semantics(button/label) or...
   - [@zakariaf](https://omgskills.com/library/zakariaf/index.md) · 61 stars
- [adaptive-layout](https://omgskills.com/library/zakariaf/flutter-skills/skills/adaptive-layout/index.md) — Enforces adapting layout by available CONSTRAINTS/size, never device or platform checks — LayoutBuilder +...
   - [@zakariaf](https://omgskills.com/library/zakariaf/index.md) · 61 stars
- [ads-and-iap-monetization](https://omgskills.com/library/zakariaf/flutter-skills/skills/ads-and-iap-monetization/index.md) — Enforces opt-in, rewarded-first monetization over the service seam — a rewarded view grants exactly one benefit and...
   - [@zakariaf](https://omgskills.com/library/zakariaf/index.md) · 61 stars
