AgentStack
SKILL verified Apache-2.0 Self-run

Dita Line Break

skill-abhatt-rh-redhat-docs-agent-tools-dita-line-break · by abhatt-rh

Remove hard line breaks from AsciiDoc files for DITA compatibility. Use this skill when asked to fix line breaks, remove forced breaks, or prepare files for DITA conversion.

No reviews yet
0 installs
0 views
view→install

Install

$ agentstack add skill-abhatt-rh-redhat-docs-agent-tools-dita-line-break

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Dita Line Break? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Line break removal skill

Remove hard line breaks from AsciiDoc files for DITA compatibility.

Overview

This skill uses the line_break.rb Ruby script to find and remove hard line breaks that are not supported in DITA. Hard line breaks in AsciiDoc can be created using:

  1. A space followed by + at the end of a line ( +)
  2. The :hardbreaks-option: document attribute
  3. The %hardbreaks option on blocks
  4. The options=hardbreaks attribute

What it removes

Line continuation markers

Before:

This is the first line +
and this continues on a new line.

After:

This is the first line and this continues on a new line.

Document-level hardbreaks attribute

Before:

:hardbreaks-option:

This text has
forced line breaks
everywhere.

After:

This text has forced line breaks everywhere.

Block-level hardbreaks option

Before:

[%hardbreaks]
First line
Second line
Third line

After:

First line
Second line
Third line

Why this matters

Hard line breaks cannot be mapped to DITA output. The AsciiDocDITA Vale rule LineBreak.yml warns:

> Hard line breaks are not supported in DITA.

Usage

When the user asks to fix line breaks:

  1. Identify the target folder or file containing AsciiDoc content
  2. Find all .adoc files in the target location
  3. Run the Ruby script against each file:

``bash ruby ${CLAUDE_SKILL_DIR}/scripts/line_break.rb ``

  1. Report the number of line breaks removed

Dry run mode

To preview changes without modifying files:

ruby ${CLAUDE_SKILL_DIR}/scripts/line_break.rb  --dry-run

Output to different file

ruby ${CLAUDE_SKILL_DIR}/scripts/line_break.rb  -o 

Process all files in a directory

find  -name "*.adoc" -exec ruby ${CLAUDE_SKILL_DIR}/scripts/line_break.rb {} \;

Example invocations

  • "Fix line breaks in modules/"
  • "Remove hard line breaks from the getting_started folder"
  • "Remove all + line continuations"
  • "Preview line break changes in modules/ --dry-run"

Behavior notes

  • Joins lines: When removing + at end of line, the following line is joined with a space
  • Removes attribute: The :hardbreaks-option: attribute line is removed entirely
  • Removes block option: The %hardbreaks option is removed from block attribute lists
  • Skips code blocks: Line breaks inside code blocks (---- or ....) are not modified
  • Skips comments: Line breaks inside comment blocks (////) are not modified

Output format

: Removed N hard line break(s)

Or:

: No hard line breaks found

Extension location

The Ruby script is located at: ${CLAUDE_SKILL_DIR}/scripts/line_break.rb

Related Vale rule

This skill addresses the warning from: .vale/styles/AsciiDocDITA/LineBreak.yml

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.