← 返回
效率工具 中文

PRD Visualization Skill

Creates interactive D3.js hierarchy visualizations with multiple view modes (List, Force-Directed, Radial Cluster, with Fractal Tree coming soon). Use when u...
创建交互式 D3.js 层级可视化,支持多种视图模式(列表、力导向、星形聚类,分形树即将推出)。在需要时使用。
foyri
效率工具 clawhub v1.0.0 1 版本 99892.4 Key: 无需
★ 1
Stars
📥 908
下载
💾 29
安装
1
版本
#latest

概述

Hierarchy Visualizer v1.0.0

Interactive multi-view visualization for hierarchical data using D3.js.

When to Use This Skill

Use when the user wants to visualize their PRD, project requirements, or any hierarchical data. The visualizer reads from a JSON file and renders it as an interactive diagram.

Agent Instructions

Step 1: Find or create the PRD JSON file

If user has a PRD in Markdown/text format:

Convert it to hierarchical JSON format. Read the PRD file and create a JSON structure with:

  • Root node = Project/PRD title
  • Children = Sections, features, requirements
  • Status = todo/processing/problem/done (infer from context or default to "todo")

If user already has a JSON file:

Use that file directly (check for prd.json, requirements.json, hierarchy.json)

Step 2: Copy visualizer to project folder

# Copy visualizer files to user's project
cp hierarchy-visualizer.html d3.min.js /path/to/user/project/

# Save the JSON as requirements-hierarchy.json
cat > /path/to/user/project/requirements-hierarchy.json << 'EOF'
{paste the JSON here}
EOF

# Start server from their project folder
cd /path/to/user/project && python3 -m http.server 8080

Step 3: Open in browser

http://localhost:8080/hierarchy-visualizer.html

Maintenance (IMPORTANT)

Always keep the prd json file updated in the whole project development process, everytime a requirement/specification/feature is added, updated, status changed, or deleted, update the json file accordingly.

Data Format

Convert PRD content to this JSON structure:

{
  "id": "root",
  "title": "Product Requirements",
  "status": "processing",
  "children": [
    {
      "id": "auth",
      "title": "Authentication",
      "status": "done",
      "children": []
    }
  ]
}

Required fields:

  • id — unique identifier (string)
  • title — display name (string)
  • status — one of: todo, processing, problem, done
  • children — array of child nodes (empty array for leaves)

Optional fields: type, domain, stage, owning_sig, granularity, complexity, source_url, goals

View Modes

  • List — Collapsible hierarchical list (default)
  • Force-Directed — Draggable node-link diagram
  • Radial Cluster — Circular dendrogram

> Note: Fractal Tree view is currently under development and will be available in a future release. Stay tuned for updates!

Controls

  • View switcher — Top-left dropdown
  • Zoom/Pan — Scroll wheel, click-drag
  • Collapse/Expand — Click nodes or L1/L2/L3 buttons
  • Status filter — Click Todo/Proc/Prob/Done labels
  • Theme toggle — Sun/moon icon (top-right)
  • Auto-sync — JSON updates every 5 seconds

Status Colors

  • Todo: Gray #8b949e
  • Processing: Yellow #e3b341
  • Problem: Orange #ffa657
  • Done: Green #238636

Troubleshooting

Blank visualization? → Use local HTTP server, not file://

JSON not loading? → Check that requirements-hierarchy.json exists in the same folder as the HTML file

Need custom styling? → Edit CSS variables in hierarchy-visualizer.html (~line 78)

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 19:39 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 440 📥 148,184
productivity

Nano Pdf

steipete
使用nano-pdf CLI通过自然语言指令编辑PDF
★ 275 📥 114,973
productivity

Weather

steipete
获取当前天气和预报(无需API密钥)
★ 446 📥 226,470