agentsclimarketplace

Mermaid mode fragility

Skill fabioc-aloha/Alex_Skill_Mall/plugins/documentation/mermaid-mode-fragility

284 curated plugins for AI assistants across 16 categories: security, Azure, documentation, code quality, cloud infrastructure, and more. Works with GitHub Copilot. Drop into .github/skills/local/ and go.

Install
npx -y skills add fabioc-aloha/Alex_Skill_Mall --skill mermaid-mode-fragility

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Mermaid diagram mode fragility — timeline, gitGraph, and gantt break on colons, default to flowchart

SKILL.md

3.4 KB, as published. Nobody here has run it

Mermaid Mode Fragility

Category: Documentation Time Saved: 30-60 minutes debugging silent render failures Battle-tested: Yes — multiple diagram types failed in production


The Problem

You write a Mermaid diagram in your docs. The syntax is valid. The diagram renders locally. You push it live and... blank space. Or worse, corrupted output. No error message.

Why It Happens

Several Mermaid diagram modes have undocumented constraints around colons (:) and other characters. They fail silently or produce garbage output.

The Fragile Modes

1. Timeline Mode

Uses : as time/event separator. Breaks on HH:MM times.

timeline
  title Project Timeline
  2024-01 : Project kickoff
  2024-02 : Design complete
  10:30 : Daily standup    ← BREAKS: colon in time value

2. GitGraph Mode

Long linear chains with colon-bearing quoted tags fail to render.

gitGraph
  commit id: "feat: initial"
  commit id: "feat: add login"
  commit id: "fix: security"
  ... 10+ more commits ...    ← BREAKS: long chains with colons
  commit id: "chore: release"

3. Gantt Mode

dateFormat HH:mm mis-parses task lines with times.

gantt
  dateFormat HH:mm
  title Daily Schedule
  Meeting : 09:00, 1h         ← BREAKS: colon in description
  Standup : 10:30, 30m

The Rule

Default to flowchart for any diagram with arbitrary text labels.

Flowchart (TB/LR/TD) is the only Mermaid mode that reliably survives complex content:

flowchart TB
  A[09:00 Meeting] --> B[10:30 Standup]
  B --> C[14:00 Review]

Safe vs Fragile Modes

ModeStatusConstraint
flowchart✅ SafeNone — handles any content
sequenceDiagram✅ SafeStandard message format
classDiagram✅ SafeStandard notation
stateDiagram⚠️ CautionColons in state names
erDiagram✅ SafeStandard notation
timeline❌ FragileNo colons in events
gitGraph❌ FragileShort chains only
gantt❌ FragileNo HH:MM in dateFormat
journey⚠️ CautionScore format sensitive

Flowchart Alternatives

Instead of Timeline

flowchart LR
  A[Jan: Kickoff] --> B[Feb: Design] --> C[Mar: Build]

Instead of GitGraph

flowchart TB
  A[main] --> B[feat/login]
  B --> C[feat/auth]
  C --> D[release/1.0]

Instead of Gantt

flowchart TB
  subgraph Morning
    A[09:00 Meeting]
    B[10:30 Standup]
  end
  subgraph Afternoon
    C[14:00 Review]
    D[16:00 Deploy]
  end

Debugging Silent Failures

  1. Check browser console — Mermaid sometimes logs parse errors
  2. Simplify content — Remove colons, special chars
  3. Test incrementally — Add nodes one at a time
  4. Try flowchart — If it works in flowchart, the mode is the problem

Verification Checklist

  • Does diagram contain colons in text?
  • Using a fragile mode (timeline, gitGraph, gantt)?
  • Test in Mermaid Live Editor before committing
  • Consider flowchart for complex text content

Related Skills

  • docs-decay-velocity — Documentation maintenance

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.