marketplace/bundles/pm-documents/skills/ref-asciidoc/SKILL.md
AsciiDoc formatting, validation, link verification, and template creation workflows
npx skillsauth add cuioss/plan-marshall ref-asciidocInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Execution mode: Select workflow and execute immediately using documented script commands.
Prohibited actions:
Constraints:
python3 .plan/execute-script.py pm-documents:ref-asciidoc:asciidoc ...Standards and workflows for AsciiDoc formatting, validation, link verification, and document creation from templates.
Note: This skill covers AsciiDoc syntax and format. For content quality, tone, and review orchestration, use pm-documents:ref-documentation.
This skill provides five specialized workflows:
| Workflow | Purpose | Script Used |
|----------|---------|-------------|
| format-document | Auto-fix AsciiDoc formatting issues | pm-documents:ref-asciidoc:asciidoc format |
| validate-format | Validate AsciiDoc format compliance | pm-documents:ref-asciidoc:asciidoc validate |
| verify-links | Verify links and cross-references | pm-documents:ref-asciidoc:asciidoc verify-links |
| create-from-template | Create new document from template | Templates in templates/ |
| refresh-metadata | Update metadata and cross-references | Read + Edit |
Auto-fix common AsciiDoc formatting issues with safety features.
<<>> syntax to xref:target (required): File path or directory pathfix_types (optional, default: "all"): Types of fixes: "lists", "xref", "headers", "whitespace", "all"Step 1: Load Documentation Standards
Read references/asciidoc-formatting.md
Step 2: Discover Files
If target is a file:
.adoc extensionIf target is a directory, run the canonical manage-files discover resolver and capture the returned paths array as the discovered file list. Filter out any path under a target/ build directory afterwards.
python3 .plan/execute-script.py plan-marshall:manage-files:manage-files discover \
--root {directory} \
--glob "*.adoc" \
--include-files
Step 3: Run Auto-Formatter
Build command with options:
fix_types is "all": omit the -t flagfix_types is specific (e.g., "lists", "xref"): add -t {fix_type}python3 .plan/execute-script.py pm-documents:ref-asciidoc:asciidoc format [-t {fix_type}] --path {target}
Step 4: Parse Output
Extract statistics:
Step 5: Report Results
Format Fixes Applied to {target}
Files modified: {count}
Issues fixed: {count}
Changes applied: {list}
Step 6: Validation (after changes applied)
Run validation:
python3 .plan/execute-script.py pm-documents:ref-asciidoc:asciidoc validate --path {target}
Validate AsciiDoc files for format compliance.
target (required): File path or directory pathapply_fixes (optional, default: false): Apply automatic fixesStep 1: Load Documentation Standards
Read references/asciidoc-formatting.md
Step 2: Discover Files
If target is a file:
.adoc extensionIf target is a directory, run the canonical manage-files discover resolver and capture the returned paths array as the discovered file list.
python3 .plan/execute-script.py plan-marshall:manage-files:manage-files discover \
--root {directory} \
--glob "*.adoc" \
--include-files
Step 3: Run Format Validation
python3 .plan/execute-script.py pm-documents:ref-asciidoc:asciidoc validate --path {target}
Step 4: Parse Output
Extract warnings matching Line [0-9]+:
Step 5: Apply Fixes (if requested)
If apply_fixes=true:
Step 6: Re-Validate (if fixes applied)
Re-run validator and compare:
Step 7: Generate Report
## AsciiDoc Format Validation Complete
**Status**: PASS | WARNINGS | FAILURES
**Summary**: Validated {file_count} file(s)
**Metrics**:
- Files validated: {count}
- Format issues found: {count}
- Issues fixed: {count}
- Issues remaining: {count}
**Issues by Category**:
- Blank line after header: {count}
- Blank line before list: {count}
- Other format violations: {count}
**Details by File**:
### {file_1}
- Line {N}: {issue description}
- Status: Clean | Issues remaining
Verify all links and cross-references in AsciiDoc files.
target (required): File path or directory pathfix_links (optional, default: false): Fix broken linksStep 1: Load Documentation Standards
Read references/asciidoc-formatting.md
Step 2: Discover Files
If target is a file:
.adoc extensionIf target is a directory, run the canonical manage-files discover resolver and capture the returned paths array as the discovered file list.
python3 .plan/execute-script.py plan-marshall:manage-files:manage-files discover \
--root {directory} \
--glob "*.adoc" \
--include-files
Step 3: Setup Report Directory
mkdir -p target/asciidoc-link-verifier
Step 4: Run Link Verification
python3 .plan/execute-script.py pm-documents:ref-asciidoc:asciidoc verify-links --file {file_path} --report target/asciidoc-link-verifier/links.md
For directories:
python3 .plan/execute-script.py pm-documents:ref-asciidoc:asciidoc verify-links --directory {directory} --report target/asciidoc-link-verifier/links.md
Step 5: Parse Report
Read target/asciidoc-link-verifier/links.md and extract:
Step 6: Manual Verification (CRITICAL)
For each "broken" link reported:
realpath {relative_target_path}Step 7: Fix Internal Anchors (if approved)
For missing anchors:
[#anchor-id] before headerStep 8: Generate Report
## AsciiDoc Link Verification Complete
**Status**: PASS | WARNINGS | FAILURES
**Summary**: Verified links in {file_count} file(s)
**Metrics**:
- Files verified: {count}
- Broken file links: {count}
- Broken anchors: {count}
- Issues fixed: {count}
**Details by File**:
### {file_1}
- Line {N}: xref to {target} - {status}
- Line {N}: anchor <<{id}>> - {status}
Create new AsciiDoc documents from predefined templates.
type (required): standard|readme|guidename (required): Document name (used in title and filename)path (optional): Output path (default: inferred from type)Step 1: Validate Parameters
If type not in [standard, readme, guide]:
Error: "Invalid type. Use: standard, readme, guide"
If name is empty:
Error: "Name is required"
Step 2: Determine Output Path
If path not specified:
standard → standards/{name}.adoc
readme → {name}/README.adoc or README.adoc
guide → docs/{name}.adoc
Step 3: Load Template
Read template from templates/:
Step 4: Substitute Placeholders
Replace template placeholders:
{{TITLE}} → Formatted name{{PROJECT_NAME}} → Name{{GUIDE_TITLE}} → Formatted guide title{{DESCRIPTION}} → Empty (user fills in){{SHORT_DESCRIPTION}} → Empty (user fills in){{PURPOSE}} → Empty (user fills in)Step 5: Write File
Use Write tool to create file at output path.
Step 6: Validate Created File
Execute validate-format workflow on new file.
Step 7: Report Result
Document Created: {output_path}
Type: {type}
Status: Valid format
Next steps:
1. Edit {output_path} to fill in content
2. Run ref-asciidoc validate-format workflow on {output_path} to validate
Update metadata, fix cross-references, and refresh table of contents.
target (required): File or directoryStep 1: Discover Files
If target is a file: files = [target].
If target is a directory, run the canonical manage-files discover resolver and capture the returned paths array as the discovered file list (recursive ** pattern).
python3 .plan/execute-script.py plan-marshall:manage-files:manage-files discover \
--root {target} \
--glob "**/*.adoc" \
--include-files
Step 2: Analyze Metadata
For each file:
Step 3: Analyze Cross-References
Execute verify-links workflow
Collect: broken internal references
Step 4: Fix Cross-References
For each broken reference:
Step 5: Update Metadata
Using Edit tool:
Step 6: Generate Report
Metadata Refresh Complete
Files processed: {count}
Updates Applied:
- Metadata fixed: {count}
- Cross-references fixed: {count}
- Headers updated: {count}
Manual Review Needed:
- {file}: {reason}
All reference material is in the references/ directory:
| Reference | Purpose | When to Load |
|-----------|---------|--------------|
| asciidoc-formatting.md | AsciiDoc format rules | Format/validation workflows |
| readme-structure.md | README structure patterns | README files |
All workflow procedures are in the workflow/ directory:
| Workflow | Purpose | When to Load |
|----------|---------|--------------|
| link-verification.md | Link verification protocol with manual Read verification | Link workflows |
Script: pm-documents:ref-asciidoc → asciidoc.py
| Subcommand | Description |
|------------|-------------|
| stats | Generate documentation statistics |
| validate | Validate AsciiDoc files for compliance |
| format | Auto-fix AsciiDoc formatting issues |
| verify-links | Verify links and cross-references |
| classify-links | Classify broken links to reduce false positives |
Usage Examples:
# Generate statistics
python3 .plan/execute-script.py pm-documents:ref-asciidoc:asciidoc stats -f json --directory /path/to/docs
# Validate formatting
python3 .plan/execute-script.py pm-documents:ref-asciidoc:asciidoc validate --path /path/to/file.adoc
# Format files
python3 .plan/execute-script.py pm-documents:ref-asciidoc:asciidoc format -t all --path /path/to/docs
# Verify links
python3 .plan/execute-script.py pm-documents:ref-asciidoc:asciidoc verify-links --directory /path/to/docs
The canonical argparse surface for asciidoc.py. The plugin-doctor analyzer (_analyze_manage_invocation.py) reads this section as source-of-truth for the manage-invocation-invalid and missing-canonical-block rules. Consuming docs xref this section by name instead of restating the command inline. See pm-plugin-development:plugin-script-architecture cross-skill-integration.md § "Script invocation in documentation". Long flags are shown; several subcommands additionally accept short aliases (-f, -d, -i, -t, -b).
python3 .plan/execute-script.py pm-documents:ref-asciidoc:asciidoc stats \
[--directory DIRECTORY] [--format {console,json}] [--details]
python3 .plan/execute-script.py pm-documents:ref-asciidoc:asciidoc validate \
[--path PATH] [--format {console,json}] [--ignore IGNORE_PATTERNS]
python3 .plan/execute-script.py pm-documents:ref-asciidoc:asciidoc format \
[--path PATH] [--type {all,lists,xref,whitespace}] [--no-backup]
python3 .plan/execute-script.py pm-documents:ref-asciidoc:asciidoc verify-links \
[--file FILE] [--directory DIRECTORY] [--recursive] [--report REPORT]
python3 .plan/execute-script.py pm-documents:ref-asciidoc:asciidoc classify-links \
[--input INPUT] [--output OUTPUT] [--pretty]
testing
A test skill for README generation
testing
A test skill with existing references
tools
Skill without references directory
development
Test skill with table-format references