Skip to main content
skill CX Codex

md-validation — Claude Code skill: check links and Mermaid

Validates relative links between pages and Mermaid diagrams before you ship. Useful for multi-page artifacts and knowledge bases.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add haowjy/creative-writing-skills --skill md-validation -a claude-code
Open on GitHub

What md-validation does

The skill covers two things that break quietly. First, relative links between pages: in a multi-page artifact or knowledge base, broken cross-references rot without a warning, so every target gets checked before a commit. Second, Mermaid diagrams: you open the HTML artifact in a browser and look at each one, because a syntax error shows up as a broken render rather than an error message.

Inside is a list of common parser failures. Unquoted labels with punctuation break the parse. A bare lowercase end collides with the subgraph terminator. Node IDs starting with o or x after edge markers get misparsed. Custom fills without a matching text colour leave labels unreadable. The full authoring rules — quoting, line breaks, reserved words, themes — live in resources/mermaid-authoring.md.

The check is visual. There is no parser running behind it, so it will not catch a bad diagram for you in CI — someone still has to open the artifact and look.

What it helps with

  • check relative links between pages before a commit
  • find broken cross-references in a knowledge base
  • catch a Mermaid diagram that renders wrong
  • work out why a label with punctuation breaks the parser
  • fix unreadable labels caused by a custom fill

Example prompts for the agent

  • check the relative links in docs/ before I commit
  • open the built HTML and tell me which Mermaid diagrams are broken
  • why won't this diagram render — check it against resources/mermaid-authoring.md

How to install md-validation

1Skills CLI (Vercel)

npx skills add haowjy/creative-writing-skills --skill md-validation -a claude-code

2Manually: put the files in place

~/.claude/skills/md-validation/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/md-validation/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about md-validation

How do I install md-validation in Claude?

Run npx skills add haowjy/creative-writing-skills --skill md-validation -a claude-code. The skill lands in ~/.claude/skills/md-validation/SKILL.md.

What does md-validation do?

It validates relative links between pages and Mermaid diagrams. Diagrams get checked in a browser, since a syntax error surfaces as a broken render.

Do I need a separate tool to validate Mermaid?

No. The skill tells you to open the HTML artifact in a browser and check every diagram visually — failures appear as broken renders, not as error text.

Source text

SKILL.md · Apache-2.0
---
name: md-validation
description: Use when validating markdown links or Mermaid diagrams.
---

# md-validation

## Mermaid Diagrams

Validate Mermaid diagrams render correctly before shipping. Open the HTML
artifact in a browser and check every diagram visually — syntax errors show
as broken renders, not error messages.

Common failure modes:
- Unquoted labels with punctuation break the parse
- Bare lowercase `end` collides with subgraph terminator
- Node IDs starting with `o` or `x` after edge markers get misparsed
- Custom fills without matching text color make labels unreadable

See `resources/mermaid-authoring.md` for the full authoring rules (quoting,
line breaks, reserved words, themes).

## Markdown Links

Check that relative links between pages resolve. When building a multi-page
artifact or KB, broken cross-references silently rot — verify each link
target exists before committing.

© haowjy · Apache-2.0 · haowjy/creative-writing-skills

Similar skills

Everything for Writing and docs →

From the same set22

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor