---
name: visual-explanation
description: Explains how something works with the smallest visual that answers the question, such as a sequence diagram, a call tree, a file tree, or a marked-up screenshot, placed beside the sentence it supports. Use when someone asks to be shown how a system, a flow, or a change works, or when the answer would otherwise take paragraphs of prose.
license: MIT
title: visual-explanation
canonical_url: https://skilld.dev/gh/onmax/comark-ui/visual-explanation
last_updated: 2026-11-01T16:01:06.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [agents/openai.yaml](https://skilld.dev/api/skills-raw/onmax/comark-ui/visual-explanation/agents/openai.yaml), [references/blocks.md](https://skilld.dev/api/skills-raw/onmax/comark-ui/visual-explanation/references/blocks.md), [references/example.md](https://skilld.dev/api/skills-raw/onmax/comark-ui/visual-explanation/references/example.md).
>
> If the user asked to install this Skill, run `npx skilld install onmax/comark-ui/visual-explanation`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/visual-explanation`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/onmax/comark-ui/visual-explanation) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/visual-explanation`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/visual-explanation --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/visual-explanation --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Visual explanation

A good explanation answers one question with one picture the reader can check against the code. Prose carries the reasoning, and the visual carries the shape: what happens in what order, what calls what, what lives where. Each visual stands next to the sentence that tells the reader what to look for.

## 1. Name the question

Write the question in one sentence, in the reader's words: "What happens between `parseMarkdown` and the HTML?" If it's two questions, answer the one they asked and offer the other.

Done when the question fits on one line.

## 2. Pick the view

Choose by the shape of the answer:

| The answer is… | Draw |
| --- | --- |
| The order of events between parts | A `mermaid` sequence diagram or flowchart |
| Who calls whom | A call tree in a `text` fence, indented by call depth |
| Where code lives, or which files a change touches | `::file-tree`, with `+`, `-`, and `~` marks |
| The states something moves between | A `mermaid` `stateDiagram-v2` |
| Something on screen | `::screenshot` with measured marks |
| What a few lines do, line by line | A code fence with `// <1>` notes |
| How a number changed | `::chart` or a two-row table |

Use one primary view. Add a second only when it answers the question the first one raises, such as "where is that in my code?" after a flow diagram. [references/blocks.md](https://skilld.dev/api/skills-raw/onmax/comark-ui/visual-explanation/references/blocks.md) has the syntax of each.

Done when you can say, in one sentence, what the reader will see in the view.

## 3. Draw it from the source

Read the code, the product, or the data before you draw. Every box, arrow, file, and label in the view is something the reader can find: a real function name, a real file path, a state the code really has. Leave out the parts that don't bear on the question; a diagram of everything answers nothing.

Keep a diagram to about eight nodes or participants. Past that, split it by stage or zoom into the part the question is about.

Done when every label in the view exists in the source, and nothing in it is there only for completeness.

## 4. Write around it

[references/example.md](https://skilld.dev/api/skills-raw/onmax/comark-ui/visual-explanation/references/example.md) shows the shape:

1. A title that is the question, or its answer.
2. Two or three sentences with the answer in plain words, ending on what to look at in the view.
3. The view.
4. One or two sentences for what the view can't show, such as a rule that applies at every step.
5. A second view only if step 2 allowed one, with a sentence before it saying why it's there.

Done when the explanation reads top to bottom in under a minute and every visual has a sentence beside it.

## 5. Check the render

1. Lint it, and fix until it reports no problems:

   ```sh
   vp dlx --package comark-linter --package comark-ui comark-lint explanation.md
   ```

   These commands use the [global Vite+ CLI](https://viteplus.dev/guide/global-cli). Without it, `pnpm dlx` takes the same arguments.

2. Open the rendered page where it will be read and look at each view at the width the reader has. A diagram whose labels are too small to read needs fewer nodes, not a wider page.

Done when you've looked at the render and every label reads at its size.
