AgentStack
SKILL verified Apache-2.0 Self-run

Dita Add Shortdesc Abstract

skill-abhatt-rh-redhat-docs-agent-tools-dita-add-shortdesc-abstract · by abhatt-rh

Add missing [role="_abstract"] attribute to AsciiDoc files for DITA short description support. Use this skill when asked to add abstract role attributes, mark short descriptions, 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-add-shortdesc-abstract

✓ 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 Add Shortdesc Abstract? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Add short description abstract role

Add missing [role="_abstract"] attributes to AsciiDoc files for DITA compatibility.

Overview

This skill uses the short_description.rb Ruby script to find AsciiDoc files missing the [role="_abstract"] attribute and automatically adds it before the first paragraph after the document title.

The short description is the first paragraph and cannot be more than a single paragraph.

What it does

For a file like this:

:_mod-docs-content-type: CONCEPT
[id="about-optimization_{context}"]
= About optimization

As AI applications mature and new compression algorithms are published...

More content here...

The script adds the missing abstract role:

:_mod-docs-content-type: CONCEPT
[id="about-optimization_{context}"]
= About optimization

[role="_abstract"]
As AI applications mature and new compression algorithms are published...

More content here...

Why this matters

The [role="_abstract"] attribute marks a paragraph as the short description (`) element in DITA output. This is required by the AsciiDocDITA Vale rule ShortDescription.yml` which warns:

> Assign [role="_abstract"] to a paragraph to use it as `` in DITA.

Usage

When the user asks to add abstract role to files:

  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/short_description.rb ``

  1. Report which files were updated

Process all files in a directory

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

Example invocations

  • "Add abstract role to files in modules/"
  • "Add [role="_abstract"] to all AsciiDoc files"
  • "Mark short descriptions in the getting_started folder"
  • "Preview abstract changes in modules/ --dry-run"

Behavior notes

  • Skips assembly files: Files with :_mod-docs-content-type: ASSEMBLY are skipped (assemblies use a different structure)
  • Skips snippet files: Files with :_mod-docs-content-type: SNIPPET are skipped
  • Skips files with existing abstracts: If [role="_abstract"] already exists, no changes are made
  • Finds first paragraph: The script locates the first regular paragraph after the title, skipping:
  • Empty lines
  • Attribute definitions
  • Attribute lists
  • Conditionals (ifdef/ifndef/endif)
  • Section headings
  • List items
  • Include directives
  • Admonition blocks

Output format

When an abstract is added:

: Added [role="_abstract"] before line N

When no changes needed:

: Abstract already exists

Or:

: Assembly or snippet file (skipped)

Or:

: No document title found

Or:

: No paragraph found after title

Script location

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

Related skills

  • dita-rewrite-shortdesc: For rewriting or improving existing short descriptions
  • dita-asciidoc-rewrite: For comprehensive DITA issue fixing including short descriptions

Related Vale rule

This skill addresses the warning from: .vale/styles/AsciiDocDITA/ShortDescription.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.