[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DDV3V1R7XNPRF8J4VQJERX":3,"skill-same:01M6DDV3V1R7XNPRF8J4VQJERX":73},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":14,"repositoryHtmlUrl":46,"repositoryHomepageUrl":6,"ownerHtmlUrl":47,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":48,"install":49,"resources":62},"01M6DDV3V1R7XNPRF8J4VQJERX","bc-drive-plus",null,"Use when driving a LIVE Battle Cats (jp.co.ponos.battlecatsen, EN 15.4.1) on rooted BlueStacks beyond bc-drive. Adds bounded one-shot touch-dispatch capture to resolve the stripped NewButton ctor RVA, OmniParser V2 set-of-mark grounding for the DOM-less GLES canvas, minitouch\u002Fevdev low-latency input, and a save-snapshot ring with auto-rollback. Needs adb + frida-server; builds on bc-drive and bcsfe-save-roundtrip.","Prekzursil\u002Fagent-skills-toolchain","Prekzursil","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F54636077?v=4","01M6DACZ1PCQHD99SCR1YXG28B","Andrei Mihai Visalon","01M6DACZ670WZF535V3WYYSS4Z",0,"MIT","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Fskills\u002Fbc-drive-plus\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"bc drive","bc drive plus","drive","auto","jp","live","latency","adb","en","dispatch","canvas","use","snapshot","capture","rollback","save","SET","frida","server","2026-11-10 10:12:30",false,"---\nname: bc-drive-plus\ndescription: Use when driving a LIVE Battle Cats (jp.co.ponos.battlecatsen, EN 15.4.1) on rooted BlueStacks beyond bc-drive. Adds bounded one-shot touch-dispatch capture to resolve the stripped NewButton ctor RVA, OmniParser V2 set-of-mark grounding for the DOM-less GLES canvas, minitouch\u002Fevdev low-latency input, and a save-snapshot ring with auto-rollback. Needs adb + frida-server; builds on bc-drive and bcsfe-save-roundtrip.\nlicense: MIT\n---\n\n# bc-drive-plus — advanced Battle Cats driving (dispatch-capture · grounding · input · snapshot-ring)\n\n> Additive layer over **`bc-drive`** (read the base skill first). Same target: a\n> **live** Battle Cats EN **15.4.1**, x86_64 `libnative-lib.so`, on BlueStacks\n> (`adb 127.0.0.1:5555`, frida 17.11.0). Every enhancement rides the existing\n> bus — the one-shot-NativeFunction \u002F OS-tap \u002F screenshot discipline — and **never**\n> reintroduces a per-frame render hook (which crashes BC on scene transitions).\n\n## The four enhancements\n\n| # | Capability | File \u002F status | Risk |\n|---|---|---|---|\n| 1 | Bounded one-shot **dispatch-capture** (recover stripped `NewButton` ctor RVA) | `dispatch_capture.py` ✅ built + unit-tested; live run needs device | live-frida input-path hook — **thread-selection safety honored** |\n| 2 | **OmniParser V2 set-of-mark** grounding for the GLES canvas | recipe below (ADOPT) — rides `adb screencap` bus | read-only (screenshot) |\n| 3 | **minitouch\u002Fevdev** low-latency input | recipe below (ADOPT) — falls back to `adb tap` | actuation only on safe menu nav |\n| 4 | Save-**snapshot ring** + auto-rollback (HGT-safe-restore) | `snapshot_ring.py` ✅ built + unit-tested; live run needs device | stateful save write — **auto-rollback shadow-by-default** |\n\nShadow-mode is the universal discipline (council C5): any **automated \u002F stateful**\naction defaults to OBSERVE-only (log \"would do X\", mutate nothing); only an\n**explicit operator command** actuates. Nothing here blocks or nags.\n\n---\n\n## 1 · Bounded one-shot dispatch-capture (`dispatch_capture.py`)\n\n**Closes bc-drive open gap #1.** bc-drive documented that the `NewButton` class is\nknown from RTTI in `.rodata` (callback `void(NewButton*, NewButtonChangeState)`,\nvtable RVA `0xBED598`) but its **constructor RVA is unresolved** because the game's\nown C++ symbols are stripped. This module recovers the runtime evidence to resolve\nit, **without** a per-frame hook.\n\n### Mechanism\nThe touch-dispatch function is already resolved read-only by bc-drive:\n`0x668C70 == getGlobal()->vtable[+0x40]`. It fires **only on touch events** (not per\nframe). We attach a **single-shot** `Interceptor` to it; on the **first** tap we\ncapture — minimally — `(phase, x, y, pid)`, the return address (caller RVA), and a\nshort **accurate backtrace** (module-relative RVAs), emit them **asynchronously**,\nthen **detach**. With the known NewButton vtable RVA and (optionally) the touched\nnode's own vtable, an **offline xref pass** localizes the ctor.\n\nHonest boundary: the module yields the **evidence** (caller RVAs ranked by\nfrequency + any hit-node vtable RVA + a match flag against `0xBED598`); the final\nctor RVA is **confirmed** by the documented offline step below — it is not\nhallucinated as a printed number.\n\n### Offline follow-up to confirm the ctor RVA\n1. In Ghidra\u002FIDA on the pinned 15.4.1 `libnative-lib.so`, go to the NewButton\n   vtable RVA `0xBED598` (from RTTI).\n2. Find the function that **stores** that vtable into a fresh object\n   (`mov [obj], \u003Cvtable_addr>`) — that is the `NewButton` constructor.\n3. Cross-check it against the `caller_rvas_ranked` list from the capture (the live\n   `dispatch → widget callback` path). If `hit_node_matches_newbutton_vtable` is\n   true, `node_ptr` is a **live** NewButton and its ctor is the storer of its vtable.\n4. Feed the confirmed ctor RVA back into bc-drive's `capture \u003CctorRVA> \u003Cms>` to dump\n   live button objects + candidate rect floats (its infra was built and ready).\n\n### THREAD-SELECTION SAFETY (the flagged live-frida risk — how it is honored)\nThe touch dispatcher runs on the game's **UI\u002Finput thread**. An `Interceptor`\ncallback runs **on that same thread**. The safety rules baked in:\n- **No synchronous host RPC inside `onEnter`.** A blocking `recv()`\u002FRPC would stall\n  the input thread → ANR\u002Fcrash. The agent uses **only async `send()`**. *This is the\n  thread-selection flag.*\n- **Single-shot.** The agent self-limits to `max_hits` (default **1**); the driver\n  detaches the instant the cap is hit.\n- **Scene-guarded.** `arm_and_capture` **refuses** to arm unless `scene` is in the\n  out-of-battle menu cluster (`97..101`). It will **never** hook the input path\n  mid-battle (hot, timing-sensitive). Scene is read via bc-drive's on-demand\n  `scene` — if it can't be read, the guard **refuses** (fail-safe).\n- **Hard timeout.** The driver auto-detaches after `timeout_ms` even if no touch\n  arrives, so a hook is never left live.\n- **Not a per-frame hook.** `0x668C70` ≠ the render path `appUpdateDraw @0x33F7E0`.\n\n### Usage\n```\npython dispatch_capture.py show               # print the generated single-shot agent JS\npython dispatch_capture.py capture 6000        # SHADOW: arm 1-shot, YOU tap once (6 s window)\npython dispatch_capture.py capture 6000 955 665 # ARMED: arm + drive ONE safe menu tap as trigger\n```\nShadow (`capture \u003Cms>`) hooks + records and waits for **your** manual tap — it never\nactuates. Passing `\u003Cx> \u003Cy>` is an explicit operator-armed run that drives one safe\nmenu tap. Output includes `ctor_evidence` (ranked caller RVAs + node-vtable match +\nthe exact offline follow-up). Env: `BC_ADB`, `BC_SERIAL`, `BC_DC_SINK` (bounded\nrotating shadow log). Optional `node_field_off` (Python API) reads a candidate\nhit-node pointer off arg0 and reports its vtable RVA directly.\n\n---\n\n## 2 · OmniParser V2 set-of-mark grounding (ADOPT recipe)\n\nBC's canvas is a **DOM-less custom GLES surface** — there is no accessibility tree to\nquery, so bc-drive identifies screens by **screenshot + vision** and carries a\nhand-curated per-screen widget-rect map. **Set-of-Mark (SoM)** grounding upgrades\nthis: overlay **numbered marks** on detected interactive regions so the model refers\nto \"tap **7**\" instead of guessing pixel coordinates (the technique that lifts GUI\ngrounding accuracy on canvas UIs).\n\nRides the existing bus — the input is bc-drive's `adb exec-out screencap`; the output\nmaps mark-number → **device-px rect** (1920×1080), reusing bc-drive's `metrics`\ndevice↔drawable scale (×1.6875) for drawable back-projection.\n\n**Adopt (local, GPU-optional):**\n```bash\n# OmniParser V2 (MIT) = YOLO icon\u002Fbox detector + a caption model. Run on cloud-hub\n# GPU or locally; feed it the bc-drive screenshot, get boxes back, number them.\npip install ultralytics  # icon detector backbone\n# weights: microsoft\u002FOmniParser-v2.0 (HF)  ->  hf_hub_download\n```\nPipeline: `bc_drive.py screenshot` → OmniParser detect → number boxes top-left→\nbottom-right → build `{mark: {device_px:[cx,cy], rect:[...], drawable:[...]}}` → the\noperator\u002Fmodel picks a mark → `bc_drive.py tap \u003Ccx> \u003Ccy>`. Status: **documented ADOPT,\nnot yet wired to a live model here** (honest — grounding accuracy must be validated\nagainst real BC screens before it supersedes the curated `SCREENS` map). Until then\nbc-drive's screenshot-derived map remains the source of truth; SoM is the roadmap to\ngeneralize beyond the three hand-mapped screens.\n\n---\n\n## 3 · minitouch \u002F evdev low-latency input (ADOPT recipe)\n\nbc-drive actuates with `adb shell input tap`, which **spawns a process per tap**\n(~tens–hundreds of ms). For faster\u002Fsmoother sequences (swipes, multi-tap), a\npersistent low-latency channel helps:\n- **minitouch** — a tiny daemon writing directly to the touch `evdev` node; open one\n  socket and stream `d`\u002F`m`\u002F`u` commands (down\u002Fmove\u002Fup) with sub-ms dispatch.\n- **raw evdev** — `su -c` write `EV_ABS`\u002F`EV_KEY` events to `\u002Fdev\u002Finput\u002FeventX`.\n\n**Adopt:**\n```bash\n# push a prebuilt minitouch matching the emulator ABI (x86_64), then:\nadb -s 127.0.0.1:5555 push minitouch \u002Fdata\u002Flocal\u002Ftmp\u002F && adb shell chmod 755 \u002Fdata\u002Flocal\u002Ftmp\u002Fminitouch\nadb shell \"\u002Fdata\u002Flocal\u002Ftmp\u002Fminitouch -i\"     # prints max-contacts + coordinate bounds\n# stream: printf 'd 0 \u003Cx> \u003Cy> 50\\nc\\nu 0\\nc\\n' | nc \u003Cminitouch socket>\n```\nCoordinate space: minitouch\u002Fevdev use the **touch device's** ABS range, which may\ndiffer from the 1920×1080 display px — read the bounds from `minitouch -i` and scale\nbc-drive's device-px targets into that range. Status: **documented ADOPT with an\n`adb tap` fallback** — the safety envelope is unchanged (taps only on safe menu\nnavigation; never gacha \"Draw\", stage \"Start\" confirm, or anything spending\ncurrency). Latency is an optimization, not a correctness requirement, so `adb tap`\nstays the default until minitouch is bound for the specific BlueStacks build.\n\n---\n\n## 4 · Save-snapshot ring + auto-rollback (`snapshot_ring.py`)\n\nEncodes the **HGT-safe-restore** discipline from `bcsfe-save-roundtrip` as\nautomation: keep a **bounded rotating ring** of known-good pre-edit `SAVE_DATA`\nsnapshots so **any** broken\u002Fsuspect state can be rolled back to the last verified\nsave. (\"HGT\" = the anti-cheat ban trap; the guard is: always be able to restore a\nclean, pre-edit save.)\n\nRides the bcsfe bus exactly (do not reinvent):\n- **Pull** after a `KEYCODE_HOME` flush (backgrounding flushes RAM→disk; `force-stop`\n  does **not** flush).\n- **Restore** in place via `cat >` so the **inode + owner (uid 10065) + SELinux\n  `app_data_file` context** survive; **`am force-stop` FIRST** so autosave can't race;\n  **`md5sum` verify** device == snapshot after.\n- **Empty-wipe trap:** a 0-byte\u002Fshort read is **never** stored as good and **never**\n  pushed back (the MSYS `d41d8cd9…` wipe class). `MIN_SAVE_BYTES` gates both ends; a\n  backup whose on-disk md5 ≠ recorded md5 is refused before any push.\n\n### Shadow vs enforce (council C5)\n- `snapshot` (read-only pull) and an **explicit** `rollback` are always **real**.\n- **Automatic** rollback (`auto_rollback(is_broken)`) defaults to **SHADOW**: if the\n  health probe says broken, it **logs** which snapshot it *would* restore and mutates\n  nothing. Only `enforce=True` actually restores. A flaky probe that raises is treated\n  as **not broken** (never triggers a destructive restore on its own error).\n\n### Usage\n```\npython snapshot_ring.py snap [label]      # flush+pull a byte-exact snapshot into the ring\npython snapshot_ring.py list              # ring contents, newest first\npython snapshot_ring.py rollback [index]  # EXPLICIT restore (index from `list`; default newest good)\npython snapshot_ring.py verify            # md5 device vs newest snapshot\npython snapshot_ring.py prune             # enforce capacity + drop orphan files\n```\nEnv: `BC_ADB`, `BC_SERIAL`, `BC_RING_DIR` (default `\u003Cskill>\u002F.save-ring`),\n`BC_RING_CAP` (default 10). Python API: `SnapshotRing(io, ring_dir).auto_rollback(\nprobe, enforce=False)` for a shadow health-guard loop; inject a custom `SaveIO` for\ntesting or a non-adb transport.\n\n> **Live-game care (inherited):** read-only discovery is safe; prefer reversible\n> save-edits over forcing unverified in-memory fields. On a broken state: **kill all\n> hooks + restart BC first**, *then* `rollback` to the newest verified snapshot.\n\n---\n\n## What works vs what's inferred (honesty ledger)\n\n| Capability | Status |\n|---|---|\n| `dispatch_capture` agent-JS generation (valid JS, single-shot, no sync RPC) | ✅ unit-tested (`node --check` clean) |\n| Scene guard refuses to arm outside menu cluster | ✅ unit-tested |\n| Single-shot detach + hard-timeout detach (hook never left live) | ✅ unit-tested (fake device) |\n| Shadow = no auto-tap; explicit arm fires exactly one tap | ✅ unit-tested |\n| `resolve_ctor_candidates` ranks caller RVAs + flags vtable match | ✅ unit-tested |\n| **Live** dispatch-capture on a running BC + actual ctor RVA | ⚠️ needs a device run + the offline xref step (documented) |\n| Snapshot ring rotation, corruption guard, integrity-gated rollback | ✅ unit-tested (fake SaveIO) |\n| Shadow auto-rollback logs-not-mutates; flaky probe is safe | ✅ unit-tested |\n| **Live** pull\u002Frestore round-trip (inode\u002Fuid\u002FSELinux preserved) | ⚠️ needs a device run (rides proven bcsfe recipe) |\n| OmniParser V2 set-of-mark grounding | ? documented ADOPT recipe; not yet wired to a live model |\n| minitouch\u002Fevdev low-latency input | ? documented ADOPT recipe; `adb tap` remains default |\n\n## Files\n- `dispatch_capture.py` — bounded single-shot touch-dispatch capture + ctor-evidence resolver + CLI.\n- `snapshot_ring.py` — save-snapshot ring + HGT-safe auto-rollback + CLI.\n- (grounding + input are ADOPT recipes above; they ride bc-drive's screenshot\u002Fadb bus.)\n\n## Safety summary\nRead-mostly. Zero per-frame hooks. The one input-path hook is single-shot,\nscene-guarded, hard-timeout-bounded, and async-only (thread-selection safe). Save\nwrites are inode\u002Fcontext-preserving, force-stop-guarded, md5-verified, and\nempty-wipe-guarded; automated rollback is shadow-by-default. Taps only on safe menu\nnavigation — never gacha \"Draw\", stage \"Start\" confirm, or anything that spends\ncurrency or alters the save.\n","# bc-drive-plus — advanced Battle Cats driving (dispatch-capture · grounding · input · snapshot-ring)\n\n> Additive layer over **`bc-drive`** (read the base skill first). Same target: a\n> **live** Battle Cats EN **15.4.1**, x86_64 `libnative-lib.so`, on BlueStacks\n> (`adb 127.0.0.1:5555`, frida 17.11.0). Every enhancement rides the existing\n> bus — the one-shot-NativeFunction \u002F OS-tap \u002F screenshot discipline — and **never**\n> reintroduces a per-frame render hook (which crashes BC on scene transitions).\n\n## The four enhancements\n\n| # | Capability | File \u002F status | Risk |\n|---|---|---|---|\n| 1 | Bounded one-shot **dispatch-capture** (recover stripped `NewButton` ctor RVA) | `dispatch_capture.py` ✅ built + unit-tested; live run needs device | live-frida input-path hook — **thread-selection safety honored** |\n| 2 | **OmniParser V2 set-of-mark** grounding for the GLES canvas | recipe below (ADOPT) — rides `adb screencap` bus | read-only (screenshot) |\n| 3 | **minitouch\u002Fevdev** low-latency input | recipe below (ADOPT) — falls back to `adb tap` | actuation only on safe menu nav |\n| 4 | Save-**snapshot ring** + auto-rollback (HGT-safe-restore) | `snapshot_ring.py` ✅ built + unit-tested; live run needs device | stateful save write — **auto-rollback shadow-by-default** |\n\nShadow-mode is the universal discipline (council C5): any **automated \u002F stateful**\naction defaults to OBSERVE-only (log \"would do X\", mutate nothing); only an\n**explicit operator command** actuates. Nothing here blocks or nags.\n\n---\n\n## 1 · Bounded one-shot dispatch-capture (`dispatch_capture.py`)\n\n**Closes bc-drive open gap #1.** bc-drive documented that the `NewButton` class is\nknown from RTTI in `.rodata` (callback `void(NewButton*, NewButtonChangeState)`,\nvtable RVA `0xBED598`) but its **constructor RVA is unresolved** because the game's\nown C++ symbols are stripped. This module recovers the runtime evidence to resolve\nit, **without** a per-frame hook.\n\n### Mechanism\nThe touch-dispatch function is already resolved read-only by bc-drive:\n`0x668C70 == getGlobal()->vtable[+0x40]`. It fires **only on touch events** (not per\nframe). We attach a **single-shot** `Interceptor` to it; on the **first** tap we\ncapture — minimally — `(phase, x, y, pid)`, the return address (caller RVA), and a\nshort **accurate backtrace** (module-relative RVAs), emit them **asynchronously**,\nthen **detach**. With the known NewButton vtable RVA and (optionally) the touched\nnode's own vtable, an **offline xref pass** localizes the ctor.\n\nHonest boundary: the module yields the **evidence** (caller RVAs ranked by\nfrequency + any hit-node vtable RVA + a match flag against `0xBED598`); the final\nctor RVA is **confirmed** by the documented offline step below — it is not\nhallucinated as a printed number.\n\n### Offline follow-up to confirm the ctor RVA\n1. In Ghidra\u002FIDA on the pinned 15.4.1 `libnative-lib.so`, go to the NewButton\n   vtable RVA `0xBED598` (from RTTI).\n2. Find the function that **stores** that vtable into a fresh object\n   (`mov [obj], \u003Cvtable_addr>`) — that is the `NewButton` constructor.\n3. Cross-check it against the `caller_rvas_ranked` list from the capture (the live\n   `dispatch → widget callback` path). If `hit_node_matches_newbutton_vtable` is\n   true, `node_ptr` is a **live** NewButton and its ctor is the storer of its vtable.\n4. Feed the confirmed ctor RVA back into bc-drive's `capture \u003CctorRVA> \u003Cms>` to dump\n   live button objects + candidate rect floats (its infra was built and ready).\n\n### THREAD-SELECTION SAFETY (the flagged live-frida risk — how it is honored)\nThe touch dispatcher runs on the game's **UI\u002Finput thread**. An `Interceptor`\ncallback runs **on that same thread**. The safety rules baked in:\n- **No synchronous host RPC inside `onEnter`.** A blocking `recv()`\u002FRPC would stall\n  the input thread → ANR\u002Fcrash. The agent uses **only async `send()`**. *This is the\n  thread-selection flag.*\n- **Single-shot.** The agent self-limits to `max_hits` (default **1**); the driver\n  detaches the instant the cap is hit.\n- **Scene-guarded.** `arm_and_capture` **refuses** to arm unless `scene` is in the\n  out-of-battle menu cluster (`97..101`). It will **never** hook the input path\n  mid-battle (hot, timing-sensitive). Scene is read via bc-drive's on-demand\n  `scene` — if it can't be read, the guard **refuses** (fail-safe).\n- **Hard timeout.** The driver auto-detaches after `timeout_ms` even if no touch\n  arrives, so a hook is never left live.\n- **Not a per-frame hook.** `0x668C70` ≠ the render path `appUpdateDraw @0x33F7E0`.\n\n### Usage\n```\npython dispatch_capture.py show               # print the generated single-shot agent JS\npython dispatch_capture.py capture 6000        # SHADOW: arm 1-shot, YOU tap once (6 s window)\npython dispatch_capture.py capture 6000 955 665 # ARMED: arm + drive ONE safe menu tap as trigger\n```\nShadow (`capture \u003Cms>`) hooks + records and waits for **your** manual tap — it never\nactuates. Passing `\u003Cx> \u003Cy>` is an explicit operator-armed run that drives one safe\nmenu tap. Output includes `ctor_evidence` (ranked caller RVAs + node-vtable match +\nthe exact offline follow-up). Env: `BC_ADB`, `BC_SERIAL`, `BC_DC_SINK` (bounded\nrotating shadow log). Optional `node_field_off` (Python API) reads a candidate\nhit-node pointer off arg0 and reports its vtable RVA directly.\n\n---\n\n## 2 · OmniParser V2 set-of-mark grounding (ADOPT recipe)\n\nBC's canvas is a **DOM-less custom GLES surface** — there is no accessibility tree to\nquery, so bc-drive identifies screens by **screenshot + vision** and carries a\nhand-curated per-screen widget-rect map. **Set-of-Mark (SoM)** grounding upgrades\nthis: overlay **numbered marks** on detected interactive regions so the model refers\nto \"tap **7**\" instead of guessing pixel coordinates (the technique that lifts GUI\ngrounding accuracy on canvas UIs).\n\nRides the existing bus — the input is bc-drive's `adb exec-out screencap`; the output\nmaps mark-number → **device-px rect** (1920×1080), reusing bc-drive's `metrics`\ndevice↔drawable scale (×1.6875) for drawable back-projection.\n\n**Adopt (local, GPU-optional):**\n```bash\n# OmniParser V2 (MIT) = YOLO icon\u002Fbox detector + a caption model. Run on cloud-hub\n# GPU or locally; feed it the bc-drive screenshot, get boxes back, number them.\npip install ultralytics  # icon detector backbone\n# weights: microsoft\u002FOmniParser-v2.0 (HF)  ->  hf_hub_download\n```\nPipeline: `bc_drive.py screenshot` → OmniParser detect → number boxes top-left→\nbottom-right → build `{mark: {device_px:[cx,cy], rect:[...], drawable:[...]}}` → the\noperator\u002Fmodel picks a mark → `bc_drive.py tap \u003Ccx> \u003Ccy>`. Status: **documented ADOPT,\nnot yet wired to a live model here** (honest — grounding accuracy must be validated\nagainst real BC screens before it supersedes the curated `SCREENS` map). Until then\nbc-drive's screenshot-derived map remains the source of truth; SoM is the roadmap to\ngeneralize beyond the three hand-mapped screens.\n\n---\n\n## 3 · minitouch \u002F evdev low-latency input (ADOPT recipe)\n\nbc-drive actuates with `adb shell input tap`, which **spawns a process per tap**\n(~tens–hundreds of ms). For faster\u002Fsmoother sequences (swipes, multi-tap), a\npersistent low-latency channel helps:\n- **minitouch** — a tiny daemon writing directly to the touch `evdev` node; open one\n  socket and stream `d`\u002F`m`\u002F`u` commands (down\u002Fmove\u002Fup) with sub-ms dispatch.\n- **raw evdev** — `su -c` write `EV_ABS`\u002F`EV_KEY` events to `\u002Fdev\u002Finput\u002FeventX`.\n\n**Adopt:**\n```bash\n# push a prebuilt minitouch matching the emulator ABI (x86_64), then:\nadb -s 127.0.0.1:5555 push minitouch \u002Fdata\u002Flocal\u002Ftmp\u002F && adb shell chmod 755 \u002Fdata\u002Flocal\u002Ftmp\u002Fminitouch\nadb shell \"\u002Fdata\u002Flocal\u002Ftmp\u002Fminitouch -i\"     # prints max-contacts + coordinate bounds\n# stream: printf 'd 0 \u003Cx> \u003Cy> 50\\nc\\nu 0\\nc\\n' | nc \u003Cminitouch socket>\n```\nCoordinate space: minitouch\u002Fevdev use the **touch device's** ABS range, which may\ndiffer from the 1920×1080 display px — read the bounds from `minitouch -i` and scale\nbc-drive's device-px targets into that range. Status: **documented ADOPT with an\n`adb tap` fallback** — the safety envelope is unchanged (taps only on safe menu\nnavigation; never gacha \"Draw\", stage \"Start\" confirm, or anything spending\ncurrency). Latency is an optimization, not a correctness requirement, so `adb tap`\nstays the default until minitouch is bound for the specific BlueStacks build.\n\n---\n\n## 4 · Save-snapshot ring + auto-rollback (`snapshot_ring.py`)\n\nEncodes the **HGT-safe-restore** discipline from `bcsfe-save-roundtrip` as\nautomation: keep a **bounded rotating ring** of known-good pre-edit `SAVE_DATA`\nsnapshots so **any** broken\u002Fsuspect state can be rolled back to the last verified\nsave. (\"HGT\" = the anti-cheat ban trap; the guard is: always be able to restore a\nclean, pre-edit save.)\n\nRides the bcsfe bus exactly (do not reinvent):\n- **Pull** after a `KEYCODE_HOME` flush (backgrounding flushes RAM→disk; `force-stop`\n  does **not** flush).\n- **Restore** in place via `cat >` so the **inode + owner (uid 10065) + SELinux\n  `app_data_file` context** survive; **`am force-stop` FIRST** so autosave can't race;\n  **`md5sum` verify** device == snapshot after.\n- **Empty-wipe trap:** a 0-byte\u002Fshort read is **never** stored as good and **never**\n  pushed back (the MSYS `d41d8cd9…` wipe class). `MIN_SAVE_BYTES` gates both ends; a\n  backup whose on-disk md5 ≠ recorded md5 is refused before any push.\n\n### Shadow vs enforce (council C5)\n- `snapshot` (read-only pull) and an **explicit** `rollback` are always **real**.\n- **Automatic** rollback (`auto_rollback(is_broken)`) defaults to **SHADOW**: if the\n  health probe says broken, it **logs** which snapshot it *would* restore and mutates\n  nothing. Only `enforce=True` actually restores. A flaky probe that raises is treated\n  as **not broken** (never triggers a destructive restore on its own error).\n\n### Usage\n```\npython snapshot_ring.py snap [label]      # flush+pull a byte-exact snapshot into the ring\npython snapshot_ring.py list              # ring contents, newest first\npython snapshot_ring.py rollback [index]  # EXPLICIT restore (index from `list`; default newest good)\npython snapshot_ring.py verify            # md5 device vs newest snapshot\npython snapshot_ring.py prune             # enforce capacity + drop orphan files\n```\nEnv: `BC_ADB`, `BC_SERIAL`, `BC_RING_DIR` (default `\u003Cskill>\u002F.save-ring`),\n`BC_RING_CAP` (default 10). Python API: `SnapshotRing(io, ring_dir).auto_rollback(\nprobe, enforce=False)` for a shadow health-guard loop; inject a custom `SaveIO` for\ntesting or a non-adb transport.\n\n> **Live-game care (inherited):** read-only discovery is safe; prefer reversible\n> save-edits over forcing unverified in-memory fields. On a broken state: **kill all\n> hooks + restart BC first**, *then* `rollback` to the newest verified snapshot.\n\n---\n\n## What works vs what's inferred (honesty ledger)\n\n| Capability | Status |\n|---|---|\n| `dispatch_capture` agent-JS generation (valid JS, single-shot, no sync RPC) | ✅ unit-tested (`node --check` clean) |\n| Scene guard refuses to arm outside menu cluster | ✅ unit-tested |\n| Single-shot detach + hard-timeout detach (hook never left live) | ✅ unit-tested (fake device) |\n| Shadow = no auto-tap; explicit arm fires exactly one tap | ✅ unit-tested |\n| `resolve_ctor_candidates` ranks caller RVAs + flags vtable match | ✅ unit-tested |\n| **Live** dispatch-capture on a running BC + actual ctor RVA | ⚠️ needs a device run + the offline xref step (documented) |\n| Snapshot ring rotation, corruption guard, integrity-gated rollback | ✅ unit-tested (fake SaveIO) |\n| Shadow auto-rollback logs-not-mutates; flaky probe is safe | ✅ unit-tested |\n| **Live** pull\u002Frestore round-trip (inode\u002Fuid\u002FSELinux preserved) | ⚠️ needs a device run (rides proven bcsfe recipe) |\n| OmniParser V2 set-of-mark grounding | ? documented ADOPT recipe; not yet wired to a live model |\n| minitouch\u002Fevdev low-latency input | ? documented ADOPT recipe; `adb tap` remains default |\n\n## Files\n- `dispatch_capture.py` — bounded single-shot touch-dispatch capture + ctor-evidence resolver + CLI.\n- `snapshot_ring.py` — save-snapshot ring + HGT-safe auto-rollback + CLI.\n- (grounding + input are ADOPT recipes above; they ride bc-drive's screenshot\u002Fadb bus.)\n\n## Safety summary\nRead-mostly. Zero per-frame hooks. The one input-path hook is single-shot,\nscene-guarded, hard-timeout-bounded, and async-only (thread-selection safe). Save\nwrites are inode\u002Fcontext-preserving, force-stop-guarded, md5-verified, and\nempty-wipe-guarded; automated rollback is shadow-by-default. Taps only on safe menu\nnavigation — never gacha \"Draw\", stage \"Start\" confirm, or anything that spends\ncurrency or alters the save.\n",{"name":5,"license":15,"description":7},"main","a298c929b6cbd662e1fce54302ce520d5ceea1a5","skills\u002Fbc-drive-plus","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain","https:\u002F\u002Fgithub.com\u002FPrekzursil","2026-11-02 14:30:57",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add Prekzursil\u002Fagent-skills-toolchain --skill bc-drive-plus",{"tool":55,"command":56},"bunx","bunx skills add Prekzursil\u002Fagent-skills-toolchain --skill bc-drive-plus",{"tool":58,"command":59},"pnpm","pnpm dlx skills add Prekzursil\u002Fagent-skills-toolchain --skill bc-drive-plus","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Fskills\u002Fbc-drive-plus\u002FSKILL.md",true,[63,69],{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},"dispatch_capture.py","SCRIPT","脚本",19082,"https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Fskills\u002Fbc-drive-plus\u002Fdispatch_capture.py",{"path":70,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":71,"sourceHtmlUrl":72},"snapshot_ring.py",17474,"https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Fskills\u002Fbc-drive-plus\u002Fsnapshot_ring.py",[74,95,126,153,167,183],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":38},"01M6DF7D7478R55P46REYH4QAC","clarify-requirements","Resolve genuine pre-execution ambiguity by scanning repo context, generating 1-6 grounded options, and asking 1-3 focused questions via AskUserQuestion. NOT for mid-task use (injection risk); NOT when the goal is already unambiguous; use to disambiguate vague prompts before any file edits.","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Fworkspace-hooks\u002Fskills\u002Fclarify-requirements\u002FSKILL.md",[],[81,82,83,84,85,86,87,88,89,30,90,91,92,93,94],"clarify requirements","clarify","requirements","risk","options","task","prompts","goal","scanning","context","repo","injection","execution","file",{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":106,"publishedAt":38},"01M6DF79CA4BHJS66J8EZDBPWJ","openmm-md","Run FREE, open-source, Windows-native GPU molecular dynamics via the openmm-md MCP (OpenMM + CUDA on the local NVIDIA GPU). Use for protein \u002F protein-ligand MD when you want a free stack or are on Windows without a Schrodinger license. Covers the full workflow (prepare, solvate, minimize, equilibrate, production, analyze, mmgbsa) AND an honest decision guide vs Schrodinger Desmond, including how to run Desmond legitimately on Linux or a cloud GPU with a real license. This is a deliberately LESSER free alternative and does NOT replace the schrodinger MCP tools. Do NOT use it to pick a free tool when a validated FEP+, WaterMap, IFD-MD, or Prime MM-GBSA result is actually required.","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Fmcp\u002Fopenmm-md-mcp\u002Fskill\u002Fopenmm-md\u002FSKILL.md",[101],{"categoryNo":102,"categoryName":103,"taxonomyType":104,"taxonomyTypeDesc":105},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[107,108,109,110,111,112,113,114,115,116,117,118,119,120,30,121,122,123,124,125],"openmm md","how","decision","pick","linux","analyze","tool","stack","open","NVIDIA","gpu","license","workflow","windows","free","molecular dynamics","local","do","MCP",{"skillNo":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":138,"publishedAt":38},"01M6DF76C1MG85VEWP8VZCBNMN","visual-review","Take screenshots of web pages and UI using Playwright for visual review and iteration","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Feditor\u002Fmetaswarm\u002Fskills\u002Fvisual-review\u002FSKILL.md",[132,135],{"categoryNo":133,"categoryName":134,"taxonomyType":104,"taxonomyTypeDesc":105},"01JBSEEDCAT000000000000003","演示文稿",{"categoryNo":136,"categoryName":137,"taxonomyType":104,"taxonomyTypeDesc":105},"01JBSEEDCAT000000000000008","测试与质量",[139,140,141,142,143,144,145,146,147,148,108,149,150,151,152],"review","visual","visual review","pages","web","false","iteration","take","check","slides","ui","screenshot","playwright","screenshots",{"skillNo":154,"name":155,"nameZh":6,"description":156,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":157,"categories":158,"keywords":159,"publishedAt":38},"01M6DF73AQVCBZKEN0YXEX9FXP","status","Diagnostic status report — shows metaswarm installation state, project setup, and potential issues","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Feditor\u002Fmetaswarm\u002Fskills\u002Fstatus\u002FSKILL.md",[],[155,160,161,162,163,164,165,166],"setup","report","project","installation","project setup","issues","state",{"skillNo":168,"name":169,"nameZh":6,"description":170,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":171,"categories":172,"keywords":174,"publishedAt":38},"01M6DF6X6C2XB0P6GX76P7TTYV","start","Use when starting work on any task, when the user mentions metaswarm, or when the user wants to begin tracked development work","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Feditor\u002Fmetaswarm\u002Fskills\u002Fstart\u002FSKILL.md",[173],{"categoryNo":102,"categoryName":103,"taxonomyType":104,"taxonomyTypeDesc":105},[169,175,86,176,177,178,30,179,180,181,182],"start issue","issue","ready","work on issue","user","work","work on","development",{"skillNo":184,"name":160,"nameZh":6,"description":185,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":186,"categories":187,"keywords":188,"publishedAt":38},"01M6DF6QMJ9AJKFKHHKRT005PQ","Interactive project setup — detects your project, configures metaswarm, writes project-local files","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Feditor\u002Fmetaswarm\u002Fskills\u002Fsetup\u002FSKILL.md",[],[160,162,123,189,164,190],"files","interactive"]