KS
Killer-Skills

mermaid-fix — Categories.community

v1.0.0
GitHub

About this Skill

Perfect for AI Agents needing advanced Mermaid diagram parsing and validation capabilities in k8s environments a k8s env management by AI agent

jinbangyi jinbangyi
[0]
[0]
Updated: 3/4/2026

Quality Score

Top 5%
31
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
Cursor IDE Windsurf IDE VS Code IDE
> npx killer-skills add jinbangyi/k8s-agent/mermaid-fix

Agent Capability Analysis

The mermaid-fix MCP Server by jinbangyi is an open-source Categories.community integration for Claude and other AI agents, enabling seamless task automation and capability expansion.

Ideal Agent Persona

Perfect for AI Agents needing advanced Mermaid diagram parsing and validation capabilities in k8s environments

Core Value

Empowers agents to automatically fix Mermaid diagram parsing errors using mermaid-cli, discovering new rules and updating known patterns in .claude/rules/mermaid.md, while validating syntax with mmdc

Capabilities Granted for mermaid-fix MCP Server

Automating Mermaid diagram validation
Debugging syntax errors in Mermaid code blocks
Updating mermaid.md rules with newly discovered patterns

! Prerequisites & Limits

  • Requires mermaid-cli installation
  • k8s environment management capabilities
  • Filesystem access to read and update .claude/rules/mermaid.md
Project
SKILL.md
2.6 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
SKILL.md
Readonly

Mermaid Fix

Fixes Mermaid diagram parsing errors using mermaid-cli and discovers new rules.

Quick Start

  1. Read existing rules: Load .claude/rules/mermaid.md for known patterns
  2. Extract diagrams: Find all Mermaid code blocks in the target file(s)
  3. Validate with mmdc: Run mmdc -i <temp_file> -o /dev/null to check syntax
  4. Fix errors: Apply fixes based on mmdc error output
  5. Update rules: Add newly discovered error patterns to mermaid.md

Validation Command

bash
1# Create temp file, validate, check exit code 2mmdc -t neutral -i diagram.mmd -o /dev/null 3# Exit code 0 = valid, non-zero = error

Common Fixes

Based on existing rules in mermaid.md:

Error PatternFix
Graph TDChange to lowercase: graph TD
<br/>, <b>, <i> in labelsRemove HTML tags, use plain text
dmzSubnet style namingUse hyphens: dmz-subnet
Missing graph directionAdd LR, TD, RL, or BT

Discovering New Rules

When you encounter a new error pattern:

  1. Document the error: Capture the error message from mmdc
  2. Identify the fix: What change resolved the error?
  3. Update mermaid.md: Add a new rule entry with:
    • Rule number (next sequential)
    • Category name
    • Pattern description
    • Fix/avoidance guidance

Example new rule format:

markdown
1**N. Category Name** 2- Error pattern: `<what causes the error>` 3- Fix: `<how to resolve>` 4- Example: `<before -> after>`

Workflow Steps

Quick Mode (Markdown Files with Multiple Diagrams)

For markdown files containing multiple Mermaid diagrams, use concurrent validation:

bash
1# Validate all diagrams in a markdown file concurrently (4 workers by default) 2python3 .claude/skills/mermaid-fix/scripts/validate_markdown_mermaid.py <path/to/file.md> 3 4# Specify number of parallel workers 5python3 .claude/skills/mermaid-fix/scripts/validate_markdown_mermaid.py <path/to/file.md> --workers 8

Step-by-Step Mode

  1. Read the target file(s) containing Mermaid diagrams
  2. For each diagram:
    • Extract the Mermaid code block
    • Write to a temporary .mmd file
    • Run mmdc to validate
    • If error: fix based on error message and known rules
    • If new pattern: document for mermaid.md update
  3. Replace fixed diagrams in source file(s)
  4. If new patterns were discovered, update .claude/rules/mermaid.md

Constraints

  • Preserve the diagram's semantic meaning
  • Only fix syntax/structure issues
  • Do not "optimize" or "improve" the visual design (use /optimize-mermaid for that)
  • Test each fix with mmdc before applying

Related Skills

Looking for an alternative to mermaid-fix or building a Categories.community AI Agent? Explore these related open-source MCP Servers.

View All

widget-generator

Logo of f
f

widget-generator is an open-source AI agent skill for creating widget plugins that are injected into prompt feeds on prompts.chat. It supports two rendering modes: standard prompt widgets using default PromptCard styling and custom render widgets built as full React components.

149.6k
0
Design

chat-sdk

Logo of lobehub
lobehub

chat-sdk is a unified TypeScript SDK for building chat bots across multiple platforms, providing a single interface for deploying bot logic.

73.0k
0
Communication

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication