Agent skill
mermaid-reverse-attempt
Mermaid URL codec - encodes/decodes #base64: (amp CLI) and #pako: (mermaid.live) formats
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/mermaid-reverse-attempt
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
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?