write-ida-script
Write an IDAPython script using verified API workflows from the IDA SDK MCP server
Best use case
write-ida-script is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Write an IDAPython script using verified API workflows from the IDA SDK MCP server
Teams using write-ida-script 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
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/write-ida-script/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How write-ida-script Compares
| Feature / Agent | write-ida-script | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Write an IDAPython script using verified API workflows from the IDA SDK MCP server
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
# Write IDA Script
Write an IDAPython script by first consulting the `ida-sdk-workflow` MCP tools to retrieve verified API call sequences, then composing the script from those patterns.
## Process
Follow these steps in order:
### 1. Decompose the request
Break the user's request into discrete sub-tasks. For example, "list all functions and their cross-references" becomes:
- Sub-task A: enumerate all functions
- Sub-task B: get cross-references for each function
### 2. Retrieve workflows
For each sub-task, call `get_workflows` with a natural-language description:
```
get_workflows("enumerate all functions in the database")
get_workflows("get cross references to a function")
```
### 3. Look up unfamiliar APIs
For any API function in the workflow results that you're not confident about, call `get_api_doc`:
```
get_api_doc("xrefblk_t")
get_api_doc("get_func_name")
```
### 4. Find companion APIs if needed
If a workflow seems incomplete (e.g., you have iteration but no formatting), call `list_related_apis`:
```
list_related_apis("get_func")
```
### 5. Write the script
Compose the script following these conventions:
- **Explicit imports**: `import ida_funcs`, not `from ida_funcs import *`
- **`main()` wrapper**: All logic inside `def main():` with `if __name__ == "__main__": main()`
- **None checks**: Always check return values — `get_func()`, `decompile()`, etc. can return `None`
- **`print()` for output**: Use `print()` in IDAPython, not `ida_kernwin.msg()`
- **Module-qualified calls**: `ida_funcs.get_func(ea)`, not bare `get_func(ea)`
Canonical style example:
```python
"""
Short summary of what the script does.
Longer description of the workflow: what it takes as input,
what it produces, and any prerequisites.
Usage: Run in IDA Pro via File -> Script file...
"""
import ida_funcs
import ida_hexrays
import ida_kernwin
def main():
ea = ida_kernwin.ask_addr(0, "Enter function address:")
if ea is None:
return
pfn = ida_funcs.get_func(ea)
if pfn is None:
print("No function found at 0x%X" % ea)
return
print("Function: 0x%X - 0x%X" % (pfn.start_ea, pfn.end_ea))
cf = ida_hexrays.decompile(pfn.start_ea)
if cf is None:
print("Decompilation failed at 0x%X" % pfn.start_ea)
return
print(str(cf))
if __name__ == "__main__":
main()
```
### 6. Explain the script
After writing the script, briefly explain:
- Which workflows/API patterns were used
- What each major section does
- Any limitations or assumptions
## Example
User: "write an IDAPython script that lists all functions with their sizes"
1. Sub-tasks: enumerate functions, compute size, format output
2. `get_workflows("enumerate all functions")` → reveals `idautils.Functions()` + `ida_funcs.get_func()`
3. `get_api_doc("get_func")` → confirms `func_t` has `.start_ea` and `.end_ea`
4. Write script using `idautils.Functions()` iterator, `ida_funcs.get_func()` for each, size = `end_ea - start_ea`Related Skills
write-rich-descriptions
Use metadata for system models (business/technical context) and markdown tables for deployment models (infrastructure specs). Makes models queryable and self-documenting.
write-documents
Apply when creating or editing INFO, SPEC, IMPL, TEST, FIX documents, or STRUT plans
write-coding-standards-from-file
Write a coding standards document for a project using the coding styles from the file(s) and/or folder(s) passed as arguments in the prompt.
vue-writer
Skill for creating and editing Vue.js components following Prowi conventions. Use when writing Vue files, creating components, or refactoring frontend code. Enforces modern patterns like defineModel(), TypeScript, and Composition API.
typescript-testing
Comprehensive testing guidance for TypeScript projects including unit testing patterns, mocking strategies, and test organization best practices
typescript-strict
TypeScript strict mode patterns. Use when writing any TypeScript code.
typescript-sdk-specialist
TypeScript SDK development with Node.js and browser support. Design SDK architecture, implement type-safe API clients, support ESM and CommonJS modules, and configure bundling for browsers.
typescript-pro
Expert TypeScript developer specializing in advanced type system features, generic programming, and type-safe application architecture. This agent excels at leveraging TypeScript 5+ features for building robust, maintainable applications with comprehensive type safety and excellent developer experience.
typescript-nestjs-best-practices-cursorrules-promp-cursorrules
Apply for typescript-nestjs-best-practices-cursorrules-promp. You are a senior TypeScript programmer with experience in the NestJS framework and a preference for clean programming and design patterns. Generate code, corrections, and refactorings that comply with
typescript-hook-writer
Expert guidance for developing Claude Code hooks in TypeScript with shared utilities, esbuild compilation, and Vitest testing - distributes compiled JS while maintaining TypeScript development experience
typescript-esm-utils-developer-maintainer
skill for developing and maintaining TypeScript utility libraries transpiled to esm. Use this skill when working on TypeScript projects that involve creating reusable utility functions, managing library structure, testing, documentation, and build processes. This includes creating new utilities, refactoring existing code, setting up testing frameworks, configuring build tools, and ensuring type safety.
typescript-docs
Generates comprehensive TypeScript documentation using JSDoc, TypeDoc, and multi-layered documentation patterns for different audiences. Use when creating API documentation, architectural decision records (ADRs), code examples, and framework-specific patterns for NestJS, Express, React, Angular, and Vue.