smithery/plurigrid

mermaid-reverse-attempt

Mermaid URL codec - encodes/decodes #base64: (amp CLI) and #pako: (mermaid.live) formats

Installation

$ npx skills add smithery/plurigrid --skill mermaid-reverse-attempt

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/plurigrid · top by installs.

npx skills add smithery/plurigrid

Browse all from smithery/plurigrid

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,250 B
  • docs SUMMARY.md 119 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

Mermaid Reverse Attempt

Encode diagrams to shareable URLs, decode URLs back to source.

Formats Discovered

Prefix Source Method
#base64: amp CLI JSON.stringify({code}) → base64
#pako: mermaid.live pako.deflate(JSON.stringify({code})) → base64

Usage

# Encode diagram to pako URL (compressed)
node scripts/codec.js encode-pako < diagram.mmd

# Encode to base64 URL (amp style)
node scripts/codec.js encode-base64 < diagram.mmd

# Decode URL to diagram
node scripts/codec.js decode "https://mermaid.live/edit#pako:..."

Quick Reference

// Decode
const hash = url.split('#')[1];
if (hash.startsWith('pako:')) {
  return JSON.parse(pako.inflate(Buffer.from(hash.slice(5), 'base64'), {to:'string'})).code;
}
if (hash.startsWith('base64:')) {
  return JSON.parse(Buffer.from(hash.slice(7), 'base64').toString()).code;
}

// Encode pako
`https://mermaid.live/edit#pako:${Buffer.from(pako.deflate(JSON.stringify({code:diagram}))).toString('base64')}`

GF(3)

  • Trit: 0 (ERGODIC)
  • decode ∘ encode = id