cmd-mermaid-render
Render and display Mermaid diagrams inline in iTerm2 or Ghostty.
Skill by Olshansk
Chalk Labs
Need help deploying cmd-mermaid-render?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/olshansk-cmd-mermaid-render
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Shell scripts
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/cmd-mermaid-render
Tools it pre-approves 4
From allowed-tools in SKILL.md: the agent may use these without asking you each time.
ReadWriteEditBash
What's inside
- Skill name
cmd-mermaid-render- Description
- Render and display Mermaid diagrams inline in iTerm2 or Ghostty. Use when creating, editing, or iterating on mermaid diagrams. Triggers on mermaid diagram work — flowcharts, sequence, state, class, ER, and XY charts.
- License
- MIT
- Allowed tools
- Read, Write, Edit, Bash
- Instructions
- 172 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
- Pre-approves any shell command
Files (2)
- SKILL.md
- render.sh · scripts/
SKILL.md (first lines)
# Mermaid Diagram Renderer <!-- omit in toc -->
Render mermaid diagrams to PNG and display them inline. Supports iTerm2 (imgcat) and Ghostty (kitten icat). Built for fast visual iteration.
<!-- TODO: Once Claude Code supports inline image passthrough, update the workflow
to display directly instead of printing the view command.
Tracking: https://github.com/anthropics/claude-code/issues/29254 -->
- [Workflow](#workflow)
- [Prerequisites](#prerequisites)
- [Rendering](#rendering)
- [Iteration Rules](#iteration-rules)
- [Mermaid Syntax Cheatsheet](#mermaid-syntax-cheatsheet)
## Workflow
Every time you generate or modify mermaid code, immediately render and display it. Never ask "want me to render?" — just do it.
**Write the mermaid code:**
```bash
cat > /tmp/mermaid-diagram.mmd << 'MERMAID'
graph TD
A[Start] --> B{Decision}
B -->|Yes| C[Action]
B -->|No| D[End]
MERMAID
```
**Render:**
```bash
"${CLAUDE_SKILL_DIR}/scripts/render.sh" /tmp/mermaid-diagram.mmd
```
The script outputs `Rendered: <path>` and `View: <command>`. **Always print the `View:` command for the user** so they can copy-paste it to see the diagram inline. Claude Code's Bash tool captures stdout, so inline images won't display automatically.
If the user provides a specific file path, use that instead of `/tmp/mermaid-diagram.mmd`.
## Prerequisites
On first use, check that `mmdc` is available:
```bash
which mmdc || echo "MISSING: Run 'npm install -g @mermaid-js/mermaid-cli'"
```
The display command (`imgcat` or `kitten icat`) is detected automatically based on `$TERM_PROGRAM`. No manual setup needed — the script falls back to `open` if neither is available.
## Rendering
The `render.sh` script handles rendering with sensible defaults. It supports these flags:
- `--theme <name>` — mermaid theme: `default`, `dark`, `forest`, `neutral` (default: `default`)
- `--width <px>` — output width in pixels (default: `1200`)
- `--bg <color>` — background color (default: `transparent`)
- `--css <path>` — custom CSS file for styling
- `--output <path>` — custom output path (default: replaces `.mmd` with `.png`)
**Examples:**
```bash
"${CLAUDE_SKILL_DIR}/scripts/render.sh" /tmp/mermaid-diagram.mmd --theme dark
```
```bash
"${CLAUDE_SKILL_DIR}/scripts/render.sh" /tmp/mermaid-diagram.mmd --width 2400
```
```bash
"${CLAUDE_SKILL_DIR}/scripts/render.sh" /tmp/mermaid-diagram.mmd --output ~/Desktop/diagram.png
```
## Iteration Rules
- After each user edit request, update the `.mmd` file and re-render immediately
- Show the `View:` command after every change — the user should never have to ask
- Keep the `.mmd` file path consistent within a session so edits accumulate
- If `mmdc` reports a syntax error, show the error message and fix the mermaid code before retrying
- Use the cheatsheet below for syntax reference when iterating
## Mermaid Syntax Cheatsheet
### Graph Directions
`graph TD` (top-down), `graph LR` (left-right), `graph BT` (bottom-top), `graph RL` (right-left)
### Node Shapes
```text
A[Rectangle] B(Rounded) C{Diamond}
D((Circle)) E[[Subroutine]] F[(Database)]
G>Asymmetric] H{{Hexagon}} I[/Parallelogram/]
```
### Link Styles
```text
A --> B Solid arrow
A --- B Solid line (no arrow)
A -.-> B Dotted arrow
A ==> B Thick arrow
A -->|label| B Arrow with label
A -- text --> B Arrow with text (alternate)
```
### Subgraphs
```text
subgraph Title
A --> B
end
```
### Styling
```text
style A fill:#f9f,stroke:#333,stroke-width:2px
classDef highlight fill:#ff0,stroke:#333From Olshansk/agent-skills, MIT.
More from Olshansk/agent-skills
- 0.584score
cmd-makefile-improve
Olshansk
Review a repository's Makefile foundation and propose approval-gated improvements to its helpers, templates, tests, and documentation.
SkillBFreshness: B★ 9Claude Code +9 - 0.572score
cmd-makefile
Olshansk
Create or improve Makefiles with minimal complexity.
SkillBFreshness: B★ 9Claude Code +9 - 0.538score
cmd-plan-store
Olshansk
Capture the current conversation's plan, decisions, and action items into a structured markdown file in the project's plans/ directory.
SkillCFreshness: C★ 9Claude Code +9 - 0.538score
cmd-code-what
Olshansk
Catch the user up on what the agent has been doing in the current session with 3-5 ultra-tight bullet points.
SkillCFreshness: C★ 9Claude Code +9 - 0.538score
cmd-codex-review-unstaged
Olshansk
Get a second opinion on what Claude just implemented from Codex (codex exec headless mode).
SkillCFreshness: C★ 9Claude Code +9 - 0.535score
cmd-done-check
Olshansk
Ask the agent whether it finished everything or has more to do — a lightweight completeness gate for the end of any task
SkillCFreshness: C★ 9Claude Code +9 - 0.532score
cmd-agent-persona-set
Olshansk
Prime the agent with a behavioral persona for the conversation
SkillCFreshness: C★ 9Claude Code +9 - 0.532score
cmd-docs-idiot-proof
Olshansk
Simplify documentation for clarity and scannability with approval-gated edits
SkillCFreshness: C★ 9Claude Code +9 - 0.532score
cmd-pr-conflict-resolver
Olshansk
Resolve merge conflicts systematically with context-aware 3-tier classification and escalation protocol
SkillCFreshness: C★ 9Claude Code +9 - 0.532score
cmd-pr-description
Olshansk
Generate a PR title and description, then commit, create/update the PR on approval
SkillCFreshness: C★ 9Claude Code +9 - 0.532score
cmd-pr-edgecase
Olshansk
Review branch changes for test gaps, logic edge cases, failure modes, and integration risks
SkillCFreshness: C★ 9Claude Code +9 - 0.532score
cmd-pr-build-context
Olshansk
Build high-signal PR context for review with diff analysis, risk assessment, and discussion questions
SkillCFreshness: C★ 9Claude Code +9
Signals
- Stars
- 9
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- May 3, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Olshansk/agent-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Olshansk
- 0.584score
cmd-makefile-improve
Olshansk
Review a repository's Makefile foundation and propose approval-gated improvements to its helpers, templates, tests, and documentation.
SkillBFreshness: B★ 9Claude Code +9 - 0.572score
cmd-makefile
Olshansk
Create or improve Makefiles with minimal complexity.
SkillBFreshness: B★ 9Claude Code +9 - 0.538score
cmd-codex-review-unstaged
Olshansk
Get a second opinion on what Claude just implemented from Codex (codex exec headless mode).
SkillCFreshness: C★ 9Claude Code +9 - 0.538score
cmd-plan-store
Olshansk
Capture the current conversation's plan, decisions, and action items into a structured markdown file in the project's plans/ directory.
SkillCFreshness: C★ 9Claude Code +9 - 0.538score
cmd-code-what
Olshansk
Catch the user up on what the agent has been doing in the current session with 3-5 ultra-tight bullet points.
SkillCFreshness: C★ 9Claude Code +9 - 0.535score
cmd-done-check
Olshansk
Ask the agent whether it finished everything or has more to do — a lightweight completeness gate for the end of any task
SkillCFreshness: C★ 9Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get cmd-mermaid-render running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
cmd-mermaid-render skill. Agent Mart. https://agentmart.dev/skills/olshansk-cmd-mermaid-render (last updated 2026-10-24)