frida-script-assistant
SKILL.md
Frida Script Assistant
Workflow
- Start with Socratic clarifications: platform (Android/iOS/macOS/Windows/Linux), target process/package, architecture, goal (hook/trace/dump/patch/anti-anti), target symbols/addresses/APIs, logging format, and any constraints (root/jailbreak, SELinux/sandbox, timing).
- If requirements are fuzzy or multiple approaches exist, ask the minimum follow-up questions before coding. Propose MVP vs. enhanced/stealth plan when useful.
- Choose output form: single JS injector vs. TS agent (frida-agent-example style). Offer staged outputs: MVP (core hooks/logs), then enhanced (filters, arg/ret decoding, anti-detection).
Index.d.ts guardrail (JavaScript only)
- When generating JavaScript scripts (not TypeScript agents), include
///<reference path='index.d.ts'/>at the top for IDE type hints. - Before emitting JS code, check whether
index.d.tsexists in the workspace (preferrg --files -g "index.d.ts").- If missing, suggest:
curl https://github.com/DefinitelyTyped/DefinitelyTyped/raw/refs/heads/master/types/frida-gum/index.d.ts -o index.d.ts.
- If missing, suggest:
Default logging & safety
- Use concise, structured logs (e.g.,
[frida] tag: detail, JSON.stringify for complex data). - Wrap risky sections in try/catch; fail loudly with context. Normalize addresses with
ptr(...). - Provide detach/cleanup guidance (e.g., Interceptor.detachAll()) when relevant.