Token导航 LogoToken导航TokenDH.com
开发只读github未标认证来源可访问许可证需确认审计通过

decompilerdecompiler 搜索

Agent Skill

decompiler 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

212

周安装

9

GitHub Stars

18

下载量

74
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:decompiler(decompiler 搜索)
来源仓库:https://github.com/allthingsida/idasql-skills
仓库路径:skills/decompiler
安装命令:
npx skills add https://github.com/allthingsida/idasql-skills --skill decompiler
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/allthingsida/idasql-skills --skill decompiler

简介

将函数反编译为伪代码与抽象语法树级别表示形式。

  • 支持本地变量语义还原与调用模式挖掘功能。
  • 优先查询特定表结构以确定可用能力集。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • 当反编译器不可用时回退到基础汇编分析模式。
  • decompiler 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md


Trigger Intents

Use this skill when user asks for:

  • "decompile this function"
  • pseudocode understanding or AST-level analysis
  • local variable semantics in decompiled form
  • decompiler-centric pattern mining (returns/calls/conditions)

Route to:

  • annotations for persistent comments/renames after interpretation
  • types for struct/enum/type construction and application
  • disassembly when decompiler is unavailable or insufficient

Do This First (Warm-Start Sequence)

-- 1) Capability/profile probe
SELECT * FROM pragma_table_list WHERE name IN ('pseudocode', 'ctree', 'ctree_lvars');

-- 2) Pick one concrete function target
SELECT name, printf('0x%X', address) AS addr, size
FROM funcs
ORDER BY size DESC
LIMIT 10;

-- 3) View decompiled text via primary read surface
SELECT decompile(0x401000);

Interpretation guidance:

  • decompile(addr) is primary display surface.
  • pseudocode/ctree* are structured query/edit surfaces.

Global Constraint Reminder (Critical)

Always constrain decompiler tables by function:

WHERE func_addr = 0x...

Without this, decompiler tables may decompile every function and become extremely slow.


Failure and Recovery

  • No Hex-Rays/decompiler tables unavailable:

- Fall back to disassembly + xrefs workflows.

  • Empty/partial rows:

- Confirm target func_addr exists and refresh decompile cache (decompile(addr, 1) where supported).

  • Mutation did not appear:

- Run mandatory mutation loop (read -> edit -> refresh -> verify).


Handoff Patterns

  1. decompiler -> types for local type seeding and richer declarations.
  2. decompiler -> annotations for persistent narrative and naming.
  3. decompiler -> disassembly for opcode-level validation.

Decompiler Tables (Hex-Rays Required)

CRITICAL: Always filter by func_addr. Without constraint, these tables will decompile EVERY function - extremely slow!

pseudocode

The pseudocode table is a structured line-by-line pseudocode with writable comments. Use decompile(addr) to view pseudocode; use this table only for surgical edits (comments) or structured queries.

ColumnTypeWritableDescription
func_addrINTNoFunction address
line_numINTNoLine number
lineTEXTNoPseudocode text
eaINTNoCorresponding assembly address (from COLOR_ADDR anchor)
commentTEXTYesDecompiler comment at this ea
comment_placementTEXTYesComment placement: semi (inline, default), block1 (above line)

Filter behavior:

  • WHERE func_addr = X: best performance; iterates pseudocode for one function only.
  • WHERE ea = X: decompiles only the containing function and returns matching lines for that EA.
  • WHERE line_num = N: scans functions and returns rows at that line index; use only when you need cross-function line alignment.

Comment placements: semi (after ;), block1 (own line above), block2, curly1, curly2, colon, case, else, do

-- VIEWING: Use decompile() function, NOT the pseudocode table
SELECT decompile(0x401000);

-- COMMENTING: Use pseudocode table to add/edit/delete comments
UPDATE pseudocode SET comment_placement = 'semi',
                      comment = 'buffer overflow here'
WHERE func_addr = 0x401000 AND ea = 0x401020;

-- Add block comment (appears on own line above the statement)
UPDATE pseudocode SET comment_placement = 'block1', comment = 'vulnerable call'
WHERE func_addr = 0x401000 AND ea = 0x401020;

-- Delete comments at a resolved unique anchor
UPDATE pseudocode SET comment = NULL
WHERE func_addr = 0x401000 AND ea = 0x401020;

True function comments are not part of pseudocode:

  • use UPDATE funcs SET comment =... WHERE address =... for the regular function comment
  • use UPDATE funcs SET rpt_comment =... WHERE address =... for the repeatable function comment

pseudocode_orphan_comments

Persisted Hex-Rays comments that no longer attach to the current decompiled output of a live function. Use it to inspect or delete stale comments.

ColumnTypeWritableDescription
func_addrINTNoFunction address
func_nameTEXTNoCurrent function name for triage
eaINTNoStored orphan comment EA
comment_placementTEXTNoStored treeloc_t.itp placement
orphan_commentTEXTDelete-onlyStored orphan comment text

Rules:

  • UPDATE... SET orphan_comment = NULL or '' deletes that orphan comment.
  • Any non-empty write is rejected.

pseudocode_v_orphan_comment_groups

Grouped, read-only orphan triage surface. One row per function with orphan comments.

Columns: func_addr, func_name, orphan_count, orphan_comments_json

Comment Anchor Resolution (Critical)

Use this recipe before writing heading-style decompiler notes.

Rules:

  • Do not assume ea == func_addr.
  • The first displayed pseudocode row often has ea = 0 and is not the right write target.
  • One ea can map to multiple rows ({, statement, }); prefer a unique non-brace anchor.
  • For true function comments, update funcs.comment / funcs.rpt_comment instead of pseudocode.
-- Resolve the first attachable non-brace row near function start
SELECT line_num, ea, line
FROM pseudocode
WHERE func_addr = 0x401000
  AND ea != 0
  AND TRIM(line) NOT IN ('{', '}')
  AND ea IN (
    SELECT ea
    FROM pseudocode
    WHERE func_addr = 0x401000 AND ea != 0
    GROUP BY ea
    HAVING COUNT(*) = 1
  )
ORDER BY line_num
LIMIT 1;

-- Write a heading-style summary using the resolved ea
UPDATE pseudocode
SET comment_placement = 'block1',
    comment = 'One-paragraph summary of the function.'
WHERE func_addr = 0x401000
  AND ea = (
    SELECT ea
    FROM pseudocode
    WHERE func_addr = 0x401000
      AND ea != 0
      AND TRIM(line) NOT IN ('{', '}')
      AND ea IN (
        SELECT ea
        FROM pseudocode
        WHERE func_addr = 0x401000 AND ea != 0
        GROUP BY ea
        HAVING COUNT(*) = 1
      )
    ORDER BY line_num
    LIMIT 1
  );

ctree

Full Abstract Syntax Tree of decompiled code.

ColumnTypeDescription
func_addrINTFunction address
item_idINTUnique node ID
is_exprINT1=expression, 0=statement
op_nameTEXTNode type (cot_call, cit_if, etc.)
eaINTAddress in binary
parent_idINTParent node ID
depthINTTree depth
x_id, y_id, z_idINTChild node IDs
var_idxINTLocal variable index
var_nameTEXTVariable name
obj_eaINTTarget address
obj_nameTEXTSymbol name
num_valueINTNumeric literal
label_numINTLabel number when node defines a label
goto_label_numINTTarget label number for cit_goto nodes
str_valueTEXTString literal

ctree_lvars

Local variables from decompilation.

ColumnTypeDescription
func_addrINTFunction address
idxINTVariable index
nameTEXTVariable name
typeTEXTType string
commentTEXTLocal-variable comment shown next to declaration
sizeINTSize in bytes
is_argINT1=function argument
is_stk_varINT1=stack variable
stkoffINTStack offset

Mutation guidance:

  • Prefer idx-based updates for deterministic writes.
  • comment updates map to Hex-Rays local-variable comments (lv.cmt) and appear in decompile(...) output.

ctree_labels

Decompiler control-flow labels. Supports UPDATE (name) and mirrors label facilities on cfunc_t.

ColumnTypeRWDescription
func_addrINTRFunction address
label_numINTRLabel number (LABEL_<n>)
nameTEXTRWCurrent label name
item_idINTRBacking ctree item id for this label
item_eaINTRAddress of label-bearing ctree item
is_user_definedINTR1 if name differs from default LABEL_<n>

ctree_call_args

Flattened call arguments for easy querying.

ColumnTypeDescription
func_addrINTFunction address
call_item_idINTCall node ID
call_eaINTCall-site EA
call_obj_nameTEXTCallee object name
call_helper_nameTEXTCallee helper name
arg_idxINTArgument index (0-based)
arg_item_idINTArgument expression item ID
arg_opTEXTArgument type
arg_var_nameTEXTVariable name if applicable
arg_num_valueINTNumeric value
arg_str_valueTEXTString value

Decompiler Views

Pre-built views for common patterns (always filter by func_addr):

ViewPurpose
ctree_v_callsFunction calls with callee info
ctree_v_indirect_callsIndirect/dynamic call sites for call-site typing
pseudocode_v_orphan_comment_groupsGrouped orphan comment triage
ctree_v_loopsfor/while/do loops
ctree_v_ifsif statements
ctree_v_comparisonsComparisons with operands
ctree_v_assignmentsAssignments with operands
ctree_v_derefsPointer dereferences
ctree_v_returnsReturn statements with value details
ctree_v_calls_in_loopsCalls inside loops (recursive)
ctree_v_calls_in_ifsCalls inside if branches (recursive)
ctree_v_leaf_funcsFunctions with no outgoing calls
ctree_v_call_chainsCall chain paths up to depth 10

Type Tables and Views

For types, types_members, types_enum_values, types_func_args schemas, type views, and type CRUD examples, see types skill.


SQL Functions — Decompilation

When to use decompile() vs pseudocode table:

  • Read/show pseudocode -> always start with SELECT decompile(addr). Returns full function as one text block with per-line prefixes.
  • Local declaration hints -> declaration lines include compact local-variable index hints ([lv:N]) so rename operations can target rename_lvar(func_addr, N, new_name) safely.
  • Need fresh output after edits -> use SELECT decompile(addr, 1) to force re-decompilation.
  • Need structured line access or comment CRUD -> query/update the pseudocode table.
FunctionDescription
decompile(addr)PREFERRED -- Full pseudocode with line prefixes
decompile(addr, 1)Same output but forces re-decompilation
apply_callee_type(call_ea, decl)Apply a prototype to one call site
callee_type_at(call_ea)Read explicit call-site prototype when present
call_arg_addrs(call_ea)Read persisted argument-loader addresses as JSON
list_lvars(addr)List local variables as JSON
rename_lvar(func_addr, lvar_idx, new_name)Rename a local variable by index
rename_lvar_by_name(func_addr, old_name, new_name)Rename a local variable by existing name
rename_label(func_addr, label_num, new_name)Rename a decompiler label by label number
set_lvar_comment(func_addr, lvar_idx, text)Set local-variable comment by index
set_union_selection(func_addr, ea, path)Set/clear union selection path at EA
set_union_selection_item(func_addr, item_id, path)Set/clear union selection path by ctree.item_id
set_union_selection_ea_arg(func_addr, ea, arg_idx, path[, callee])PREFERRED call-arg targeting helper
call_arg_item(func_addr, ea, arg_idx[, callee])Resolve call-arg coordinate to explicit arg_item_id
ctree_item_at(func_addr, ea[, op_name[, nth]])Resolve generic expression coordinate to explicit ctree.item_id
set_union_selection_ea_expr(func_addr, ea, path[, op_name[, nth]])Set/clear union selection via generic expression coordinate
get_union_selection(func_addr, ea)Read union selection path JSON at EA
get_union_selection_item(func_addr, item_id)Read union selection path JSON by ctree.item_id
get_union_selection_ea_arg(func_addr, ea, arg_idx[, callee])Read union selection JSON via call-arg coordinate
get_union_selection_ea_expr(func_addr, ea[, op_name[, nth]])Read union selection JSON via generic expression coordinate
set_numform(func_addr, ea, opnum, spec)Set/clear numform directly by EA + operand index
get_numform(func_addr, ea, opnum)Read numform JSON directly by EA + operand index
set_numform_item(func_addr, item_id, opnum, spec)Set/clear numform by explicit ctree item id
get_numform_item(func_addr, item_id, opnum)Read numform JSON by explicit ctree item id
set_numform_ea_arg(func_addr, ea, arg_idx, opnum, spec[, callee])Set/clear numform via call-arg coordinate
get_numform_ea_arg(func_addr, ea, arg_idx, opnum[, callee])Read numform JSON via call-arg coordinate
set_numform_ea_expr(func_addr, ea, opnum, spec[, op_name[, nth]])Set/clear numform via generic expression coordinate
get_numform_ea_expr(func_addr, ea, opnum[, op_name[, nth]])Read numform JSON via generic expression coordinate

Targeting guidance:

  • Use *_ea_arg helpers for repeated callees and call-site arguments.
  • Use ctree_item_at(..., op_name, nth) plus *_ea_expr helpers for non-call expressions and assignment-side struct/union population stores.

SQL Functions — Modification

For set_name(), type_at(), set_type(), parse_decls() reference, see types skill.

Preferred SQL write surface for function metadata:

  • UPDATE funcs SET name = '...', prototype = '...', comment = '...', rpt_comment = '...' WHERE address =...
  • prototype maps to type_at/set_type behavior and invalidates decompiler cache.
  • comment / rpt_comment map to get_func_cmt() / set_func_cmt().

Performance Rules

TableArchitectureKey ConstraintNotes
pseudocodeCachedfunc_addrLazy per-function cache, freed after query
pseudocode_orphan_commentsCachedfunc_addrQuery-scoped orphan rows; writable delete-only
pseudocode_v_orphan_comment_groupsCachedfunc_addrQuery-scoped grouped orphan triage; start broad with LIMIT
ctreeGeneratorfunc_addrLazy streaming, never materializes full result, respects LIMIT
ctree_lvarsCachedfunc_addrLazy per-function cache, freed after query
ctree_call_argsGeneratorfunc_addrLazy streaming, respects LIMIT

Critical rules:

  • ALL decompiler tables require func_addr constraint. Without it, every function is decompiled.
  • Generator tables (ctree, ctree_call_args) stream rows lazily and stop at LIMIT.
  • Decompiler views (ctree_v_calls, ctree_v_indirect_calls, ctree_v_loops, etc.) inherit the func_addr constraint -- always filter.
  • Hex-Rays cfunc cache: decompile(addr) is internally cached. decompile(addr, 1) forces a full re-decompilation -- only use when you need to see effects of a mutation.

Cost model:

decompile(addr)          -> ~50-200ms first call, ~0ms cached
decompile(addr, 1)       -> ~50-200ms always (forces re-decompile)
ctree WHERE func_addr=X  -> one decompilation + streaming rows
ctree (no constraint)    -> N decompilations where N = func_qty()

Additional Resources

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.49%
按下载量换算26

Claude

32.49%
按下载量换算24

Cursor

17.84%
按下载量换算13

Gemini CLI

9.53%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills