Agent skill

Dart Multiline Strings

by kevmoo in kevmoo/dash_skills

Guidelines and best practices for refactoring consecutive prints, single-line string concatenations, and complex output blocks into triple-quoted multi-line string literals (''' or """) in Dart.

Apache-2.0Auto-check passedDevelopment

Install Dart Multiline Strings

skills CLI
$ npx skills add kevmoo/dash_skills --skill dart-multiline-strings -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install kevmoo/dash_skills dart-multiline-strings --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/kevmoo/dash_skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/dart-multiline-strings .claude/skills/dart-multiline-strings && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
dart-multiline-strings
GitHub stars
147
Token cost
~1.5k tokens
SKILL.md length
571 words
Files
2
Skills in repo
12
Repo updated
First seen
Licence
Apache-2.0

At a glance

Guidelines and best practices for refactoring consecutive prints, single-line string concatenations, and complex output blocks into triple-quoted multi-line string literals (''' or """) in Dart.

  • Works in 3 steps: When to use this skill → Guidelines → Examples
  • Tasks that involve Refactoring
  • SKILL.md covers 1. When to use this skill, Discovery, 2. Guidelines and 3. Examples
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Dart Multiline Strings is an agent skill from kevmoo/dash_skills. Guidelines and best practices for refactoring consecutive prints, single-line string concatenations, and complex output blocks into triple-quoted multi-line string literals (''' or """) in Dart.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `evals/evals.json`).

It sits in Development, covering Refactoring and Cross-platform mobile apps. It works with Dart. The repository describes itself as: Agent Skills for Dart and Flutter ecosytem. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Refactoring
  • Tasks that involve Cross-platform mobile apps

Example prompts

  • “Use the dart-multiline-strings skill to guideline and best practices for refactoring consecutive prints, single-line string concatenations, and…”
  • “/dart-multiline-strings”

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. When to use this skill
  2. Guidelines
  3. Examples

What it can do on your machine

Read from SKILL.md and the folder at commit d3439fb. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are dart).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Dart Multiline Strings loads about 1.5k tokens when it runs. Until then it costs about 54 tokens; SKILL.md has 571 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~54
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from kevmoo/dash_skills at commit d3439fb, republished under its Apache-2.0 licence (© kevmoo). 571 words, ~1,459 tokens.

Download SKILL.mdSave it as .claude/skills/dart-multiline-strings/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
dart-multiline-strings
description
Guidelines and best practices for refactoring consecutive prints, single-line string concatenations, and complex output blocks into triple-quoted multi-line string literals (''' or """) in Dart.
license
Apache-2.0
key_features
Triple-quoted multiline strings, Print & concatenation refactoring, Formatting large text blocks

Dart Multi-line Strings

1. When to use this skill

Use this skill when:

  • Refactoring consecutive print() or stdout.writeln() statements into a single, cohesive output block.
  • Simplifying string literals that span multiple lines, contain embedded newlines (\n), or use nested indentations.
  • Formatting large user-facing text output (like CLI help menus, reports, or templated messages) to be readable, maintainable, and performant.
When NOT to use (Abstention Guardrails)

Do NOT refactor to multiline strings when:

  • Short, Single-Line Outputs: Strings that comfortably fit on a single line (<80 chars) without embedded newlines.
  • Localized String Catalogs: Strings that are looked up from localization bundles (e.g. intl, ARB files), where line breaks or formatting must conform to external translation tooling.
  • Raw Query Strings with Strict Whitespace Semantics: Protocol strings, strict CSV rows, or queries where indentation whitespace inside triple quotes would alter payload semantics or introduce unintended leading spaces.
  • Streaming or Incremental I/O: Progress bars, spinners, or interactive console streams where individual writes occur with delays or flushing between lines.

Discovery

To find candidate code blocks for multi-line string refactoring:

  • Look for multiple back-to-back print() or stdout.writeln() calls inside a function, especially inside loops, console views, or CLI controllers.
  • Look for single-line strings heavily loaded with \n escape sequences.
  • Look for multiple string concatenations using the + operator or adjacent string literal splits that are meant to represent multi-line outputs.

2. Guidelines

Combine Consecutive Outputs

Instead of calling print() repeatedly for a multi-line output, group the contents into a single triple-quoted string literal: print('''...''').

Explicit and Clean Alignment

In a triple-quoted literal, the exact spacing and formatting inside the quotes are preserved. Use this to specify indentation levels visually instead of using manually padded space prefixes (e.g., ' ').

Remove Empty Print Calls

If there are empty print() or print('') statements serving as vertical separators between output segments, replace them by letting the trailing newline of a multi-line string block handle the separation naturally.

Handling the First Newline

If the opening triple-quote is immediately followed by a newline, the compiler discards it.

  • If you do not want a leading blank line, start the string content on a fresh line in the source code for clean layout.
  • If you do want a leading blank line in the output, leave an extra empty line inside the triple-quoted block, or use \n explicitly at the beginning:
    dart
    print('''
    
    This starts with one blank line above it.''');
Show full SKILL.md (216 more words)Show less
Handling the Trailing Newline & print()

print() automatically appends a trailing newline to the printed output.

  • If you place the closing ''' on a new line (\n''');), an extra trailing blank line will be printed.
  • To avoid unintended trailing blank lines, place the closing triple-quotes immediately after the final character:
    dart
    // ✅ Emits standard output with no extra trailing empty line:
    print('''
    Header
    Content''');
Avoiding Ghost Blank Lines in Conditional Interpolations

When injecting optional content via interpolation (${condition ? '...' : ''}), placing the ${...} on its own line leaves behind its enclosing newline when the condition evaluates to '', producing an empty blank line in the output.

  • Include the leading newline inside the conditional string literal so the newline only renders when the content is present:
    dart
    // ✅ Clean conditional rendering without ghost blank lines:
    print('''
    Branch Details:
        Name: $branch${hasWarning ? '\n    WARNING: $warningMessage' : ''}''');
80-Character Line Limit Exemption

The lines_longer_than_80_chars lint rule automatically ignores lines inside multiline string literals. You can write long lines inside triple-quotes without triggering linter warnings or being forced to break them up.

Dynamic Switch Expressions inside Interpolation

Leverage Dart 3 switch expressions directly inside string interpolations to dynamically select and inject optional lines, conditional labels, or helper instructions. This avoids cluttering the surrounding code with imperatively constructed strings or multiple if statements:

dart
print('''
Status: ${status.isSuccess ? 'PASS' : 'FAIL'}${switch (status) {
  Status.failed => '\nError details: $errorMessage',
  _ => '',
}}''');

3. Examples

Refactoring Consecutive Prints with Indentation

Avoid:

dart
void printGerritView(String branch, String desc, bool hasConflicts) {
  print('Branch Details:');
  print('    Name:        ' + branch);
  print('    Description: ' + desc);
  print('');
  if (hasConflicts) {
    print('    WARNING: This branch has conflicts.');
    print('    Run `git merge origin/main` to resolve.');
  }
}

Prefer:

dart
void printGerritView(String branch, String desc, bool hasConflicts) {
  print('''
Branch Details:
    Name:        $branch
    Description: $desc${hasConflicts ? '''

    WARNING: This branch has conflicts.
    Run `git merge origin/main` to resolve.''' : ''}''');
}

© kevmoo, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/dart-multiline-strings of kevmoo/dash_skills.

  • SKILL.md
  • evals/evals.json

Open the folder on GitHubat commit d3439fb

Compare with similar skills

Dart Multiline Strings next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Dart Multiline Strings compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dart Multiline Strings this skillkevmoo/dash_skills147—~1.5kAutomated safety check: PassApache-2.0
Code Guidelinesgetsentry/sentry-dart873—~2.2kAutomated safety check: PassMIT
Dart 3 Updatesevanca/flutter-ai-rules649—~2kAutomated safety check: PassMIT
Effective Dartevanca/flutter-ai-rules649—~2kAutomated safety check: PassMIT
Test Guidelinesgetsentry/sentry-dart873—~3.1kAutomated safety check: PassMIT
Squadron Workerd-markey/squadron138—~1.6kAutomated safety check: PassMIT

Similar skills

  • Code Guidelines

    getsentry/sentry-dart

    Official

    Enforce Sentry Dart/Flutter SDK code guidelines for implementation, refactoring, and review.

    873 GitHub stars~2.2k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Dart 3 Updates

    evanca/flutter-ai-rules

    A skill your agent uses when writing switch statements, refactoring if-else chains, creating data classes, choosing records vs classes, destructuring values, or modernizing pre-Dart-3 code.

    649 GitHub stars~2k tokensUpdated 24 days ago
    DevelopmentAuto-check passed
  • Effective Dart

    evanca/flutter-ai-rules

    A skill your agent uses when writing Dart code, reviewing for style, refactoring naming, adding doc comments, structuring imports, or enforcing type annotations.

    649 GitHub stars~2k tokensUpdated 24 days ago
    DevelopmentAuto-check passed
  • Test Guidelines

    getsentry/sentry-dart

    Official

    Enforce Sentry Dart/Flutter SDK test conventions for naming, structure, and fixtures.

    873 GitHub stars~3.1k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Squadron Worker

    d-markey/squadron

    A skill your agent uses when building, writing, or refactoring Squadron workers, worker pools, worker services, or using squadronbuilder annotations (@SquadronService, @SquadronMethod) for…

    138 GitHub stars~1.6k tokensUpdated 16 days ago
    MobileAuto-check passed
  • Liquid Glass Widgets

    sdegenaar/liquid_glass_widgets

    Mastery guide and architectural rules for liquidglasswidgets.

    712 GitHub stars~3.8k tokensUpdated yesterday
    MobileAuto-check passed

More from kevmoo/dash_skills

All 12 skills in this repo
  • Dart Test Coverage

    kevmoo/dash_skills

    Understand and improve test coverage in a Dart package. An agent skill from kevmoo/dash_skills.

    147 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Profile Dart Code

    kevmoo/dash_skills

    Profile Dart command-line applications using the VM Service protocol to capture CPU samples and identify performance bottlenecks.

    147 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Dart Best Practices

    kevmoo/dash_skills

    General best practices for Dart development. An agent skill from kevmoo/dash_skills.

    147 GitHub stars~709 tokensUpdated yesterday
    Auto-check passed
  • Dart Doc Validation

    kevmoo/dash_skills

    Best practices for validating Dart documentation comments. An agent skill from kevmoo/dash_skills.

    147 GitHub stars~822 tokensUpdated yesterday
    Auto-check passed
  • Dart Long Lines

    kevmoo/dash_skills

    Guidelines for handling long lines in Dart code to adhere to the 80-column rule.

    147 GitHub stars~1k tokensUpdated yesterday
    Auto-check passed
  • Dart Matcher Best Practices

    kevmoo/dash_skills

    Best practices for using expect and package:matcher. An agent skill from kevmoo/dash_skills.

    147 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Dart Multiline Strings

What does Dart Multiline Strings do?

Guidelines and best practices for refactoring consecutive prints, single-line string concatenations, and complex output blocks into triple-quoted multi-line string literals (''' or """) in Dart. Dart Multiline Strings is an agent skill from kevmoo/dash_skills. Guidelines and best practices for refactoring consecutive prints, single-line string concatenations, and complex output blocks into triple-quoted multi-line string literals (''' or """) in Dart.

When should I use Dart Multiline Strings?

Dart Multiline Strings fits situations like: tasks that involve Refactoring; tasks that involve Cross-platform mobile apps.

How do I install Dart Multiline Strings in Claude Code?

Run `npx skills add kevmoo/dash_skills --skill dart-multiline-strings -a claude-code`. Or copy the skill folder (skills/dart-multiline-strings in kevmoo/dash_skills) into .claude/skills/dart-multiline-strings in your project. Claude Code loads it when a task matches its description.

How do I install Dart Multiline Strings in Codex?

Run `npx skills add kevmoo/dash_skills --skill dart-multiline-strings -a codex`. Or copy the skill folder (skills/dart-multiline-strings in kevmoo/dash_skills) into .agents/skills/dart-multiline-strings in your project. Codex loads it when a task matches its description.

Can I use Dart Multiline Strings in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add kevmoo/dash_skills --skill dart-multiline-strings -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dart-multiline-strings, .gemini/skills/dart-multiline-strings, .github/skills/dart-multiline-strings and .opencode/skills/dart-multiline-strings in your project.

What does Dart Multiline Strings need to run?

SKILL.md names no scripts, command-line tools or credentials: Dart Multiline Strings is instructions for the agent only.

Does Dart Multiline Strings access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Dart Multiline Strings safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Dart Multiline Strings use?

Dart Multiline Strings is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Dart Multiline Strings use?

About 1.5k tokens (SKILL.md is roughly 5.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Dart Multiline Strings?

Skills that share tags, products or a category with Dart Multiline Strings: Code Guidelines (getsentry/sentry-dart, 873 stars), Dart 3 Updates (evanca/flutter-ai-rules, 649 stars), Effective Dart (evanca/flutter-ai-rules, 649 stars) and Test Guidelines (getsentry/sentry-dart, 873 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Dart Multiline Strings?

kevmoo (a GitHub user) maintains it in kevmoo/dash_skills, which has 147 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 8, 2026.

Source: kevmoo/dash_skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.