Catalog
Yeachan-Heo/diagram

Use the smallest visual when prose must carry structure—control flow, call depth, module ownership, or change shape: pseudocode, call tree, component/file tree, Mermaid diagram, or diff. Skip it when prose already answers the question.

v1.0LATEST
NewUpdated Sep 22, 2026

Diagrams are load-bearing, not decoration. Reach for one only when prose forces the reader to hold a whole shape in their head at once — then pick the smallest view that lets them see the shape instead of reconstructing it from sentences. Everything here renders in the conversation as text blocks or Mermaid; at most one artifact file is ever written.

The vocabulary

Pick one view; two at most. More is noise.

Pseudocode — logic without language noise. Reduces a decision to its branching shape:

on(request)
  if state file locked by another writer
    queue and return pending
  acquire lock
  write
  release

Call tree — runtime control flow. Depth shows who owns the flow; annotate where the interesting edge is:

acquireStateFileLockSync()
  resolveLockPath()
  openExclusive()
  writePid()

Component tree — UI or module structure, with the boundaries that matter annotated inline:

<SettingsPage> (src/routes/settings)
  <SessionList> (owns its fetches)
  <DangerZone>
    <ConfirmButton> (disabled until typed confirmation)

File tree — where responsibility lives; keep it shallow, one annotation per directory:

src/
├── hooks/        # hook registry + types
├── tools/        # MCP tool handlers
└── workflow/     # registry + projections

Mermaid — interaction between parties, dataflow, or state transitions:

sequenceDiagram
    participant CLI
    participant Hook
    participant State
    CLI->>Hook: PreToolUse
    Hook->>State: read mode
    Hook-->>CLI: allow / deny + facts

Diff — the shape of a change when the surrounding structure already exists. Match the diff to the topic:

a component change:

 <SettingsPage>
   <SessionList />
   <DangerZone>
+    <ConfirmButton />
   </DangerZone>

a file-layout change:

 src/tools/
-└── state-tools.ts
+└── state-tools/
+   ├── handlers.ts
+   └── schema.ts

a control-flow change:

 commit()
   stage()
     hashBlobs()
+  writeObject()
   updateRef()
+    acquireStateFileLock()

a state-machine change:

 on(request)
-  write immediately
+  if locked
+    queue and return pending
+  acquire lock
+  write
+  release

The whole block — when elision would hide who owns what or the order things run in, show the complete unit once, copyable:

export function isRegistryEnabled(): boolean {
  const flag = process.env.OMC_WORKFLOW_REGISTRY;
  return flag !== '0' && flag !== 'false';
}

When text runs out

A UI layout, a before/after comparison, or a concept too dense for Mermaid: write one focused HTML file — a diagram, an infographic, or a few slides — styled after the product's own colors, type, and components, filled with real labels and data, working on desktop and mobile. Open it with the platform opener (start on Windows, open on macOS, xdg-open on Linux) and stop there: one artifact, not a gallery.

Discipline

  • Place each visual directly beside the two or three sentences it supports.
  • Carry only the calls, files, props, states, and boundaries that answer the current question — every extra node is a decoding tax on the reader.
  • If the honest answer fits in one sentence, write the sentence.
Files1
1 files · 1.0 KB

Select a file to preview

Overall Score

87/100

Grade

A

Excellent

Grades are signals, not a certification. Always review a skill yourself before use.

Safety

90

Quality

88

Clarity

92

Completeness

78

Summary

This skill teaches agents when and how to use minimal diagrams to convey structure that prose alone cannot effectively communicate. It provides a vocabulary of diagram types (pseudocode, call trees, component/file trees, Mermaid, diffs) with specific guidance on which to use for different scenarios, emphasizing that diagrams should be load-bearing and concise rather than decorative.

Static Analysis Findings

1 finding

Patterns detected by deterministic static analysis before AI scoring. Hover over any finding code for detailed information and remediation guidance.

Credential Exposure
SEC-020Direct .env File Access

Direct .env file access

SKILL.md.env

Detected Capabilities

file readmarkdown generationmermaid diagram renderinghtml file writeplatform command execution (start/open/xdg-open)

Trigger Keywords

Phrases that agents use to match this skill to user intent.

visualize control flowexplain code structurediagram state machinecomponent hierarchyshow call treearchitecture diagrambefore/after code change

Risk Signals

INFO

Direct .env file access — reference to process.env in code example

SKILL.md, pseudocode block (isRegistryEnabled function)

Use Cases

  • Explain control flow or call stacks concisely
  • Visualize component or module hierarchies
  • Show state transitions or interactions between services
  • Document file organization and responsibility boundaries
  • Illustrate before/after changes in code structure
  • Present UI layout decisions with annotations

Quality Notes

  • Excellent scope clarity: skill is narrowly focused on when and how to choose diagram types, not on creating diagrams themselves
  • Strong pedagogical structure with clear vocabulary section and discipline rules
  • Well-grounded in practical examples: each diagram type includes a concrete use case and sample rendering
  • The SEC-020 finding (process.env reference) is benign — it appears only as a copyable example to illustrate pseudocode, not as an instruction to access secrets. The example actually demonstrates a common safe pattern for checking feature flags
  • Clear discipline section that reinforces constraints and prevents scope creep
  • Minor: HTML artifact instructions assume agent has platform opener capability, but this is reasonable given the skill's context
Model: claude-haiku-4-5-20251001Analyzed: Sep 22, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Use Yeachan-Heo/diagram in your dev environment

Command Palette

Search for a command to run...