원클릭으로
d2-validate
Validate D2 syntax in .d2 files or directories
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Validate D2 syntax in .d2 files or directories
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Use when checking Paperclip org health, reviewing agent efficiency, diagnosing token waste, verifying governance compliance, or before and after making org changes. Also use when agents seem idle or unproductive, costs spike, tasks stall, heartbeats fail silently, you see 409 conflicts, stale locks, blocked deadlocks, or suspect agents burning tokens with no progress.
This skill should be used when the user asks to "show dev-setup config", "change the worktrees directory", "update the port pattern", "configure dev-setup settings", or wants to view or update settings in .claude/dev-setup.json.
Generate dev server lifecycle scripts (start/stop/status/ports) from detected project structure
This skill should be used when the user asks to "create a worktree", "set up an isolated workspace", "create a branch for a feature", "start working on a new branch", or before executing an implementation plan that needs an isolated git workspace.
Scan a codebase and auto-generate relevant diagrams from its structure
Generate a D2 diagram from a text description
| name | d2-validate |
| description | Validate D2 syntax in .d2 files or directories |
| argument-hint | ["path"] |
| allowed-tools | Read, Bash, Glob |
User request: "$ARGUMENTS"
Validate D2 syntax in .d2 files or .md files containing D2 code blocks.
PLUGIN_DIR=$(find "$HOME/.claude/plugins/cache" -type d -name "d2" -path "*/skills/d2" 2>/dev/null | head -1)
[ -z "$PLUGIN_DIR" ] && PLUGIN_DIR=$(find "$HOME" -maxdepth 8 -type d -name "d2" -path "*/skills/d2" 2>/dev/null | head -1)
bash "$PLUGIN_DIR/scripts/ensure-deps.sh"
From $ARGUMENTS:
.d2 file → validate directly.md file → extract D2 blocks first with extract_d2.sh, then validate each.d2 files and .md files with D2 blocksFor .d2 files:
# Validate directly
d2 validate {file.d2}
For .md files:
# Extract D2 blocks to temp files
bash "$PLUGIN_DIR/scripts/extract_d2.sh" {file.md}
# Then validate each extracted temp file
d2 validate {temp_file}
For directories:
# Find all .d2 files
find {dir} -name "*.d2" -not -path "*/node_modules/*" -not -path "*/.git/*"
# Find .md files containing d2 blocks
grep -rl '```d2' {dir} --include="*.md" 2>/dev/null
For each file:
d2 validate {file} 2>&1
# Exit 0 = valid, non-zero = error
Track: filename, pass/fail, error message (if any).
Validated {N} diagrams:
✅ diagrams/architecture-services-20260310.d2
✅ diagrams/sequence-auth-flow-20260310.d2
❌ docs/design.md (block 2) — unexpected token at line 14: missing closing brace
If any failures:
{N} validation error(s) found.
See $PLUGIN_DIR/references/guides/troubleshooting.md for fixes.
If all pass:
All {N} diagrams valid ✅
D2 Validation Summary
─────────────────────
Path: {input_path}
Files checked: {N}
Passed: {N} Failed: {N}
{per-file results}
{troubleshooting hint if any failures}