Agent skill

Debug Bridge

by getknit in getknit/knit

Drive and verify Knit on a device or emulator through the headless debug bridge (am broadcast to app.getknit.knit.debug.<ACTION, replies as JSON) — send a message on one phone and confirm it landed…

GPL-3.0Auto-check passedMobile

Install Debug Bridge

skills CLI
$ npx skills add getknit/knit --skill debug-bridge -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install getknit/knit debug-bridge --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/getknit/knit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/debug-bridge .claude/skills/debug-bridge && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
debug-bridge
GitHub stars
130
Token cost
~2.2k tokens
SKILL.md length
1,061 words
Files
1
Skills in repo
4
Repo updated
First seen
Licence
GPL-3.0

At a glance

Drive and verify Knit on a device or emulator through the headless debug bridge (am broadcast to app.getknit.knit.debug.<ACTION, replies as JSON) — send a message on one phone and confirm it landed…

  • Works in 3 steps: STATE on each device: note self.nodeId… → Act on A, e.g. SEND --es text '' --es… → Verify on B with STATE --es conv : the…
  • A task says run it on a device
  • SKILL.md covers Gate 0: whether you may, Gate 1: a debug build that…, The call and The core loop, plus 5 more sections
  • Calls adb and jq

What it does

Debug Bridge is an agent skill from getknit/knit. Drive and verify Knit on a device or emulator through the headless debug bridge (am broadcast to app.getknit.knit.debug.<ACTION, replies as JSON) — send a message on one phone and confirm it landed on another without screenshots, read mesh state, check custody / spool / ratchet convergence, run a LoRa, direct-transfer or Wi-Fi Aware fault trial on a locked lab device, or post a fixture notification for a UI test. Use whenever a task says run it on a device, check it on the phones, lab trial, device trial, soak…

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Mobile, covering Fine-tuning and Mobile testing and debugging. It works with Android. The repository describes itself as: Offline, serverless, end-to-end-encrypted mesh messenger for Android — runs Wi-Fi Aware and Bluetooth LE simultaneously, with no servers and no Google Play Services. The licence is GPL-3.0.

When your agent uses it

  • A task says run it on a device
  • Check it on the phones
  • Convergence check
  • Names any …debug.<ACTION

Example prompts

  • “/debug-bridge”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. STATE on each device: note self.nodeId and confirm the other side is in reachable[]. A peer that
  2. Act on A, e.g. SEND --es text '' --es conv . Use a body you
  3. Verify on B with STATE --es conv : the body appears in messages[]. Then, if the test is about

What it can do on your machine

Read from SKILL.md and the folder at commit 71c07bc. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • adb
    • jq

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Debug Bridge loads about 2.2k tokens when it runs. Until then it costs about 159 tokens; SKILL.md has 1,061 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~159
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from getknit/knit at commit 71c07bc, republished under its GPL-3.0 licence (© getknit). 1,061 words, ~2,201 tokens.

Download SKILL.mdSave it as .claude/skills/debug-bridge/SKILL.md (or your agent's skills folder).
name
debug-bridge
description
Drive and verify Knit on a device or emulator through the headless debug bridge (`am broadcast` to `app.getknit.knit.debug.<ACTION>`, replies as JSON) — send a message on one phone and confirm it landed on another without screenshots, read mesh state, check custody / spool / ratchet convergence, run a LoRa, direct-transfer or Wi-Fi Aware fault trial on a locked lab device, or post a fixture notification for a UI test. Use whenever a task says run it on a device, check it on the phones, lab trial, device trial, soak, convergence check, `KnitBridge`, or names any `…debug.<ACTION>`; and before adding a bridge action.

Debug bridge

Debug builds carry an exported receiver (app/src/debug/.../debug/DebugBridgeReceiver.kt) that calls the mesh directly and answers in JSON, so an agent can drive the send→verify loop with no UI and no screenshots. This skill is the procedure. The per-action extras and reply fields are in .agents/context/debug-bridge.md, and this file points into it rather than copying it.

Gate 0: whether you may

Obey .agents/rules/devices.md. An emulator is fair game. A physical phone, including every lab phone on network adb, needs the user's go-ahead for this task, every time. Being reachable in adb devices is not permission, and neither is a yes from an earlier task. Never toggle Wi-Fi over adb on a lab phone. Always pin the target with -s <serial> or ANDROID_SERIAL: several devices are usually attached.

Gate 1: a debug build that matches

  • The bridge exists only in debug builds. A release or nonMinifiedRelease install answers nothing.
  • Install with ./gradlew :app:installDebug. Don't adb install the intermediates/apk file, which AGP 9 never rewrites.
  • A lab phone may run a feature branch with a newer Room schema than yours, and installing over it half-runs the app. Check what the device has before you install, and say what you replaced.
  • After an install the package is in the stopped state. scripts/bridge.sh delivers to it anyway (-f 0x20). A hand-written am broadcast without that flag gets an empty reply until the app is opened.

The call

sh
scripts/bridge.sh <serial|-> <ACTION> [am-extras…]      # JSON on stdout; "-" = $ANDROID_SERIAL
scripts/bridge.sh emulator-5554 STATE | jq '{self, health, reachable}'
scripts/bridge.sh - SEND --es text 'hi there 😀' --es conv nearby

The script single-quotes every extra for the device shell, adds -f 0x20 and -p app.getknit.knit, pulls the data="…" out of Broadcast completed, and falls back to the receiver's KnitBridge:I log mirror (only lines newer than the call). It exits 1 with a hint on stderr when nothing parsable came back. A refusal is still a reply, though: a missing extra answers {"status":"error","message":"missing 'path' extra"} with exit 0, so check .status (jq -e '.status == "ok"') before reading fields. Extras use am's own flags: --es string, --ei int, --ez bool.

If you must write the raw form, quote the whole remote command and single-quote the values. adb re-parses on the device, so a bare --es text "hi there" arrives as hi:

sh
adb -s A shell "am broadcast -f 0x20 -a app.getknit.knit.debug.SEND -p app.getknit.knit --es text 'hi there' --es conv nearby"

The core loop

  1. STATE on each device: note self.nodeId and confirm the other side is in reachable[]. A peer that isn't there is a radio problem, not a delivery one. Read transports[] (per-radio health, linked, nearby) first, then meshEnabled, meshPaused and meshStartDeferred, any of which leaves a mesh that looks alive with no peers.
  2. Act on A, e.g. SEND --es text '<unique body>' --es conv <nearby | peerNodeId | g-…>. Use a body you can grep for (prefix it soak or burst so PURGE can clean it up later).
  3. Verify on B with STATE --es conv <id>: the body appears in messages[]. Then, if the test is about the ✓✓, read A's own row (mine: true) until its received flips: that flag is the delivery tick coming home to the sender, not something the receiver's row carries. Poll in a bounded loop. Never trust one bare sleep: delivery order and timing across radios are not promised.
sh
for i in $(seq 1 30); do
  scripts/bridge.sh B STATE --es conv nearby | jq -e --arg b "$BODY" '.messages[] | select(.body == $b)' && break
  sleep 2
done

Which oracle answers which question

QuestionActionRead
Did it arrive?STATE --es conv <id> on the receiverthe body in messages[]
Did the ✓✓ get home?STATE --es conv <id> on the senderits own row's (mine: true) received
Did a reaction or typing cue land?STATE on the receivermessages[].reactions; typing
Do two nodes carry the same custody?STORE on eachliveFingerprint equal across devices (never allFingerprint); digestVersion == liveFingerprint on each
Which frame is stranded?STOREallIds sorted per device, then comm between devices
Is the Internet plane converged?SPOOLper scope local == spool, invalid 0, lastError empty, connected
Is a DM session healthy?RATCHEThasSession and confirmed; peerPrekeyPinned before any reset
LoRa range or airtime?LORAloraSent/loraReceived, loraNakByReason
Why didn't a transfer start?XFERrefusal first, then the live transfers
Is the mesh paused?STATEmeshPaused / meshPausedUntil

Each row's caveats (the retiring and accounted spool fields, the TTL edge on allFingerprint) are in the context doc. Read its bullet before you call a result converged or diverged.

Show full SKILL.md (384 more words)Show less

Action index

Extras and reply fields: the action's bullet in .agents/context/debug-bridge.md under Headless bridge.

  • Messaging: SEND, SENDIMG (stage the file into app storage with run-as first), REACT, TYPING, MKGROUP, LEAVE, PURGE (clean soak traffic off every phone).
  • Mesh state: STATE, STORE, HEAL, PAUSE, RESUME, BLECAP, NANOFF (Wi-Fi Aware off, Bluetooth alone), PHY (the Coded PHY experiment).
  • Planes: SPOOL, COMMONS, LORA, LORATX, LORAPROV, XFER.
  • Identity, crypto, data: INTRO (contact cards), RATCHET, BACKUP.
  • Fault injection and trials: NANFAIL, NANSTORM, NANREFUSE, NANICM, NANDIAL, NANINIT, NANMSG, MODEL. Each has a negative control in its bullet; run it too.
  • UI-test fixtures: FLAGMSG, MSGNOTIF, REQNOTIF, REVIEW.
  • Media and packaging probes: WEBPPROBE, WEBPCONV, WEBPCHECK, SHAREAPK.

When it answers nothing

  • result=0 with no data=, and nothing under KnitBridge usually means the action isn't in the debug manifest's <intent-filter>, or is misspelt. It can also mean a non-debug build. Without -f 0x20 it can be a stopped package.
  • A text cut off at its first space means it went through a raw adb shell without the inner quotes.
  • missing 'path' extra, or a path the app can't read: scoped storage means the app can't read /sdcard or /data/local/tmp. Copy the file in with adb shell "cat /data/local/tmp/x | run-as app.getknit.knit sh -c 'cat > files/x'" and pass /data/data/app.getknit.knit/files/x.
  • error from COMMONS means the build hides the commons (BuildConfig.COMMONS).
  • A reply that looks healthy while nothing moves: read the oracle's caveat fields (lastError, refusal, declined). Most gates in the mesh return silently, and these fields exist to tell them apart.

When the UI is unavoidable

Use the stable resource-ids, cold-start navigation (--es demo_route chat/<id>), and the rule that popups, dialogs and bottom sheets don't surface their test tags. These are the Stable resource-ids and Cold-start navigation sections of the context doc. Prefer a bridge action over driving a sheet. XFER exists partly so nobody has to drive the consent sheet.

Adding an action

  1. A branch in the when in DebugBridgeReceiver and an ACTION_ constant.
  2. An <action> in the receiver's <intent-filter> in app/src/debug/AndroidManifest.xml. Without it the broadcast is never delivered, and nothing errors.
  3. A bullet in .agents/context/debug-bridge.md covering the extras, the reply fields, what the oracle is, and the negative control if it injects a fault.
  4. A word in this skill's action index.

Check for drift after any change. This must print nothing:

sh
comm -3 <(grep -oE '"app\.getknit\.knit\.debug\.[A-Z]+"' app/src/debug/java/app/getknit/knit/debug/DebugBridgeReceiver.kt | tr -d '"' | sed 's/.*\.//' | sort -u) \
        <(grep -oE 'debug\.[A-Z]+' .agents/context/debug-bridge.md | sed 's/.*\.//' | sort -u)

© getknit, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/debug-bridge of getknit/knit.

Open the folder on GitHubat commit 71c07bc

Compare with similar skills

Debug Bridge next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Debug Bridge compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Debug Bridge this skillgetknit/knit130—~2.2kAutomated safety check: PassGPL-3.0
Mobilerun Docs Referencedroidrun/mobilerun9.6k—~943Automated safety check: PassMIT
Phone HarnessShawnPana/phone-harness3.2k—~4.3kAutomated safety check: PassMIT
Mobile QAtloncorp/tlon-apps107—~2.4kAutomated safety check: PassMIT
Androidyang1ming/android-harness175—~259Automated safety check: PassMIT
Debug Receiverstimusus/Shuttle2229—~1.9kAutomated safety check: PassApache-2.0

Similar skills

  • Mobilerun Docs Reference

    droidrun/mobilerun

    Answers questions about Mobilerun, the LLM-agent framework for automating Android and iOS devices, by pointing the agent to the right page of its v5 documentation.

    9.6k GitHub stars~943 tokensUpdated 2 days ago
    MobileAuto-check passed
  • Phone Harness

    ShawnPana/phone-harness

    Control the user's phone — an iPhone through the Mac's iPhone Mirroring window, an Android over adb, or a rented cloud Android: open apps, tap, type, swipe, read the screen.

    3.2k GitHub stars~4.3k tokensUpdated 9 days ago
    MobileAuto-check passed
  • Mobile QA

    tloncorp/tlon-apps

    Run a mobile QA checklist on a physical Android device over adb for tlon-apps, then triage what fails into fixes.

    107 GitHub stars~2.4k tokensUpdated today
    MobileAuto-check passed
  • Android

    yang1ming/android-harness

    Direct Android device control through ADB. An agent skill from yang1ming/android-harness.

    175 GitHub stars~259 tokensUpdated 2 mo ago
    MobileAuto-check passed
  • Debug Receivers

    timusus/Shuttle2

    Drive the S2 debug build's playback and queue over ADB broadcasts — play the whole library, play/pause, skip, seek, remove a queue item, toggle shuffle/repeat, dump playback state as JSON, reimport…

    229 GitHub stars~1.9k tokensUpdated yesterday
    MobileAuto-check passed
  • Capturing Screenshots And Screenrecord

    skydoves/android-testing-skills

    A skill your agent uses to capture visual artefacts from a device for test failures, golden image generation, QA repro, and demo videos.

    333 GitHub stars~3.7k tokensUpdated 4 mo ago
    MobileAuto-check passed

More from getknit/knit

  • Kotlin Patterns

    getknit/knit

    Idiomatic Kotlin patterns, best practices, and conventions for building robust, efficient, and maintainable Kotlin applications with coroutines, null safety, and DSL builders.

    130 GitHub starsUsed in 5 repos~4.7k tokens
    Auto-check passed
  • Dotagents Standard

    getknit/knit

    Set up, author, and navigate the dotagents standard — a slim AGENTS.md "router" at the repository root plus a hidden .agents/ directory (rules, context, memory, personas, skills, specs, logs, tasks)…

    130 GitHub stars~4.1k tokensUpdated 2 days ago
    Auto-check passed
  • Upgrade Notes

    getknit/knit

    Read the vendor's breaking changes, deprecations, migration notes and CVEs for every version between the one pinned now and the one being moved to, through the whatsnew MCP server's upgradenotes tool.

    130 GitHub stars~1.2k tokensUpdated 2 days ago
    Auto-check passed

Works with

Questions about Debug Bridge

What does Debug Bridge do?

Drive and verify Knit on a device or emulator through the headless debug bridge (am broadcast to app.getknit.knit.debug.<ACTION, replies as JSON) — send a message on one phone and confirm it landed…. Debug Bridge is an agent skill from getknit/knit.<ACTION, replies as JSON) — send a message on one phone and confirm it landed on another without screenshots, read mesh state, check custody / spool / ratchet convergence, run a LoRa, direct-transfer or Wi-Fi Aware fault trial on a locked lab device, or post a fixture notification for a UI test.

When should I use Debug Bridge?

Debug Bridge fits situations like: A task says run it on a device; check it on the phones; convergence check; names any …debug.<ACTION.

How do I install Debug Bridge in Claude Code?

Run `npx skills add getknit/knit --skill debug-bridge -a claude-code`. Or copy the skill folder (.agents/skills/debug-bridge in getknit/knit) into .claude/skills/debug-bridge in your project. Claude Code loads it when a task matches its description.

How do I install Debug Bridge in Codex?

Run `npx skills add getknit/knit --skill debug-bridge -a codex`. Or copy the skill folder (.agents/skills/debug-bridge in getknit/knit) into .agents/skills/debug-bridge in your project. Codex loads it when a task matches its description.

Can I use Debug Bridge in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add getknit/knit --skill debug-bridge -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/debug-bridge, .gemini/skills/debug-bridge, .github/skills/debug-bridge and .opencode/skills/debug-bridge in your project.

What does Debug Bridge need to run?

Going by SKILL.md and its folder, Debug Bridge needs the command-line tools its instructions call (adb and jq).

Does Debug Bridge access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Debug Bridge safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Debug Bridge use?

Debug Bridge is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Debug Bridge use?

About 2.2k tokens (SKILL.md is roughly 8.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Debug Bridge?

Skills that share tags, products or a category with Debug Bridge: Mobilerun Docs Reference (droidrun/mobilerun, 9.6k stars), Phone Harness (ShawnPana/phone-harness, 3.2k stars), Mobile QA (tloncorp/tlon-apps, 107 stars) and Android (yang1ming/android-harness, 175 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Debug Bridge?

getknit (a GitHub organization) maintains it in getknit/knit, which has 130 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 4, 2026.

Source: getknit/knit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.