
dart-long-lines
Guidelines for handling long lines in Dart code to adhere to the 80-column rule. The lineslongerthan80chars lint.
- Installs
- 145
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/kevmoo/dash_skills --skill dart-long-lines- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads dart-long-lines automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Dart Long Lines
1. When to use this skill
Use this skill when:
- Writing Dart code that might exceed the 80-column limit.
- Refactoring code to comply with the
lines_longer_than_80_charslint. Reference: https://dart.dev/tools/linter-rules/lines_longer_than_80_chars
When NOT to use (Abstention Guardrails)
Do NOT break lines or alter code when:
- Unbreakable URLs & URIs: Lines contain long HTTP/HTTPS URLs, import URIs, or file paths where breaking them across lines would invalidate the link.
- Complex Regular Expression Literals: Long RegExp patterns
(
RegExp(r'...')) where inserting whitespace or line breaks changes the matching semantics. - ASCII Art, Tables, or Preformatted Diagrams: Preformatted text blocks, table rows, or ASCII diagrams inside comments or strings where wrapping lines destroys visual alignment.
- Prior to Automated Formatting: Do NOT manually break code lines before
running
dart format. Letdart formathandle code wrapping automatically; only manually wrap comments, docs, and multi-line strings that the formatter does not re-wrap.
Discovery
To find lines that exceed the limit:
Automated Analysis
The most reliable way to find long lines is to use the Dart analyzer:
- Command:
dart analyze - Lint:
lines_longer_than_80_chars
Manual Search
To search for long lines using regex:
- Regex:
^.{81,}$(Matches any line with 81 or more characters).
2. Guidelines
Format First
Always run dart format before manually breaking long lines. The formatter
often automatically fixes long lines, especially in generated code, and applies
standard Dart styling rules.
Code Comments
Break long code comments (//) cleanly at word boundaries to ensure lines do
not exceed 80 characters. Maintain tight formatting and avoid unnecessary
vertical space.
Documentation Comments (///)
- Apply the same line-breaking rules as for code comments.
- Avoid breaking markdown link blocks like
[name]or[text](http://example.com)across lines. Place them on their own line if they exceed the limit. - Start doc comments with a single summary sentence, followed by a blank line before the rest of the comment. It is okay to break this first sentence across multiple lines to fit the 80-column limit.
- Avoid unresolved references or dangling sentences.
Long Strings
- Use adjacent string literals (e.g.,
'part 1 ' 'part 2') to break long strings. Break at word boundaries. - If a single-line string contains newline characters (
\n) or if there are consecutiveprintstatements, consider migrating to a multi-line string literal (''').
Format and Analyze After Changes
- Run
dart formatanddart analyzeafter making changes. - Be aware that splitting strings may trigger new lints (e.g.,
prefer_single_quotesif a double-quoted string is split into parts that no longer contain single quotes).
3. Examples
Documentation Comment Link
Avoid:
/// This is a long doc comment that contains a link to [a very long
/// URL](http://example.com/very/long/url/that/exceeds/eighty/chars).
Prefer:
/// This is a long doc comment that contains a link to [a very long URL][ref].
///
/// [ref]: http://example.com/very/long/url/that/exceeds/eighty/chars
Adjacent String Literals
Prefer:
final longString = 'This is a very long string that needs to be broken '
'across multiple lines to stay under the limit.';
Multi-line String Migration
Avoid:
print('This is line 1\nThis is line 2 that is also quite long\nThis is line 3 which makes the whole thing exceed eighty characters');
Prefer:
print('''This is line 1
This is line 2 that is also quite long
This is line 3 which makes the whole thing exceed eighty characters''');
FAQ
What does the dart-long-lines skill do?
Guidelines for handling long lines in Dart code to adhere to the 80-column rule. The lineslongerthan80chars lint.
How do I install dart-long-lines?
Run npx skills add https://github.com/kevmoo/dash_skills --skill dart-long-lines in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/dart-long-lines/ (personal) or .claude/skills/dart-long-lines/ (project).
Which AI agents can use dart-long-lines?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is dart-long-lines safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains dart-long-lines?
It is published by kevmoo in kevmoo/dash_skills. It has 145 recorded installs.
More from kevmoo/dash_skills
dart-best-practices
kevmoo/dash_skills
General best practices for Dart development. Covers code style, effective Dart, and language features.
dart-test-fundamentals
kevmoo/dash_skills
Open the skill to read its SKILL.md instructions.
dart-modern-features
kevmoo/dash_skills
Guidelines for using modern Dart features (v3.0 - v3.10) such as Records, Extension Types, Class Modifiers, Wildcards, Digit Separators, Null-Aware Elements, and Dot Shorthands.
dart-package-maintenance
kevmoo/dash_skills
Open the skill to read its SKILL.md instructions.
dart-matcher-best-practices
kevmoo/dash_skills
Open the skill to read its SKILL.md instructions.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.