drafael/coding-harness / skills/pretty-mermaid
pretty-mermaid
VerifiedRender beautiful Mermaid diagrams as SVG or ASCII art using the beautiful-mermaid library. Supports 15+ themes, 5 diagram types (flowchart, sequence, state, class, ER), and ultra-fast rendering. Use this skill when: 1. User asks to "render a mermaid diagram" or provides .mmd files 2. User requests "create a flowchart/sequence diagram/state diagram" 3. User wants to "apply a theme" or "beautify a diagram" 4. User needs to "batch process multiple diagrams" 5. User mentions "ASCII diagram" or "terminal-friendly diagram" 6. User wants to visualize architecture, workflows, or data models
| File | Kind | Size |
|---|---|---|
| .gitignore | other | 122 B |
| LICENSE | other | 1.1 KB |
| README.md | markdown | 911 B |
| SKILL.md | skill md | 10.7 KB |
| assets/example_diagrams/class.mmd | other | 515 B |
| assets/example_diagrams/er.mmd | other | 584 B |
| assets/example_diagrams/flowchart.mmd | other | 253 B |
| assets/example_diagrams/sequence.mmd | other | 295 B |
| assets/example_diagrams/state.mmd | other | 225 B |
| package-lock.json | manifest | 1.5 KB |
| package.json | manifest | 313 B |
| references/DIAGRAM_TYPES.md | markdown | 6.2 KB |
| references/THEMES.md | markdown | 8.9 KB |
| references/api_reference.md | markdown | 968 B |
| scripts/batch.mjs | script | 5.4 KB |
| scripts/render.mjs | script | 5.3 KB |
| scripts/themes.mjs | script | 1.6 KB |
scripts/themes.mjs
View on GitHub#!/usr/bin/env node
import { execSync } from 'child_process';
import { dirname, join } from 'path';
import { fileURLToPath } from 'url';
const __dirname = dirname(fileURLToPath(import.meta.url));
const skillRoot = join(__dirname, '..');
async function loadBeautifulMermaid() {
try {
return await import('beautiful-mermaid');
} catch {}
console.error('[beautiful-mermaid] Dependency not found. Installing automatically...');
try {
execSync('npm install --no-fund --no-audit', {
cwd: skillRoot,
stdio: ['pipe', 'pipe', 'inherit'],
timeout: 120000,
});
console.error('[beautiful-mermaid] Installed successfully.\n');
} catch (e) {
console.error(`[beautiful-mermaid] Auto-install failed: ${e.message}`);
console.error(`Manual fix: cd ${skillRoot} && npm install`);
process.exit(1);
}
try {
const pkgPath = join(skillRoot, 'node_modules', 'beautiful-mermaid', 'dist', 'index.js');
return await import(pkgPath);
} catch (e) {
console.error(`[beautiful-mermaid] Failed to load after install: ${e.message}`);
process.exit(1);
}
}
async function main() {
const { THEMES } = await loadBeautifulMermaid();
const themes = Object.keys(THEMES);
console.log('Available Beautiful-Mermaid Themes:\n');
themes.forEach((theme, i) => {
console.log(`${String(i + 1).padStart(2)}. ${theme}`);
});
console.log(`\nTotal: ${themes.length} themes`);
console.log('\nUsage:');
console.log(' node scripts/render.mjs --input diagram.mmd --theme <theme-name> --output output.svg');
}
main().catch(e => {
console.error('Error:', e.message);
process.exit(1);
});
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |