Decomp Permuter

VerifiedCaution

Automatically permutes C source files to better match a target binary. Use when a decompiled function is nearly matching (95%+) but has register differences, or when progress stalls. Not suitable for control flow or functional mismatches.

Sby Skills Guide Bot
DevelopmentAdvanced
3/3/2026
Claude Code
#decompilation#reverse-engineering#c#register-allocation#binary-matching

Recommended for

Automated summary

This skill guides use of decomp-permuter to automatically permute a C file so it better matches a target binary during decompilation.

Strengths

  • Provides the exact command with the --source-file flag and the mandatory timeout to prevent endless runs
  • States clear source-file requirements: compiles successfully, 95%+ match, single function body implemented
  • Explains where to find results (output-<score>, source.c, diff.txt) and how to iterate from a fresh base_N+1.c
  • Warns about permuter artefacts that create local optima and logically invalid statement removals

Limitations

  • Only addresses register allocation differences, not control flow or functional gaps
  • Assumes the user is working from the root of the decomp-permuter GitHub repo
  • Offers no troubleshooting for compile failures or environment setup issues
When to use it

Use it when a decompiled function is around 95% matching and only register allocation differs.

When not to use it

Avoid it when the function has control flow or behavioral differences, which are usually easier to resolve by hand.

Security analysis

Caution
Quality score88/100

The skill uses bash to run a local decompilation helper with a timeout. It does not exfiltrate data, delete files, fetch remote payloads, or disable safety controls, but executing a repository-local binary is a powerful operation that warrants caution.

Findings
  • •Instructs running a local executable via bash (`./tools/permuter`), so safety depends on trusting the repository/tool.
  • •No allowed-tools are declared, but the skill assumes shell command execution.
How this analysis is made

Examples

Permuter une fonction presque identique
My decompiled function match is stuck at 97% with only register differences. Run decomp-permuter on nonmatchings/func_8024A1C/base_3.c for func_8024A1C with a 300 second timeout and show me the best output.
Itérer sur un résultat de permutation
The permuter produced output-1250/source.c and diff.txt. Review the diff, tell me which changes are logically sound, and write an improved base_4.c for a new run.
Vérifier l'éligibilité avant de lancer
Check whether my base_2.c for the function is a good candidate for decomp-permuter: does it compile, is it one function body, and is the match above 95%?

name: decomp-permuter description: Decomp-Permuter is a tool that automatically permutes C files to better match a target binary. Use this skill when you are decompiling a function and it is almost matching except for some register differences (i.e. 95%+). Or if you are otherwise unable to make progress on a function decompilation. Do not use it when there are control flow or functional differences; it's often easy to resolve those by hand, and neither the scorer nor the randomizer tends to play well with them.

Permute a Function

Instructions

These instructions assume you are in the root directory of the Github repo.

Step 1: Run the permuter

Run the permuter with the --source-file (or -s) flag pointing to your best matching attempt:

timeout 300s ./tools/permuter --source-file nonmatchings/<function-name>/base_N.c <function name>

This will automatically create a permuter environment and run the permuter for 300 seconds. You can tweak this number to an appropriate time. If you fail to use the timeout command the permuter will run forever.

Requirements for source file:

  • Must compile successfully
  • Should already be 95%+ match (permuter works on register allocation, not control flow)
  • Only one function body should be implemented (extern declarations for other functions are fine)
  • Include all necessary headers at the top

The permuter will report match improvements. These will be located in nonmatchings/function-name-<optional number>/output-<score>-<optional number>. The full C code will be in source.c. A diff.txt file is also available with the changes the permuter made.

Iterating on a Permuted Function

Look at the changes outputted by the permuter and use them to improve your own C code. Do not attempt to iterate directly on the base.c file. Create a new version of the function (e.g., base_N+1.c) and re-run the permuter with --source-file pointing to the new file.

Beware of permuter artefacts and noise

The permuter is dangerous. It can lead you to local optima. Only incorporate decomp-permuter changes that make logical sense within the context of the function you are matching.

For example, decomp-permuter may tell you to move or delete a line or statement that you know is necessary for the function to make logical sense. This may temporarily bump the match percentage but cannot ever be a path to 100% match.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/decomp-permuter-mma3jsko/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/decomp-permuter-mma3jsko' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/decomp-permuter-mma3jsko/download' --output '.skill-downloads/decomp-permuter-mma3jsko/SKILL.md.part' && mv '.skill-downloads/decomp-permuter-mma3jsko/SKILL.md.part' '.skill-downloads/decomp-permuter-mma3jsko/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/decomp-permuter-mma3jsko/SKILL.md' && test -s '.skill-downloads/decomp-permuter-mma3jsko/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/decomp-permuter' && cp -R '.skill-downloads/decomp-permuter-mma3jsko' '.claude/skills/decomp-permuter'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/decomp-permuter-mma3jsko'

openskills read 'decomp-permuter-mma3jsko'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/decomp-permuter-mma3jsko/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills