imhex
Use when hex editing, binary analysis, pattern language parsing, file identification, hash computation, or hex dump generation is needed. ImHex provides a powerful CLI and pattern language for structured binary data inspection.
- License 许可
- MIT
- 最近更新
- 2026-11-02
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- imhex
- description
- Use when hex editing, binary analysis, pattern language parsing, file identification, hash computation, or hex dump generation is needed. ImHex provides a powerful CLI and pattern language for structured binary data inspection.
03 SKILL.md 正文
ImHex
Overview
ImHex is a hex editor for reverse engineers with a rich CLI and a custom pattern language for defining binary structures. Use it for file format analysis, binary template application, hash verification, and structured hex dumps.
Quick Workflow
- Confirm
imhexis in PATH; runimhex --versionto verify. - For file identification, use
imhex --magic desc <file>(description) orimhex --magic mime <file>(MIME type). - For hex dumps, use
imhex --hexdump <file> <offset> <size>. - For hash verification, use
imhex --hash <algo> <file>(md5, sha1, sha256, sha384, sha512). - For structured parsing, write a
.hexpatpattern file and runimhex --pl format --input <file> --pattern <pattern.hexpat> --format json. - For encoding/decoding, use
imhex --encode <format> <input>orimhex --decode <format> <input>. - For demangling symbols, use
imhex --demangle <symbol>.
CLI Reference
| Command | Purpose |
|---|---|
imhex --magic desc <file> |
Identify file type (description) |
imhex --magic mime <file> |
Identify file type (MIME) |
imhex --hexdump <file> <offset> <size> |
Hex dump a region |
imhex --hash <algo> <file> |
Compute hash (md5/sha1/sha256/sha384/sha512) |
imhex --pl format --input <file> --pattern <pat> --format json |
Parse binary with pattern, output JSON |
imhex --pl run <script.hexpat> |
Execute a pattern language script |
imhex --pl docs <pattern.hexpat> |
Show pattern documentation |
imhex --pl info <pattern.hexpat> |
Print pattern metadata |
imhex --encode <format> <input> |
Encode a string |
imhex --decode <format> <input> |
Decode a string |
imhex --demangle <symbol> |
Demangle a C++/Rust symbol |
imhex -i <file> |
Display file information |
imhex --calc "<expr>" |
Evaluate a math expression |
imhex --plugins |
List installed plugins |
Pattern Language
ImHex patterns (.hexpat files) define binary structures declaratively:
struct Header {
char magic[4];
u32 version;
u32 fileSize;
u32 entryCount;
};
struct Entry {
u16 id;
u16 type;
u32 offset;
u32 size;
};
Header header @ 0x00;
Entry entries[header.entryCount] @ 0x10;
Run with: imhex --pl format --input file.bin --pattern structure.hexpat --format json
Output formats: json, yaml, console
Common Mistakes
- Forgetting to specify
--formatwhen using--pl format(defaults to console). - Using wrong offset/size units in
--hexdump(bytes, not hex). - Not checking
--magicoutput before writing patterns for unknown formats. - Pattern language uses C-like syntax but is NOT C --
u8,u16,u32,u64,s8,s16, etc. are the native types.
Integration with Other Tools
- Export ImHex pattern output as JSON, pipe to
jqfor field extraction. - Use
--hashto verify file integrity before/after patching. - Combine with Ghidra/IDA: identify structure in ImHex, apply types in decompiler.
- Write
.hexpatpatterns for game file formats (DAT, MEG, ALA, etc.) for SWFOC modding.
Patterns Repository
ImHex has a built-in pattern store. Community patterns are at:
https://github.com/WerWolv/ImHex-Patterns
Install path: %APPDATA%/imhex/patterns/
04 同仓库更多 Skills
clarify-requirements
Resolve genuine pre-execution ambiguity by scanning repo context, generating 1-6 grounded options, and asking 1-3 focused questions via AskUserQuestion. NOT for mid-task use (injection risk); NOT when the goal is already unambiguous; use to disambiguate vague prompts before any file edits.
openmm-md
Run FREE, open-source, Windows-native GPU molecular dynamics via the openmm-md MCP (OpenMM + CUDA on the local NVIDIA GPU). Use for protein / protein-ligand MD when you want a free stack or are on Windows without a Schrodinger license. Covers the full workflow (prepare, solvate, minimize, equilibrate, production, analyze, mmgbsa) AND an honest decision guide vs Schrodinger Desmond, including how to run Desmond legitimately on Linux or a cloud GPU with a real license. This is a deliberately LESSER free alternative and does NOT replace the schrodinger MCP tools. Do NOT use it to pick a free tool when a validated FEP+, WaterMap, IFD-MD, or Prime MM-GBSA result is actually required.
visual-review
Take screenshots of web pages and UI using Playwright for visual review and iteration
status
Diagnostic status report — shows metaswarm installation state, project setup, and potential issues
start
Use when starting work on any task, when the user mentions metaswarm, or when the user wants to begin tracked development work
setup
Interactive project setup — detects your project, configures metaswarm, writes project-local files