vichhka-git/renef-skills
GitHub: vichhka-git/renef-skills
一个让 AI 智能体掌握 renef Android 动态插桩引擎精确语法和工作流的 Agent Skill 插件,避免生成不兼容的脚本代码。
Stars: 8 | Forks: 0
# renef-skills
一个 [Claude Code](https://claude.com/claude-code) **插件**,让 AI 智能体能够**正确操作
[renef.io](https://renef.io)** —— 这是一个用于 **Android
ARM64** 的动态插桩引擎:通过 **Lua 5.4** 脚本 hook 原生和 Java 函数,扫描/读取/写入/修补进程内存,追踪 syscalls,
绕过 SSL pinning / root 检测(基于 memfd 注入,无 ptrace)。
这是一份操作手册,而不是教程。已经懂得编写 Frida hooks、
GameGuardian (`gg.*`) 作弊脚本或游戏破解 Lua 脚本的智能体本身已经具备了这些*概念* —— 它只是缺少 renef 确切的
**语法和工作流**,如果不了解这些,它可能会生成 Frida JavaScript、带点号的 Java 类名、绝对的
hook 地址、`retval.replace()` 或 `gg.*` 调用,而这些在 renef 中全都行不通。该技能为智能体提供了精确的
**语法契约**、一个可在其自身脚本上运行的 **自检(self-lint)**、一个 **任务 →
指南(playbook)** 映射表、来自其他工具的转换表,以及可直接复制粘贴的方案。
## 包含内容
```
renef-skills/
├── .claude-plugin/
│ └── plugin.json # plugin manifest
├── CONTRIBUTING.md # how to contribute VERIFIED findings (no confidential target data)
└── skills/
└── renef/
├── SKILL.md # operator framing: roles, syntax contract, self-lint, task playbook
├── probe.lua # RUN FIRST — ground-truths the API/behavior of your renef build
└── references/
├── methodology.md # the investigation loop: solve a NEW bypass yourself
├── debugging.md # renef hides errors — recover them; failure-symptom table; hot-hook race; RASP
├── lua-api.md # full Lua API: Module/Memory/hook/Jni/Java/Thread/File/Syscall/OS/KCov
├── cli.md # commands, flags, connection modes, build/deploy, companion tools
├── from-other-tools.md # translate Frida JS + GameGuardian (gg.*) / game-hacking Lua → renef
├── recipes.md # worked examples: SSL/root bypass, WebView, tracing, memory, CTF…
└── gotchas.md # pitfalls, doc/runtime discrepancies, troubleshooting
```
该技能使用了**渐进式披露(progressive disclosure)**:`SKILL.md` 保持精简(当任务涉及 renef 时模型会加载它),
而更大的参考文件只会在需要时才被引入。
## 安装
这是一个标准的 **Agent Skill**(带有 `name` + `description` frontmatter 的 `SKILL.md`)。它
会被**按需加载** —— 智能体会看到该技能的描述,并且仅当任务涉及 renef 时才会引入完整内容。
### Claude Code 与 OpenCode(推荐)
```
# 全局 — 在你的所有项目中均可用,适用于 Claude Code 和 OpenCode:
mkdir -p ~/.claude/skills && cp -r skills/renef ~/.claude/skills/renef
# 或者按项目:
mkdir -p .claude/skills && cp -r skills/renef .claude/skills/renef
```
然后只需描述一个 renef 任务 —— 该技能会自动激活(在 OpenCode 中,它通过原生的
`skill` 工具暴露)。
如果你更喜欢的话,**OpenCode 原生位置**同样适用:`.opencode/skills/renef/SKILL.md`
(项目级)或 `~/.config/opencode/skills/renef/SKILL.md`(全局)。OpenCode 还会额外扫描
`.agents/skills/` 和 `~/.agents/skills/`。
### 作为插件使用 Claude Code
将此仓库添加为插件源(或添加到你控制的市场中)并启用 `renef` 插件 ——
内置的技能会自动注册。(`.claude-plugin/plugin.json` 是清单文件。)
### 其他智能体(Cursor、Aider、Cline、Codex 等)
技能自动发现尚未完全普及。有两种可移植的选项:
1. **将智能体指向此仓库** —— `AGENTS.md`(许多智能体会读取它,包括 OpenCode/Cursor/Zed)
引导它了解项目,并告知它去读取 `skills/renef/SKILL.md`。
2. 在智能体的规则/指令中**直接引用该 Markdown**(例如在 Cursor 的
`.cursor/rules/*.mdc` 中包含 `skills/renef/SKILL.md`)。该内容是纯 Markdown。
## 用法
只需描述任务 —— 该技能会在涉及 renef 相关工作时触发:
- "编写一个 renef 脚本来绕过 com.example.app 中的 SSL pinning"
- "将这个 Frida 脚本移植到 renef"
- "Hook libapp.so 中的原生 `verify` 函数并记录其参数"
- "使用 renef-strace 监视此应用中的文件访问"
## 范围与道德规范
Renef 针对 **Android ARM64**,仅用于授权的安全测试、应用加固审查、CTF,
以及对你拥有或获得许可分析的软件进行逆向工程。请遵守适用法律和
目标应用的服务条款。
## 致谢
- **renef** 作者 [@ahmeth4n](https://github.com/Ahmeth4n/renef) —— Apache-2.0。文档:https://renef.io
- 社区 hooks:https://hook.renef.io · r2 插件:https://github.com/ahmeth4n/r2renef ·
自动部署模块:https://github.com/vichhka-git/magisk-renef
此插件仅包含文档/说明;它不提供任何 renef 二进制文件。
标签:AI智能体插件, Claude Code, Lua脚本, SSL Pinning绕过, 内存修改, 安卓逆向分析, 游戏安全, 防御加固