hopper-debugger
它能做什么
这个技能让智能体查询 Hopper 反汇编器中编译后的 Mac 和 iPhone 程序文件,然后结合源代码、调试器和日志输出进行分析。适合调试原生应用的开发者。
适用场景
- ✓编译后的 macOS 或 iOS 应用崩溃,你需要查看其内部结构的时候。
- ✓你需要在二进制文件中查找 Objective-C 或 Swift 符号的时候。
- ✓你想把反汇编器、调试器和针对性测试结合起来使用的时候。
技能链接
https://github.com/steipete/agent-scripts/blob/main/skills/hopper-debugger/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请用 Hopper 找出这个 Mac 应用中处理崩溃的函数,并解释它的作用。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体通过 mcporter 连接 Hopper 服务器,每次请求都带上文档名称,然后用本地源代码、日志或小型测试来核对发现的结果。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Hopper Debugger
Use Hopper through mcporter as a queryable disassembler, then combine the result with local source, LLDB, logs, and focused repros.
Setup (one time)
Hopper 6.0+ ships its own MCP server. Do not install a third-party one.
mcporter config add hopper --scope home \
--command "/Applications/Hopper Disassembler.app/Contents/MacOS/HopperMCPServer" \
--description "Hopper Disassembler built-in MCP server (stdio)"
--scope home is required. The default scope is project, which writes config/mcporter.json into whatever repo you are standing in (untracked repo dirt, lost with the worktree).
Verify:
MCPORTER_LIST_TIMEOUT=25000 timeout 40 mcporter list hopper --brief
Call convention — the one that bites
Always pass arguments with --args. Never --params. mcporter accepts an unknown --params flag silently, drops the payload, and the call arrives with no arguments. Hopper then answers Document not found., which reads like a licensing or state problem and is not.
# WRONG — arguments silently dropped, fails with "Document not found."
mcporter call hopper.list_segments --params '{"document":"AppKit"}'
# RIGHT
mcporter call hopper.list_segments --args '{"document":"AppKit"}'
Related: the server does not fall back to the current document. A call with no document argument fails even when current_document returns a valid name. Pass document on every document-scoped call.
Document names come from list_documents and carry no .hop extension (window title AppKit.hop → document name AppKit).
If a call still fails, drive the server directly over stdio to see the raw JSON-RPC — this bypasses mcporter entirely and isolates who is at fault:
"/Applications/Hopper Disassembler.app/Contents/MacOS/HopperMCPServer" <<'EOF'
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"p","version":"1"}}}
{"jsonrpc":"2.0","method":"notifications/initialized"}
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"list_documents","arguments":{}}}
EOF
Licensing — do not misdiagnose
Hopper 6.x still uses the bundle id and preferences domain com.cryptic-apps.hopper-web-4. The absence of a hopper-web-6 domain does not mean the app is unlicensed. Check the real state in the About panel (Hopper Disassembler > About Hopper Disassembler); it prints the licensee, order id, and update-plan expiry. There is no Register/License menu item in Hopper 6.
Peter's license: order HOP140213-7833-95831, updates through 2027-05-17. The .hopperLicense file is in 1Password (Molty vault, document item "Hopper Disassembler License (HOP140213-7833-95831)"); load $one-password to retrieve it. Opening a .hopperLicense file with Hopper does not register it — Hopper disassembles it as a document.
Opening documents
open -a "Hopper Disassembler" /path/to/Binary
Small binaries import with no dialog. Large frameworks take minutes; poll instead of sleeping:
until mcporter call hopper.list_documents --output json 2>/dev/null | grep -qi "appkit"; do sleep 10; done
Dismiss any first-open dialog with an Accessibility press, never a synthetic click — clicking moves Peter's physical pointer:
osascript -e 'tell application "System Events" to tell process "Hopper Disassembler" to perform action "AXPress" of (button 1 of window 1)'
Apple frameworks
Apple frameworks live in the dyld shared cache, not on disk. Two routes:
- Prefer Peter's pre-made exports at
~/Library/CloudStorage/Dropbox/Hopper/—.hopdocuments plus.mpseudo-code dumps for AppKit, AccessibilityKit, and others. Grepping the.mis often faster than any MCP round-trip (AppKit.mis 244 MB). Check provenance before trusting them for version work. These are snapshots; as of 2026-08 they predate macOS 26.6 and 27.0, and their class/method inventory differs from both live runtimes. Good for structure, unreliable for OS-version diffing. - Extract fresh with
/usr/lib/dsc_extractor.bundle(present on macOS; extracts all dylibs, multi-GB, slow).
Query workflow
- Start from the local source path or runtime symbol you are trying to explain.
- Find the symbol, then inspect one small target at a time:
mcporter call hopper.search_procedures --args '{"document":"AppKit","pattern":"addCursorRect"}' --output json
mcpor
常见问题
请求必须包含什么?
参数必须通过 args 选项传递,因为 params 选项会被悄悄忽略。
需要第三方服务器吗?
不需要。Hopper 6.0 及更高版本自带 MCP 服务器,技能说明不要再安装其他服务器。
服务器会自动选择文档吗?
不会。即使有文档已打开,不带文档名称的调用也会失败。
详情
作者的原始描述
Hopper debugging: macOS/iOS binaries, ObjC/Swift symbols, dyld, LLDB.
repo: steipete/agent-scripts
热度
- GitHub 星标
- 7.4k
- 排名
- #13232
- 许可证
- MIT
- 更新时间
- 2026/10/30
评论
- …
同一仓库的更多技能
beeper
7.4k帮你的智能体搜索本地 Beeper 聊天记录,找到消息,并判断模糊线索指的是哪个聊天或联系人。
cloudflare-registrar
7.4k帮你的智能体查询 Cloudflare Registrar 的域名价格和可用性,并在确认后注册或列出域名。
codexbar
7.4k帮你的智能体查看你在 Codex、Claude、Kimi 等 AI 服务中还剩多少用量,包括限额、额度和重置时间。
create-cli
7.4k帮你的智能体设计命令行工具的命令、参数、帮助文本、输出和错误提示,让人和脚本都能顺利使用。