Skip to content

docs-tools

v0.0.19

Documentation review, writing, and workflow tools for Red Hat AsciiDoc and Markdown documentation.

Tip

Always run Claude Code from a terminal in the root of the documentation repository you are working on. The docs-tools commands and agents operate on the current working directory, they read local files, check git branches, and write output relative to the repo root.

Prerequisites

  • Install the Red Hat Docs Agent Tools marketplace

  • Install software dependencies

  • Create an ~/.env file with your tokens:

    JIRA_AUTH_TOKEN=your_jira_api_token
    # Required for Atlassian Cloud authentication
    JIRA_EMAIL=you@redhat.com
    # Optional: defaults to https://redhat.atlassian.net if not set
    JIRA_URL=https://redhat.atlassian.net
    # Required scopes: "repo" for private repos, "public_repo" for public repos
    GITHUB_TOKEN=your_github_pat
    # Required scope: "api"
    GITLAB_TOKEN=your_gitlab_pat
    
  • Add the following to the end of your ~/.bashrc (Linux) or ~/.zshrc (macOS):

    if [ -f ~/.env ]; then
        set -a
        source ~/.env
        set +a
    fi
    

    Restart your terminal and Claude Code for changes to take effect.

Customizing the docs workflow

The docs orchestrator (/docs-tools:docs-orchestrator) runs a YAML-defined step list. You can customize it per-repo without modifying the plugin.

Override the workflow steps

The orchestrator looks for workflow YAML in this order:

  1. .claude/docs-<name>.yaml — if --workflow <name> is passed
  2. .claude/docs-workflow.yaml — project-level default
  3. Plugin default — skills/docs-orchestrator/defaults/docs-workflow.yaml

To customize, download the default into your docs repo and edit it:

mkdir -p .claude
curl -sL https://raw.githubusercontent.com/redhat-documentation/redhat-docs-agent-tools/main/plugins/docs-tools/skills/docs-orchestrator/defaults/docs-workflow.yaml \
   -o .claude/docs-workflow.yaml

Then modify .claude/docs-workflow.yaml to add, remove, or reorder steps:

workflow:
  name: docs-workflow
  steps:
    - name: requirements
      skill: docs-tools:docs-workflow-requirements
      description: Analyze documentation requirements

    - name: planning
      skill: docs-tools:docs-workflow-planning
      inputs: [requirements]

    # Add a custom step using a local skill
    - name: sme-review
      skill: my-review-skill
      description: Domain-specific review by SME checklist
      inputs: [writing]

    # Remove or skip steps by deleting them from the list

Supplement with local skills

You can reference local standalone skills (from .claude/skills/) alongside plugin skills in your workflow YAML. Create a local skill in your docs repo:

.claude/skills/my-review-skill/SKILL.md

Then reference it by its standalone name in the step list:

- name: sme-review
  skill: my-review-skill
  description: Run team-specific review checklist
  inputs: [writing]

Local standalone skills use short names (e.g., my-review-skill), while plugin skills use fully qualified names (e.g., docs-tools:docs-workflow-writing). Both can coexist in the same workflow YAML.

Conditional steps

Use the when field to make steps run only when a CLI flag is passed:

- name: create-jira
  skill: docs-tools:docs-workflow-create-jira
  when: create_jira_project
  inputs: [planning]

This step only runs when --create-jira <PROJECT> is passed to the orchestrator.

Multiple workflow variants

Use --workflow <name> to maintain different workflows for different purposes:

# Uses .claude/docs-quick.yaml
/docs-tools:docs-orchestrator PROJ-123 --workflow quick

# Uses .claude/docs-full.yaml
/docs-tools:docs-orchestrator PROJ-123 --workflow full

Using the docs orchestrator in CI/CD

The docs orchestrator can run in GitHub Actions or GitLab CI using Claude Code in the CLI. This lets you automate documentation workflows — for example, generating draft docs from a JIRA ticket when a PR is opened, or running style and technical reviews on documentation changes.

Prerequisites

Your CI environment needs:

  • Claude Code installed (npm install -g @anthropic-ai/claude-code)
  • API key set as ANTHROPIC_API_KEY secret
  • JIRA token set as JIRA_AUTH_TOKEN secret (and JIRA_EMAIL for Atlassian Cloud)
  • Python 3 with required packages (see Prerequisites)
  • The docs-tools plugin installed or available in the runner

How it works

The CI pattern has two phases:

  1. Phase 1 — JIRA ready check: The docs-tools:docs-workflow-jira-ready skill queries JIRA for tickets matching a JQL filter, excludes tickets that already have a workflow progress file or tracking label, and returns a JSON list of actionable ticket IDs.
  2. Phase 2 — Orchestrator loop: For each ready ticket, run the docs-tools:docs-orchestrator skill to execute the full documentation workflow.

All invocations go through claude -p (headless mode) so the plugin system resolves script paths via CLAUDE_PLUGIN_ROOT. No local checkout of the tools repo is needed — only the plugin installed in Claude Code.

GitHub Actions example

name: Docs Workflow
on:
  schedule:
    - cron: '0 8 * * 1-5'  # Weekdays at 8am
  workflow_dispatch: {}

env:
  DOCS_JQL: "project=PROJ AND labels=docs-needed AND labels != docs-workflow-started"

jobs:
  check:
    runs-on: ubuntu-latest
    outputs:
      tickets: ${{ steps.check.outputs.tickets }}
    steps:
      - uses: actions/checkout@v4

      - name: Install dependencies
        run: |
          npm install -g @anthropic-ai/claude-code
          python3 -m pip install PyGithub python-gitlab jira pyyaml ratelimit requests beautifulsoup4 html2text

      - name: Check for ready tickets
        id: check
        env:
          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
          JIRA_AUTH_TOKEN: ${{ secrets.JIRA_AUTH_TOKEN }}
          JIRA_EMAIL: ${{ secrets.JIRA_EMAIL }}
        run: |
          RESULT=$(claude -p "Skill: docs-tools:docs-workflow-jira-ready, args: \"--jql '${{ env.DOCS_JQL }}' --add-label\"")
          echo "tickets=$(echo "$RESULT" | jq -c '.ready')" >> "$GITHUB_OUTPUT"

  run-workflow:
    needs: check
    if: needs.check.outputs.tickets != '[]'
    runs-on: ubuntu-latest
    strategy:
      matrix:
        ticket: ${{ fromJson(needs.check.outputs.tickets) }}
      max-parallel: 2
    steps:
      - uses: actions/checkout@v4

      - name: Install dependencies
        run: |
          npm install -g @anthropic-ai/claude-code
          python3 -m pip install python-pptx PyGithub python-gitlab jira pyyaml ratelimit requests beautifulsoup4 html2text

      - name: Run docs orchestrator
        env:
          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
          JIRA_AUTH_TOKEN: ${{ secrets.JIRA_AUTH_TOKEN }}
          JIRA_EMAIL: ${{ secrets.JIRA_EMAIL }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          claude -p "Skill: docs-tools:docs-orchestrator, args: \"${{ matrix.ticket }} --draft\""

      - name: Upload artifacts
        uses: actions/upload-artifact@v4
        with:
          name: docs-${{ matrix.ticket }}
          path: .claude/docs/

This uses a matrix strategy to parallelize orchestrator runs across tickets. The check job queries JIRA and passes ready ticket IDs to run-workflow via fromJson.

GitLab CI example

docs-check-tickets:
  stage: docs
  image: node:20
  rules:
    - if: $CI_PIPELINE_SOURCE == "schedule"
    - when: manual
  before_script:
    - npm install -g @anthropic-ai/claude-code
    - apt-get update && apt-get install -y python3 python3-pip jq
    - python3 -m pip install PyGithub python-gitlab jira pyyaml ratelimit requests beautifulsoup4 html2text
  script:
    - |
      RESULT=$(claude -p "Skill: docs-tools:docs-workflow-jira-ready, args: \"--jql 'project=PROJ AND labels=docs-needed' --add-label\"")
      TICKETS=$(echo "$RESULT" | jq -r '.ready[]' 2>/dev/null || true)
      if [ -z "$TICKETS" ]; then
        echo "No tickets ready for docs workflow."
        exit 0
      fi
      for TICKET in $TICKETS; do
        echo "=== Starting workflow for $TICKET ==="
        claude -p "Skill: docs-tools:docs-orchestrator, args: \"$TICKET --draft\"" \
          2>&1 | tee -a .work/cron-runs/$(date +%Y%m%d-%H%M%S)-${TICKET}.log
      done
  artifacts:
    paths:
      - .claude/docs/
      - .work/cron-runs/
    expire_in: 1 week

Set ANTHROPIC_API_KEY, JIRA_AUTH_TOKEN, JIRA_EMAIL, and any Git platform tokens as CI/CD variables (masked/protected).

Tips for CI usage

  • Use --draft to write output to .claude/docs/ staging area instead of modifying repo files directly
  • Use --add-label in the JIRA ready check to prevent re-processing tickets on the next run
  • Use --workflow to select a CI-specific workflow variant (e.g., a lighter review-only pipeline)
  • Collect the .claude/docs/ directory as an artifact for downstream review or PR creation
  • The orchestrator writes a progress JSON file, so failed runs can be resumed in a subsequent job if the artifact is restored
  • For PR-triggered workflows, pass --pr $CI_MERGE_REQUEST_URL or --pr $GITHUB_PR_URL to include the PR context in requirements analysis

Install

/plugin install docs-tools@redhat-docs-agent-tools

Update

/plugin marketplace update redhat-docs-agent-tools

Commands

docs-review

/docs-tools:docs-review [--local | --pr <url> [--post-comments] | --action-comments [url]] [--threshold <0-100>]

Multi-agent documentation review with confidence scoring — local, PR/MR, or action comments

docs-technical-review

/docs-tools:docs-technical-review --docs <source> [--docs <source>...] [--code URL] [--jira TICKET] [--pr URL] [--gdoc URL] [--fix]

Validate documentation technical accuracy against code repositories — detects stale commands, flags, APIs, config keys, code examples, and file paths. Use when asked to check if docs match the code, verify examples, find outdated references, or run a technical review.

docs-workflow

/docs-tools:docs-workflow [action] <ticket> [--pr <url>] [--create-jira <PROJECT>] [--mkdocs] [--draft]

Run the multi-stage documentation workflow for a JIRA ticket. Orchestrates agents sequentially — requirements analysis, planning, writing, technical review, and style review

Agents

Agent Description
docs-planner Use PROACTIVELY when planning documentation structure, performing gap analysis, or creating documentation plans. Analyzes requirements, applies JTBD framework, and creates comprehensive documentation plans. MUST BE USED for any documentation planning or content architecture task.
docs-reviewer Use PROACTIVELY when reviewing documentation for style guide compliance. Uses Vale linting and 18 style guide review skills (IBM Style Guide + Red Hat SSG) to review AsciiDoc files, edit in place, and generate review reports. MUST BE USED for any style review or documentation quality check.
docs-writer Use PROACTIVELY when writing or drafting documentation. Creates complete CONCEPT, PROCEDURE, REFERENCE, and ASSEMBLY modules in AsciiDoc (default) or Material for MkDocs Markdown format. MUST BE USED for any documentation writing, drafting, or content creation task.
requirements-analyst Use PROACTIVELY when analyzing JIRA tickets, PRs, or engineering specs for documentation requirements. Parses JIRA issues, PRs, Google Docs, and engineering specs to extract documentation requirements and map them to modular documentation modules. Uses web search to expand research with external sources. MUST BE USED for any requirements analysis or documentation scoping task.
technical-reviewer Use PROACTIVELY when reviewing documentation for technical accuracy. Reads docs as a developer or architect consumer to catch issues that style-focused review misses — broken code examples, missing prerequisites, incorrect commands, false architectural claims, and absent failure paths. MUST BE USED for technical review of procedures, API docs, tutorials, operator guides, and conceptual overviews.

Skills

Skill Description
article-extractor Download HTML from websites and extract article content, removing HTML bloat. Specifically designed to extract content from
tags with aria-live="polite" attribute. Outputs clean, readable content for documentation sites like Red Hat docs.
docs-convert-gdoc-md Read a Google Docs document, Google Slides presentation, or Google Sheets spreadsheet and output as Markdown or CSV. Use this skill when asked to read, fetch, import, or convert a Google Doc, Google Slides, or Google Sheets URL.
docs-orchestrator Documentation workflow orchestrator. Reads the step list from .claude/docs-workflow.yaml (or the plugin default). Runs steps sequentially, manages progress state, handles iteration and confirmation gates. Claude is the orchestrator — the YAML is a step list, not a workflow engine.
docs-review-content-quality Review documentation for content quality — logical flow, user journey alignment, scannability, conciseness, fluff removal, and customer focus. Use this skill whenever someone asks to check if docs are well-organized, too wordy, have unnecessary content, lack logical flow, or need tightening. Also use for content quality peer reviews, minimalism checks, or when asked to "cut the fluff" or "make it more concise.
docs-review-modular-docs Review AsciiDoc (.adoc) files for Red Hat modular documentation compliance — module types (concept, procedure, reference), assembly structure, anchor IDs, context variables, leveloffset, and include directives. Use this skill whenever someone asks about modular docs, checks .adoc file structure, asks if a module is the right type, needs to verify anchor IDs have _{context}, or reviews assemblies. Also triggers for questions about concept vs procedure vs reference modules, prerequisites formatting, or Red Hat doc structure.
docs-workflow-create-jira Create a linked JIRA ticket for documentation work. No agent dispatch. Uses direct JIRA REST API calls via a shell script. Checks for existing links, handles public/private project visibility, converts markdown to JIRA wiki markup.
docs-workflow-jira-ready Check whether a JIRA query returns tickets ready for the docs workflow. Queries JIRA via jira_reader.py, filters out tickets that already have a workflow progress file or a "docs-workflow-started" label, and outputs a JSON list of actionable ticket IDs. Designed as the entry point for cron-triggered or CI-triggered docs-orchestrator runs.
docs-workflow-planning Create a documentation plan from requirements analysis output. Dispatches the docs-planner agent. Invoked by the orchestrator.
docs-workflow-prepare-branch Create a fresh git branch from the latest upstream default branch before writing documentation. Only runs in UPDATE-IN-PLACE mode (no --draft flag). Skipped in draft mode.
docs-workflow-requirements Analyze documentation requirements for a JIRA ticket. Dispatches the requirements-analyst agent. Invoked by the orchestrator.
docs-workflow-style-review Style guide compliance review of documentation drafts. Dispatches the docs-reviewer agent with Vale linting and 18+ style guide review skills.
docs-workflow-tech-review Technical accuracy review of documentation drafts. Dispatches the technical-reviewer agent. Output includes confidence rating (HIGH/MEDIUM/LOW) Iteration logic is owned by the orchestrator, not this skill.
docs-workflow-writing Write documentation from a documentation plan. Dispatches the docs-writer agent. Supports AsciiDoc (default) and MkDocs formats. Default placement is UPDATE-IN-PLACE; use --draft for staging area. Also supports fix mode for applying technical review corrections.
git-pr-reader Unified interface for GitHub PRs and GitLab MRs: read PR/MR data with file filtering, list changed files, get review comments, post inline review comments, extract line numbers from diffs, validate comments, auto-detect PR/MR for current branch, and get unified diffs. Automatically detects GitHub vs GitLab from URL. Use this skill for analyzing code changes, posting review feedback, and documentation workflows.
ibm-sg-audience-and-medium Review documentation for IBM Style Guide audience and medium issues — accessibility (alt text, color, headings), global audience readiness (idioms, date formats, cultural references), tone (active voice, no "please" or "simply"), AI assistant style, marketing claims, and mobile/video content. Use this skill when reviewing docs for accessibility, internationalization, tone problems, or audience appropriateness. For Red Hat docs, prefer the rh-ssg-accessibility skill for accessibility-specific checks.
ibm-sg-language-and-grammar Review documentation for IBM Style Guide language and grammar — abbreviations/acronyms, capitalization, active voice, inclusive language (master/slave, blacklist/whitelist, gendered pronouns), contractions, anthropomorphism, and preferred terminology (avoid "utilize," "leverage," "via," "in order to," "please"). Use this skill when checking grammar, word choice, inclusive language, or terminology compliance. For Red Hat docs, the rh-ssg-grammar-and-language skill takes precedence on conscious language and contractions.
ibm-sg-legal-information Review documentation for IBM Style Guide legal issues — unsubstantiated claims, superlatives, trademarks (™/® usage), copyright notices, personal information (PII in examples), and republishing/attribution of external content. Use this skill when checking for legal risks, trademark compliance, PII exposure in examples, unsupported marketing claims, or content attribution issues. For Red Hat docs, the rh-ssg-legal-and-support skill takes precedence on Technology Preview and Developer Preview.
ibm-sg-numbers-and-measurement Review documentation for IBM Style Guide number and measurement formatting — numerals vs. spelled-out numbers, commas in large numbers, currency codes (USD/EUR), date formats, 24-hour time, units of measurement (KB/MB/GB with spaces), IEC binary prefixes (KiB/MiB/GiB), and phone numbers. Use this skill when checking number formatting, date/time consistency, unit abbreviations, or measurement conventions in documentation.
ibm-sg-punctuation Review documentation for IBM Style Guide punctuation — serial/Oxford commas, colons before lists, em dashes vs. en dashes vs. hyphens, compound adjective hyphenation, quotation marks (US style), semicolon avoidance, ellipses, exclamation points, parentheses, slashes ("and/or"), and period consistency in lists. Use this skill when checking punctuation, hyphenation, comma usage, dash types, or list punctuation consistency.
ibm-sg-references Review documentation for IBM Style Guide reference issues — citations, footnotes, geographic locations, product and service names (official capitalization, trademark usage), product version formatting ("version 4.12 and later" not "recent versions"), and name/title conventions. Use this skill when checking product names, version references, citation formatting, geographic references, or footnote usage in documentation.
ibm-sg-structure-and-format Review documentation for IBM Style Guide structure and format — headings (sentence case, no gerunds), lists (parallel structure, lead-in sentences), procedures (imperative verbs, one action per step, max 9 steps), tables (headers, alignment, captions), notes/warnings/tips, bold/monospace/italic formatting, and figures with alt text. Use this skill when checking doc structure, heading style, list formatting, procedure steps, table layout, or emphasis conventions. For Red Hat docs, the rh-ssg-structure and rh-ssg-formatting skills take precedence.
ibm-sg-technical-elements Review documentation for IBM Style Guide technical elements — code examples (language tags, realistic values, RFC 2606/5737 addresses), command-line formatting (prompts, line continuation), command syntax notation (, [optional], {choice1
jira-reader Read and analyze JIRA issues from Red Hat Issue Tracker. Use this skill to fetch issue details, search issues, extract comments and discussions, categorize issues (bugs, CVEs, features, stories), analyze custom fields (release notes, fix versions), retrieve Git links, traverse ticket graphs (parent, children, siblings, links), and generate summaries. This skill is read-only and cannot modify JIRA issues. Requires jira and ratelimit Python packages.
jira-writer Update and modify JIRA issues on Red Hat Issue Tracker. Use this skill to push release notes to JIRA issues, update custom fields (release note content, status), and modify issue properties. This skill performs write operations and will prompt for user approval before making changes. Requires jira and ratelimit Python packages. Only use when explicitly asked to update or modify JIRA issues.
redhat-docs-toc Extract distinct article URLs from Red Hat documentation table of contents pages. Parse the TOC navigation to find all separate documentation articles. Useful for crawling and processing multi-page Red Hat documentation.
rh-ssg-accessibility Review Red Hat documentation for accessibility compliance (WCAG) — alt text for images/icons, color not as sole information carrier, no directional language ("left"/"right"/"above"), descriptive link text (no "click here"), table structure (no irregular headers, no blank header cells), and correct heading nesting. Use this skill whenever checking Red Hat docs for accessibility, screen reader compatibility, alt text, link text, or WCAG compliance. This skill takes precedence over ibm-sg-audience-and-medium for accessibility checks on Red Hat content.
rh-ssg-formatting Review Red Hat documentation for SSG formatting compliance — code blocks (one command per step, bold via subs="+quotes", separate input/output), user-replaced values (angle brackets, italics, underscores), sentence-style capitalization in titles, product name/version attributes (not hard-coded), date formats ("3 October 2019"), single-step procedures (bullet not number), non-breaking spaces in "Red Hat", and man page references. Use this skill when checking Red Hat docs for code block formatting, placeholder values, title capitalization, product name attributes, or date formats.
rh-ssg-grammar-and-language Review Red Hat documentation for SSG grammar and language compliance — conscious language (no blacklist/whitelist, no master/slave), no contractions in product docs, conversational style levels, minimalism principles (action-oriented, scannable, concise), animate vs. inanimate user pronouns (who vs. that), and homograph avoidance. Use this skill when checking Red Hat docs for inclusive/conscious language, contraction usage, minimalism, wordiness, or grammar compliance. This skill takes precedence over ibm-sg-language-and-grammar for Red Hat content.
rh-ssg-gui-and-links Review Red Hat documentation for SSG graphical interface and link compliance — UI element formatting (bold text, correct verbs: click/select/enter), screenshot guidelines, text entry ("enter" not "type"), cross-reference format (xref), external link rules (no bare URLs, no shorteners, descriptive link text), Red Hat docs links (use "latest" in URL path), and Knowledgebase article link formatting. Use this skill when checking Red Hat docs for UI element formatting, link text, cross-references, screenshot usage, or URL formatting. Takes precedence over ibm-sg-technical-elements for UI and link checks on Red Hat content.
rh-ssg-legal-and-support Review Red Hat documentation for SSG legal and support compliance — no cost/pricing references, no future release promises, Developer Preview requirements (IMPORTANT admonition, no "supported"), and Technology Preview requirements (IMPORTANT admonition, never "Tech Preview" or "Technical Preview", no "supported as a Technology Preview"). Use this skill when checking Red Hat docs for Technology Preview, Developer Preview, TP/DP admonitions, cost language, future release statements, or support scope compliance. Takes precedence over ibm-sg-legal-information for Red Hat content.
rh-ssg-release-notes Review Red Hat release notes for SSG compliance — tense rules (present default, past for "before this update"), informative headings (sentence case, no gerunds, under 120 chars), Jira references on known/fixed issues, AsciiDoc formatting (description lists, + attachment), and release note types: new features, enhancements, rebases (X.Y.Z format), Technology Preview entries, deprecated features, removed features, known issues (Cause > Consequence > Workaround > Result), and fixed issues (CCFR pattern). Use this skill whenever reviewing, writing, or checking release notes for any Red Hat product.
rh-ssg-structure Review Red Hat documentation for SSG structural compliance — admonitions (NOTE/IMPORTANT/WARNING/TIP only, no CAUTION, no clustering, modules never start with admonitions), lead-in sentences (only when needed after Prerequisites/Procedure headings), prerequisites (written as completed states not imperative commands), and short descriptions/abstracts (2-3 sentences, customer-centric, no self-referential language). Use this skill when checking Red Hat docs for admonition usage, prerequisite formatting, short descriptions, or structural compliance. Takes precedence over ibm-sg-structure-and-format for Red Hat content.
rh-ssg-technical-examples Review Red Hat documentation for SSG technical example compliance — root privilege commands (use sudo with $ prompt, not su -), YAML ellipses (use "# ..." not bare "..."), IP addresses (RFC 5737 for IPv4, RFC 3849 for IPv6), MAC addresses (RFC 7042), code block quality (accurate, copy-paste friendly), and syntax highlighting (never use "bash" for terminal commands — use "terminal", "console", or omit). Use this skill when checking Red Hat docs for code examples, IP/MAC addresses in examples, sudo usage, YAML formatting, or source language tags on code blocks. Takes precedence over ibm-sg-technical-elements for Red Hat content.