| name | plantuml-validate |
| description | Validate that all PlantUML diagram URLs in markdown files match their source blocks. Reports missing or stale URLs and offers auto-fix.
|
| compatibility | Requires Python 3.x |
PlantUML Validate
Validate that all PlantUML diagram URLs in markdown files are in sync with their source blocks.
Instructions
-
Find all .md files in the project that contain PlantUML code blocks:
grep -rl '```plantuml' . --include='*.md'
-
Run the validation check on all found files:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/plantuml-encode.py" --check <files>
CLAUDE_PLUGIN_ROOT is set automatically by Claude Code when running plugin commands.
-
Report results to the user:
- If all diagrams are in sync: confirm success with file count
- If mismatches found: list each issue with file, line number, and type (missing URL vs stale URL)
- Offer to auto-fix by running
--sync on affected files
-
If the user confirms auto-fix, run:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/plantuml-encode.py" --sync <affected-files>