jimezsa/opencolab/projects/SKILLS/block-diagram/SKILL.md
block-diagram
Generate accurate, readable D2 block diagrams for software, research, and system explanations from a text brief. Normalize components and edges, write a canonical .d2 source file, render compact sketch-style SVG and optional PNG artifacts by default, support optional LaTeX equation blocks when the diagram genuinely needs them, keep arrows unlabeled unless a label adds concrete meaning, and emit Telegram file directives when needed.
- Source repository stars
- 11
- Declared platforms
- 0
- Static risk flags
- 1
- Last source update
- 2026-08-04
- Source checked
- 2026-08-04
Decision brief
What it does—and where it fits
Use this skill when the user wants a block diagram that explains a system, model, pipeline, service, architecture, or workflow.
Not for
- Tasks that require unconfirmed production actions or broad system permissions.
- Environments where the pinned source and install steps cannot be inspected.
Compatibility matrix
Platform support, with evidence labels
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
Inspect first. Install second.
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/jimezsa/opencolab --skill "projects/SKILLS/block-diagram"Inspect the Agent Skill "block-diagram" from https://github.com/jimezsa/opencolab/blob/f647b8e4c37a18b4bd3443bd4a8f5470ea1b9d09/projects/SKILLS/block-diagram/SKILL.md at commit f647b8e4c37a18b4bd3443bd4a8f5470ea1b9d09. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
What the source asks the agent to do
- 01
Workflow
Translate the request into this internal structure before drawing:
titleaudiencediagram scope - 02
Mission
Given a textual architecture description:
Normalize it into components, groups, and directed relationships.Write a canonical diagrams/.d2 source file.Render diagrams/.svg. - 03
Prerequisites
d2 is installed and available in PATH.
d2 is installed and available in PATH.bash is available in PATH.The working directory is writable. - 04
Required Inputs
If the user does not provide an audience, assume engineer. If the user does not provide an output name, derive a short slug from the system name. If the user does not provide a render style, use sketch.
A system or architecture description.Optional audience: beginner, engineer, executive, paper figure, infra team, and so on.Optional must-include components, flows, or labels. - 05
Hard Requirements
Use this skill for block diagrams instead of defaulting to a free-form image model.
Use this skill for block diagrams instead of defaulting to a free-form image model.Treat the .d2 file as the canonical artifact and the rendered image as a derived artifact.Do not invent components, edges, protocols, or subsystems that were not implied by the request.
Permission review
Static risk signals and limitations
Runs scripts
The documentation asks the agent to run terminal commands or scripts.
bash projects/SKILLS/block-diagram/scripts/render_d2_diagram.sh \Evidence record
Why each signal appears
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 87/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 11 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Provenance and original SKILL.md
- Repository
- jimezsa/opencolab
- Skill path
- projects/SKILLS/block-diagram/SKILL.md
- Commit
- f647b8e4c37a18b4bd3443bd4a8f5470ea1b9d09
- License
- MIT
- Collected
- 2026-08-04
- Default branch
- main
View the original SKILL.md
Block Diagram Skill
Use this skill when the user wants a block diagram that explains a system, model, pipeline, service, architecture, or workflow.
This is the deterministic path for architecture visuals in OpenColab. The source of truth is a D2 file, not an image-generation prompt. The default rendered style is D2 sketch mode, which gives a hand-drawn look while keeping the diagram deterministic and editable. Diagrams should stay compact, and arrows should remain unlabeled unless the label carries specific technical meaning.
Mission
Given a textual architecture description:
- Normalize it into components, groups, and directed relationships.
- Write a canonical
diagrams/<slug>.d2source file. - Render
diagrams/<slug>.svg. - Render
diagrams/<slug>.pngwhen the user wants a raster image or when the result should be sent back to Telegram. - Return a short explanation of the diagram and any important assumptions.
Prerequisites
d2is installed and available inPATH.bashis available inPATH.- The working directory is writable.
Required Inputs
- A system or architecture description.
- Optional audience: beginner, engineer, executive, paper figure, infra team, and so on.
- Optional must-include components, flows, or labels.
- Optional must-include formulas or equations.
- Optional preferred output name.
- Optional render style:
sketchorclean.
If the user does not provide an audience, assume engineer.
If the user does not provide an output name, derive a short slug from the system name.
If the user does not provide a render style, use sketch.
Hard Requirements
- Use this skill for block diagrams instead of defaulting to a free-form image model.
- Treat the
.d2file as the canonical artifact and the rendered image as a derived artifact. - Do not invent components, edges, protocols, or subsystems that were not implied by the request.
- Support optional formula blocks with
equation: |latexonly when a mathematically important transformation, loss, or objective would be materially harder to understand without an explicit equation. - Do not generate a formula just because the request mentions math, a model, or an algorithm; include one only when the diagram would otherwise lose important meaning.
- If one ambiguity blocks a faithful diagram, ask one targeted question. Otherwise proceed autonomously.
- Keep the first diagram readable and compact. If the architecture is too dense, split it into an overview diagram plus one focused detail diagram.
- Use
references/style-guide.mdfor layout, color semantics, naming, and grouping rules. - Use
references/patterns.mdwhen selecting the diagram structure. - Use
ml-llm-architecture-template.mdas an optional template for detailed ML, LLM, neural-network, transformer, training, or quantization architecture diagrams. - Use
references/validation.mdbefore returning the final result. - Use
scripts/render_d2_diagram.shto format, validate, and render the final diagram. - Default to sketch-style rendering. Only switch to clean rendering when the user explicitly asks for a polished, paper-ready, or non-sketch output.
- Default to unlabeled arrows. Add edge labels only when they convey specific information such as a protocol, artifact, or payload that the arrow alone would not communicate.
- Never use generic edge labels such as
input,output,data,result,something input, orsomething output. - OpenColab normally provides
OPENCOLAB_PROGRESS_FILEduring provider runs. When it is set and the task is long enough to justify updates, emit bounded JSON progress events for normalization, draft completion, render start, warnings, blockers, or final artifact creation when they help the user understand real progress. - If the rendered artifact should be sent to Telegram, emit a raw
@telegram-file {"kind":"document","file":"diagrams/<slug>.svg","caption":"optional"}or@telegram-file {"kind":"photo","file":"diagrams/<slug>.png","caption":"optional"}line on its own line with no backticks or code fences. Keep the JSON on one line, use a validkind(photofor images, neverimage/png/jpg), and on Windows write the path with forward slashes. - If PNG rendering is unavailable in the current environment, fall back to the SVG artifact and send it as a Telegram document instead of pretending the PNG exists.
Workflow
1. Normalize the architecture
Translate the request into this internal structure before drawing:
- title
- audience
- diagram scope
- layout direction
- render style
- containers or subsystems
- blocks inside each container
- directed edges
- optional legend categories
- optional assumptions
If helpful, write this structure as scratch notes in your reasoning, but the final artifacts must be the .d2 file and rendered outputs.
2. Choose the diagram pattern
Pick one dominant pattern from references/patterns.md:
- pipeline
- layered system
- client-server
- event-driven or queue-based
- training/inference split
- overview plus detail split
Do not mix several patterns unless the system genuinely needs it.
3. Write the D2 source
Create diagrams/<slug>.d2.
Before writing, read:
references/style-guide.mdreferences/d2-quick-reference.md
Requirements for the D2 source:
- default to the smallest readable flow direction; use left-to-right for broad systems and top-down for long pipelines or repeated blocks when that keeps the canvas smaller
- keep labels short and concrete
- use containers for subsystems
- keep related nodes close and avoid stretched connections when a tighter readable layout is possible
- prefer unlabeled edges
- label only edges whose labels add concrete meaning
- never use filler labels like
input,output,data, orresult - preserve exact component names when the user cares about wording
- when a formula is truly necessary, represent it as a dedicated node with a short title and an
equation: |latexbody instead of cramming math into a normal label - let the renderer control sketch versus clean styling unless the request needs D2 source-level style overrides
4. Render the diagram
Run the canonical renderer:
bash projects/SKILLS/block-diagram/scripts/render_d2_diagram.sh \
--input diagrams/<slug>.d2 \
--svg diagrams/<slug>.svg \
--png diagrams/<slug>.png
Notes:
- The renderer formats and validates the D2 source before rendering.
- The default layout engine is
elk. - The default render style is
sketch. - The renderer uses compact spacing by default to reduce unnecessary whitespace and long connections.
- Use
--style cleanonly when the user explicitly asks for a polished, paper-style, or non-sketch diagram. - SVG is the default deliverable.
- PNG is optional, but recommended for Telegram delivery when raster export works in the current environment.
- If PNG rendering fails, keep the SVG, mention the limitation briefly, and return or send the SVG as a document.
5. Validate and revise once
Use references/validation.md.
If the diagram fails the checklist, revise the .d2 file once and rerender before replying.
6. Return the result
Return:
- the artifact paths
- a concise caption or explanation
- any assumptions that materially affected the diagram
If the request is for Telegram delivery, emit the raw @telegram-file directive after rendering.
Output Contract
diagrams/<slug>.d2diagrams/<slug>.svg- optional
diagrams/<slug>.png - a short explanation of what the diagram shows
Canonical Assets
- Skill doc:
projects/SKILLS/block-diagram/SKILL.md - Renderer:
projects/SKILLS/block-diagram/scripts/render_d2_diagram.sh - D2 quick reference:
projects/SKILLS/block-diagram/references/d2-quick-reference.md - Style guide:
projects/SKILLS/block-diagram/references/style-guide.md - Patterns:
projects/SKILLS/block-diagram/references/patterns.md - ML/LLM architecture template:
projects/SKILLS/block-diagram/ml-llm-architecture-template.md - Validation checklist:
projects/SKILLS/block-diagram/references/validation.md
Alternatives
Compare before choosing
alirezarezvani/claude-skills
app-store-optimization
App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist
wanshuiyin/Auto-claude-code-research-in-sleep
citation-audit
Use it for operations and research tasks; the detail page covers purpose, installation, and practical steps.
K-Dense-AI/scientific-agent-skills
dask
Distributed computing for larger-than-RAM pandas/NumPy workflows. Use when you need to scale existing pandas/NumPy code beyond memory or across clusters. Best for parallel file processing, distributed ML, integration with existing pandas code. For out-of-core analytics on single machine use vaex; for in-memory speed use polars.
K-Dense-AI/scientific-agent-skills
neurokit2
Use NeuroKit2 to build or audit reproducible research workflows for physiological time-series preprocessing, event/interval analysis, multimodal alignment, variability, and complexity. Trigger when code imports neurokit2 or needs its current APIs, schemas, and method-aware validation—not for diagnosis or device validation.