Rev Unicorn Debug logo

Rev Unicorn Debug

CommunityPopular
P4nda0s
rev-unicorn-debug

Debug and emulate specific code fragments or functions using the Unicorn engine. Activate when the user wants to emulate a function with Unicorn, trace binary execution without running the full program, decrypt or decode data by emulating the algorithm, or bypass environment dependencies (JNI, syscalls, libc) during emulation.

Overview

PublisherP4nda0s
Repositoryreverse-skills
Skill namerev-unicorn-debug
Stars
2.1K
Forks
268
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by P4nda0s on GitHub. Read the source before you install it.

Installation

Install the Rev Unicorn Debug AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/P4nda0s/reverse-skills.git /tmp/reverse-skills
mkdir -p .claude/skills
cp -r /tmp/reverse-skills/skills/rev-unicorn-debug .claude/skills/rev-unicorn-debug
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Rev Unicorn Debug in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Rev Unicorn Debug on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Rev Unicorn Debug is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

rev-unicorn-debug - Unicorn Emulation Debugger

Debug and emulate specific code fragments or functions using the Unicorn engine. Analyze context dependencies (JNI, syscalls, library functions) and simulate them through hook mechanisms to complete the user's debugging goal.


Core Principles

  1. Load file raw first — do NOT parse ELF/PE/Mach-O headers. Read the file as raw bytes and map directly into Unicorn memory. We only need to emulate specific functions, not the entire binary. If raw loading fails (code references segments at specific addresses), then parse minimally — only map the segments needed.
  2. Identify context dependencies — analyze the target code for external calls (JNI, syscalls, libc, imports) and hook them to provide simulated responses.
  3. Use callbacks extensively — leverage Unicorn's hook system for debugging, tracing, error recovery, and environment simulation.
  4. Iterative fix — when emulation crashes, use the callback info to diagnose and fix (map missing memory, hook unhandled calls, fix register state).
  5. Minimal trace output — prefer block-level tracing over instruction-level. Only enable instruction trace on small targeted ranges. Use counters and summaries instead of per-step logging.

Environment Simulation Strategy

Before emulating, read the target function and identify what it calls. Hook external dependencies by address and simulate in Python:

CategoryExamplesSimulation Strategy
libcmalloc, free, memcpy, strlen, printfHook address, implement logic in Python (bump allocator for malloc)
JNIGetStringUTFChars, FindClass, GetMethodIDBuild fake JNIEnv function table in UC memory, write RET stubs at each entry, hook stub addresses
Syscallsread, write, mmap, ioctlHook UC_HOOK_INTR, dispatch by syscall number
C++ runtimeoperator new, __cxa_throwHook and simulate
Library callspthread_mutex_lock, dlopenHook and return success/stub

Hook pattern: Register a UC_HOOK_CODE callback. When PC hits a known import address, execute the Python simulation, then set PC = LR to skip the original function.


Callback Types to Use

CallbackPurpose
UC_HOOK_CODEIntercept import calls by address; instruction-level trace (use sparingly, narrow range only)
UC_HOOK_BLOCKBlock-level trace (preferred over instruction trace)
UC_HOOK_MEM_UNMAPPEDAuto-map missing pages to recover from unmapped access errors
UC_HOOK_MEM_READ | UC_HOOK_MEM_WRITETrace memory access on targeted data ranges only
UC_HOOK_INTRIntercept SVC/INT for syscall simulation

Iterative Debugging Workflow

When emulation fails, follow this loop:

  1. Run — start emulation, let it crash
  2. Read callback output — which address faulted? What type (read/write/fetch)?
  3. Diagnose:
    • Unmapped memory fetch → missing code page, map it
    • Unmapped memory read/write → missing data section or uninitialized pointer, map or hook
    • Hitting an import stub → identify the function, add a simulation hook
    • Infinite loop → add a code hook with execution counter, stop after threshold
  4. Fix — add the hook / map the memory / adjust registers
  5. Re-run — repeat until the target function completes

Architecture Quick Reference

ArchUc ConstModeSPLRArgsReturnSyscall
ARM64UC_ARCH_ARM64UC_MODE_LITTLE_ENDIANSPX30X0-X7X0X8 + SVC #0
ARM32UC_ARCH_ARMUC_MODE_THUMB / UC_MODE_ARMSPLRR0-R3R0R7 + SVC #0
x86-64UC_ARCH_X86UC_MODE_64RSP(stack)RDI,RSI,RDX,RCX,R8,R9RAXRAX + syscall
x86-32UC_ARCH_X86UC_MODE_32ESP(stack)(stack)EAXEAX + int 0x80
MIPS32UC_ARCH_MIPSUC_MODE_MIPS32 + UC_MODE_BIG_ENDIAN$sp$ra$a0-$a3$v0$v0 + syscall

Frequently asked questions

What does the Rev Unicorn Debug AI skill do?

Debug and emulate specific code fragments or functions using the Unicorn engine. Activate when the user wants to emulate a function with Unicorn, trace binary execution without running the full program, decrypt or decode data by emulating the algorithm, or bypass environment dependencies (JNI, syscalls, libc) during emulation.

Why use Rev Unicorn Debug on TypingMind?

Because you install it once and use it with any model. Rev Unicorn Debug is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Rev Unicorn Debug in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/P4nda0s/reverse-skills/tree/main/skills/rev-unicorn-debug. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Rev Unicorn Debug?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Rev Unicorn Debug?

As many as you like. As long as a model supports skills, you can use Rev Unicorn Debug with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Rev Unicorn Debug AI skill free?

It is published on GitHub by P4nda0s. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇