Index of every page on this site: llms.txt
All skills
markdown-viewer avatar

/documd-visuals

@2672b69
by Markdown Viewermarkdown-viewer/skills3.4k stars
192
Run it yourself

Create text-driven visuals in Markdown: charts, diagrams, cards, architecture and page layouts. Charts and analytical views (bar, line, pie, heatmap, correlation, regression); reliability and operations (latency, incident, throughput, cycle time, OKR, standup, on-call); product and finance (funnel, retention, revenue, budget); process and workflow (approval, BPMN); software design and behaviour (class, state machine, sequence, C4); dependencies and impact (dependency graph, ER, causality); system architecture as HTML (layer stack, wings, zones, topology, service catalogue, request paths); infrastructure (cloud, Kubernetes, ETL, network, security, IAM, compliance); governance and people (ArchiMate, org chart, hiring); knowledge and planning (mind map, roadmap, Gantt, migration); documents (comparison, SWOT, memo, policy, catalogue, case study). Use when a document needs a diagram, chart or card. Figures render live. Not for slide decks or math notation. Not recommended: mermaid / canvas / drawio / dot.

Use this Skill: https://skilld.dev/gh/markdown-viewer/skills/documd-visuals

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

examplesorganization-and-rolesworkforce-seniority-pyramid.md

Population Pyramid — Workforce by Age Band and Track (Vega-Lite)

Best for: two mirrored distributions over shared ordered bands, where the asymmetry is the story Avoid when: the two halves are not the same kind of quantity, or the ordering is not meaningful Answers: where each track's workforce sits by age, and which bands are top-heavy

{
  "config": { "range": { "category": ["#2b66c4", "#2f9e44", "#f3a33c", "#d1242f", "#7048e8", "#0f9b9b", "#c16f8a", "#7c5a3d"] } },
  "$schema": "https://vega.github.io/schema/vega-lite/v6.json",
  "width": 420,
  "height": 260,
  "title": {"text": "Workforce by Age Band", "subtitle": "Engineering (left) and go-to-market (right), headcount", "anchor": "start"},
  "data": {
    "values": [
      {"band": "18–24", "eng": 42, "gtm": 12},
      {"band": "25–29", "eng": 118, "gtm": 34},
      {"band": "30–34", "eng": 156, "gtm": 58},
      {"band": "35–39", "eng": 131, "gtm": 71},
      {"band": "40–44", "eng": 88, "gtm": 63},
      {"band": "45–49", "eng": 54, "gtm": 47},
      {"band": "50+", "eng": 31, "gtm": 39}
    ]
  },
  "transform": [
    {"calculate": "-datum.eng", "as": "engNeg"}
  ],
  "layer": [
    {
      "mark": {"type": "bar", "color": "#2b66c4", "cornerRadius": 2, "height": 16},
      "encoding": {
        "y": {"field": "band", "type": "ordinal", "title": null},
        "x": {"field": "engNeg", "type": "quantitative", "title": "headcount", "axis": {"labelExpr": "abs(datum.value)"}}
      }
    },
    {
      "mark": {"type": "bar", "color": "#d1242f", "cornerRadius": 2, "height": 16},
      "encoding": {
        "y": {"field": "band", "type": "ordinal", "title": null},
        "x": {"field": "gtm", "type": "quantitative", "title": "headcount"}
      }
    }
  ]
}

Data Shape

One row per ordered band with one column per side. Enter the bands in reading order — the renderer disables automatic sorting, so the y-axis follows the order of rows in values.

Field Role
band Shared ordinal axis; list from youngest to oldest so the base of the pyramid sits at the bottom
eng Left side, negated by a calculate transform so bars grow left
gtm Right side, used as-is

Key Options

Option Effect
calculate: "-datum.eng" Mirroring is a data trick: negative bars on a shared scale
axis.labelExpr: "abs(datum.value)" Shows the absolute counts on the axis instead of the negative values
Two layers, shared scales Layer defaults share the x scale, so both sides measure the same headcount axis
height: 16 on the bars Leaves a gap between bands — a pyramid with touching bands reads as a solid shape
Explicit colours per layer Two sides, two hues; a colour legend would only restate the subtitle

Pitfalls

  • ❌ Two separate charts side by side → ✅ the pyramid's whole point is one shared axis, so the two sides are comparable at a glance
  • ❌ Negating the value in the data file → ✅ keep source values positive and mirror them in a transform, otherwise every downstream sum is wrong
  • ❌ Forgetting labelExpr → ✅ the axis will print negative numbers for one side
  • ❌ Unequal band widths → ✅ age bands must cover the same span or the silhouette lies about the distribution

Alternatives

Variant Use instead
Two values per category that changed between periods before-after-latency-gap.md
Composition of each band quarterly-share-normalized-stack.md
Distribution of one measure service-latency-density.md
<!-- source: Vega-Lite docs (calculate transform, axis.labelExpr, layered bar marks, shared scales) + the population-pyramid gallery entry -->

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts16d3 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    This skill provides documentation and examples for creating various visuals in Markdown using engines like ECharts, Vega, PlantUML, and HTML. It recommends using the vendor-owned @markdown-viewer/documd CLI tool for document conversion and verification. The skill itself contains no executable code or malicious patterns.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

Signed by skilld at 2672b69. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Activeupdated 3 weeks ago
Other metadata
compatibility
Figures are text in the Markdown — fenced blocks or bare HTML — and the host viewer renders them live: nothing to pre-render, build or install. Export to html / epub / docx / pdf is optional and needs Node 18+ and Chrome/Chromium, via `npx @markdown-viewer/documd`.

README badge

README badge for markdown-viewer/skills