diagram-generation
- Repo stars 19,426
- Author updated Live
- Author repo opik
- Domain
- AI
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 88 / 100 · community maintained
- Author / version / license
- @comet-ml · no license declared
- Token usage
- Lean
- Setup complexity
- Plug-and-play
- External API key
- Not required
- Operating systems
- Unspecified (assume cross-platform)
- Runtime requirements
- No special requirements
- Permissions
-
- Read-only
- Write / modify
- Network behavior
- Local-only
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: diagram-generation
description: Generate self-contained HTML architecture diagrams. Use when creating visual diagrams for PRs, t…
category: ai
runtime: no special runtime
---
# diagram-generation output preview
## PART A: Task fit
- Use case: Generate self-contained HTML architecture diagrams. Use when creating visual diagrams for PRs, task plans, or architectural explanations. Generate self-contained HTML diagrams that visualize code changes, data flows, and architecture decisions. runs entirely locally. Works with Claude Code, Cursor, Cline and 23 more..
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “When to Use / Output / How to Generate” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “Generate self-contained HTML architecture diagrams. Use when creating visual diagrams for PRs, task plans, or architectural explanations. Generate self-contained HTML diagrams that visualize code changes, data flows, and architecture decisions. runs entirely locally. Works with Claude Code, Cursor, Cline and 23 more.”.
- **02** When the source has headings, the agent prioritizes “When to Use / Output / How to Generate” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files; mostly runs locally; usually needs no extra API key.
## Running Rules
- read files, write/modify files; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source does not require a stable slash command. After installation, invoke the skill by name and describe the task.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files.
Start with a small task and check whether the result follows “When to Use / Output / How to Generate”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: diagram-generation
description: Generate self-contained HTML architecture diagrams. Use when creating visual diagrams for PRs, t…
category: ai
source: comet-ml/opik
---
# diagram-generation
## When to use
- Generate self-contained HTML architecture diagrams. Use when creating visual diagrams for PRs, task plans, or architec…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “When to Use / Output / How to Generate” and keep inference separate from source facts.
- read files, write/modify files; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "diagram-generation" {
input -> user goal + target files + boundaries + acceptance criteria
context -> When to Use / Output / How to Generate
rules -> SKILL.md triggers / order / output contract
runtime -> no special runtime | read files, write/modify files | mostly runs locally
guardrails -> usually needs no extra API key + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} Diagram Generation
Generate self-contained HTML diagrams that visualize code changes, data flows, and architecture decisions.
When to Use
- Visualizing PR changes for code review
- Explaining architectural decisions
- Documenting data/request flows
- Illustrating before/after comparisons
Output
- Self-contained HTML file at
{MAIN_REPO_ROOT}/diagrams/opik-{TICKET_NUMBER}-diagram.html— always resolved against the main repo root (viagit rev-parse --git-common-dir), even when the session runs inside a worktree, so the file outlives the worktree - Includes "Copy as image" button for sharing in Slack, Jira, PR descriptions
- Dark GitHub theme, semantic color coding, responsive layout
How to Generate
Follow the style guide in style-guide.md and use the HTML template in template.md.
Required Sections (pick what applies)
- Request / Data Flow — how data moves through layers
- Why This Approach — problem vs solution comparison
- Files Changed by Layer — grid of affected files grouped by component
- Key Design Decisions — numbered guards, trade-offs, or constraints
Section Selection
- Bug fix: Focus on before/after flow, root cause, safety guards
- New feature: Focus on data flow, architecture, files changed
- Refactor: Focus on before/after architecture, files changed
- Cross-component: Show all layers with connecting flows
Reference Files
- style-guide.md — Semantic colors, box themes, section labels, flow patterns, architecture trees
- template.md — Base HTML structure, copy-as-image script, section recipes
Common Gotchas
- SRI hash on CDN scripts: The html2canvas
<script>tag must includeintegrityandcrossoriginattributes — see template.md for the current hash - Absolute paths for Playwright screenshots: Playwright saves relative to its own CWD, not the repo root — always use absolute paths when calling
browser_take_screenshot - Max 4 sections: More than 4 sections makes diagrams too tall for screenshots and hard to scan visually
- No raw diff content: Diagrams show high-level summaries (component names, file names, flow descriptions) — never embed verbatim diff hunks or Jira comments
toBlobcan return null: The CanvastoBlobcall in the copy-as-image script needs a null check — see template.md
Decide Fit First
Design Intent
How To Use It
Boundaries And Review