Markdown graphs

From edmundmiller/dotfiles · View interactive version

Markdown graphs is an AI agent skill from the GitHub repository edmundmiller/dotfiles. Design and implement text-forward technical diagrams embedded in MDX using semantic HTML, CSS grids, ASCII-inspired typography, and SVG paths or motion. Use for article diagrams, process loops, comparison tables, formula illustrations, or terminal-style explanatory graphics; not for ordinary data ch

How to use this skill

Skill file

Markdown Graphs

Treat “markdown graph” as shorthand for a custom visual component used inside

MDX. It is not a native Markdown graph format. Preserve the user's publishing

medium: when the target only accepts plain Markdown, produce a static SVG or

image, or use Mermaid when portability matters more than art direction.

Design the Explanation

  1. Reduce the visual to one claim, comparison, sequence, or relationship.
  2. Choose the smallest topology that explains it: table, nested geometry,

left-to-right transformation, or loop.

  1. Write the labels and values before drawing connectors.
  2. Lay out the content on a strict character-like or 8px grid.
  3. Add decoration only when it clarifies grouping, direction, or state.

If the message needs a paragraph to explain the diagram, simplify the diagram

before adding more structure.

Choose the Rendering Primitive

| Content | Preferred primitive | Why |

| --------------------------------------------- | -------------------------------------- | ----------------------------------------------- |

| Rows and columns | Semantic HTML <table> | Keeps data accessible and responsive |

| Text that should linearize exactly | <pre> with styled spans | Preserves a character-cell composition |

| Labels, formulas, and simple comparisons | CSS Grid | Keeps live text easy to align and wrap |

| Connectors, nested geometry, or precise paths | Inline SVG | Gives exact, responsive geometry |

| Moving tracers or chips | SVG path plus CSS or <animateMotion> | Reuses the explanatory path as the motion track |

Prefer live HTML text with an aria-hidden SVG connector layer when practical.

Do not reach for Mermaid by default: its auto-layout is useful for portable

architecture documentation, but it works against this deliberately composed

visual language.

Apply the Visual Grammar

Use the project's existing typography and color tokens first. When the project

has no established system, these sampled values are a useful starting point,

not canonical values:

--graph-bg: #11110f;
--graph-ink: #c9c5bb;
--graph-muted: #343632;
--graph-accent: #3296f9;

stack fits the reference style.

vibrant accent.

should explain where to look.

tracking.

arrow glyphs. Keep the frame visibly weaker than the content.

cell in the grid.

and unnecessary rounded containers.

Add Motion Only to Explain

Treat motion as optional. Add it only when the user requests it, the provided

reference includes it, or the deliverable is explicitly an explanatory

animation. When motion is in scope, animate sequence, direction, propagation,

or a state change. Keep the labels and base structure still.

For a moving wire highlight, draw the path twice: a complete muted base and a

short accent segment above it. Normalize the path with pathLength="1" and

animate stroke-dashoffset:

.trace {
  stroke: var(--graph-accent);
  stroke-dasharray: 0.08 0.92;
  animation: graph-travel 4s linear infinite;
}

@keyframes graph-travel {
  to {
    stroke-dashoffset: -1;
  }
}

Use SVG <animateMotion> with <mpath> when a glyph or numbered chip must

follow an existing path. Use linear motion for constant traversal and a strong

ease-in-out curve for deliberate movement between states.

in the delivered component rather than leaving it as follow-up advice.

Implement for MDX

Keep the article invocation small and the component reusable at the frame and

token level. Do not force unrelated diagrams into one universal schema.

import { PromptLoop } from "@/components/PromptLoop";

<PromptLoop />

crisp lines.

through the frame behind it.

<figcaption> that states its takeaway.

video only for channels that require a static asset.

Verify the Result

Before calling the diagram complete, confirm:

component preview.

Primary References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.