mermaid-reverse-attempt

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

16 stars

Best use case

mermaid-reverse-attempt is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

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

Teams using mermaid-reverse-attempt should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/mermaid-reverse-attempt/SKILL.md --create-dirs "https://raw.githubusercontent.com/plurigrid/asi/main/plugins/asi/skills/mermaid-reverse-attempt/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/mermaid-reverse-attempt/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How mermaid-reverse-attempt Compares

Feature / Agentmermaid-reverse-attemptStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 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

```bash
# 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

```javascript
// 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

Related Skills

reverse-engineering

16
from plurigrid/asi

Reverse Engineering Skill

reverse-engineering-rust-malware

16
from plurigrid/asi

Reverse engineer Rust-compiled malware using IDA Pro and Ghidra with techniques for handling non-null-terminated strings, crate dependency extraction, and Rust-specific control flow analysis.

reverse-engineering-ransomware-encryption-routine

16
from plurigrid/asi

Reverse engineer ransomware encryption routines to identify cryptographic algorithms, key generation flaws, and potential decryption opportunities using static and dynamic analysis.

reverse-engineering-malware-with-ghidra

16
from plurigrid/asi

Reverse engineers malware binaries using NSA's Ghidra disassembler and decompiler to understand internal logic, cryptographic routines, C2 protocols, and evasion techniques at the assembly and pseudo-C level. Activates for requests involving malware reverse engineering, disassembly analysis, decompilation, binary analysis, or understanding malware internals.

reverse-engineering-ios-app-with-frida

16
from plurigrid/asi

Reverse engineers iOS applications using Frida dynamic instrumentation to understand internal logic, extract encryption keys, bypass security controls, and discover hidden functionality without source code access. Use when performing authorized iOS penetration testing, analyzing proprietary protocols, understanding obfuscated logic, or extracting runtime secrets from iOS binaries. Activates for requests involving iOS reverse engineering, Frida iOS hooking, Objective-C/Swift method tracing, or iOS binary analysis.

reverse-engineering-dotnet-malware-with-dnspy

16
from plurigrid/asi

Reverse engineers .NET malware using dnSpy decompiler and debugger to analyze C#/VB.NET source code, identify obfuscation techniques, extract configurations, and understand malicious functionality including stealers, RATs, and loaders. Activates for requests involving .NET malware analysis, C# malware decompilation, managed code reverse engineering, or .NET obfuscation analysis.

reverse-engineering-android-malware-with-jadx

16
from plurigrid/asi

Reverse engineers malicious Android APK files using JADX decompiler to analyze Java/Kotlin source code, identify malicious functionality including data theft, C2 communication, privilege escalation, and overlay attacks. Examines manifest permissions, receivers, services, and native libraries. Activates for requests involving Android malware analysis, APK reverse engineering, mobile malware investigation, or Android threat analysis.

reverse-derivative-validator

16
from plurigrid/asi

Triadic skill (validation)

reverse-derivative-generator

16
from plurigrid/asi

Triadic skill (generation)

reverse-derivative-coordinator

16
from plurigrid/asi

Triadic skill (coordination)

protocol-reverse-engineering

16
from plurigrid/asi

Master network protocol reverse engineering including packet analysis, protocol dissection, and custom protocol documentation. Use when analyzing network traffic, understanding proprietary protocols, or debugging network communication.

detecting-s3-data-exfiltration-attempts

16
from plurigrid/asi

Detecting data exfiltration attempts from AWS S3 buckets by analyzing CloudTrail S3 data events, VPC Flow Logs, GuardDuty findings, Amazon Macie alerts, and S3 access patterns to identify unauthorized bulk downloads and cross-account data transfers.