Scripting ida with idapython

From meltedinhex/analyst-ai-pack · View interactive version

Scripting ida with idapython is an AI agent skill from the GitHub repository meltedinhex/analyst-ai-pack. Automates IDA Pro analysis with IDAPython by generating scripts that enumerate functions, decode strings, rename by signature, and export analysis results, and by documenting the headless idat batch invocation. Activates for requests to script IDA Pro, write IDAPython automation, or run IDA in batch

How to use this skill

Skill file

Scripting IDA Pro With IDAPython

When to Use

apply signature-based renames, and export results — via IDAPython.

Do not use IDA's debugger (-r) on untrusted samples on your host — these scripts drive

static analysis. Work in an isolated environment.

Prerequisites

Safety & Handling

Workflow

Step 1: Generate an analysis script

python scripts/analyst.py script --emit functions,strings --out ida_export.py

Emits an IDAPython script using the real API (idautils.Functions, idc.get_func_name,

idautils.Strings) that writes results to JSON next to the IDB.

Step 2: Generate the headless batch command

python scripts/analyst.py batch --script ida_export.py --input sample.exe

Builds the idat -A -S"script" input invocation (auto-mode, run script, no UI) for batch runs.

Step 3: Run and collect

Execute the batch command per sample and aggregate the JSON exports.

Step 4: Iterate

Extend the generated script with signature renames (FLIRT) and decompiler (ida_hexrays) output

as needed.

Validation

Pitfalls

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.