rab-rn-debug

rab-rn-debug is a skill for Claude Code from ximing/rab. It costs 120 tokens per session (2,197 once invoked), scanned A, original, MIT.

A debugging guide for checking and controlling React Native apps on real phones or simulators through a local service. React Native is a way to build mobile apps with JavaScript and React.

In plain words
What is it for?
Use it to send structured commands to a mobile app, find and call its Service functions, check results with assertions, inspect Service state, and collect device logs.
Why use it?
It removes the need to inspect the app manually when checking its Service logic or state. It also helps identify connected devices and retrieve their console logs.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the rab plugin — 3 skills shipped together

Good fit Use it to send structured commands to a mobile app, find and call its Service functions, check results with assertions, inspect Service state, and collect device logs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ximing/rab/rab-rn-debug
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ximing/rab --skill rab-rn-debug
Clone the repo
git clone --depth 1 https://github.com/ximing/rab

Made for: Claude Code.

Or install rab, the plugin that ships this one along with the rest of its 3 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rab-rn-debug

README.md
[![agentmods](https://agentmods.dev/badge/skills/ximing/rab/rab-rn-debug/github.svg)](https://agentmods.dev/skills/ximing/rab/rab-rn-debug)
Your own site
<a href="https://agentmods.dev/skills/ximing/rab/rab-rn-debug"><img src="https://agentmods.dev/badge/skills/ximing/rab/rab-rn-debug/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rab-rn-debug

Your own site · 80×15
<a href="https://agentmods.dev/skills/ximing/rab/rab-rn-debug"><img src="https://agentmods.dev/badge/skills/ximing/rab/rab-rn-debug.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 120 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,197 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 21
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium Data Exfiltration · line 35
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 63
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00120 $0.02197
Opus 5.5 $0.00048 $0.00879
Sonnet 5.5 $0.00024 $0.00439
Haiku 4.5 $0.00012 $0.00220

Measured 1mo ago against content hash 604b61e66907, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rab-rn-debug scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s http://localhost:9229/api/devices
skills/rab-rn-debug/SKILL.md · 204 lines

How it starts

The opening of the file, as written. The whole thing — 204 lines — stays where its author put it; the contents beside it link to each section on GitHub.

rab-rn-debug 调试指南(React Native)

本 skill 告知 Agent 如何通过 rab-rn-debug 本地服务(默认 localhost:9229)向集成 @rabjs/rn-debug 的 React Native 应用发送 HTTP 指令,对 Service 层进行功能验证与状态检查。请求会同步挂起直到设备执行完毕返回结果。


前置条件

  1. 电脑上启动调试服务(bin 名 rab-rn-debug,来自 @rabjs/rn-debug-server):
npx rab-rn-debug            # 默认端口 9229,启动时会打印局域网 IP(setupRNDebug 的 host)
  1. RN 应用已集成 SDK(App 入口,仅 __DEV__ 生效):
import { setupRNDebug } from '@rabjs/rn-debug';

setupRNDebug({ host: '<电脑局域网IP>', port: 9229, appName: 'MyApp' });
  1. 确认设备在线:
curl -s http://localhost:9229/api/devices
# 期望: [{"deviceId":"rn-ios-xxxx","appName":"MyApp","platform":"ios","osVersion":"18.0","sdkVersion":"0.1.0","connectedAt":...,"lastSeen":...}]

如果目标 App 尚未接入,先引导用户完成上述步骤再调试。多设备在线时,请求需带 deviceId(见下)。


指令调用方式

curl -X POST http://localhost:9229/api/commands \
  -H 'Content-Type: application/json' \
  -d '{"type":"<指令type>","payload":{...},"timeout":30000}'
  • 唯一设备在线时自动路由;多设备返回 409(body 为 {"error":"multiple devices, specify deviceId","devices":["rn-ios-xxx","rn-android-yyy"]}),改用 POST /api/devices/<deviceId>/commands;无设备返回 404;指定的 deviceId 不存在同样返回 404。
  • 响应:{"id","status":"ok"|"error"|"timeout","result","durationMs"};失败时另有 error:{"message","stack?"}。
  • 事后可用 GET /api/commands/<id> 查询单条指令记录(含 status:"pending" 的进行中状态)。
  • 同一设备指令严格串行;默认超时 30s(上限 120s,超出按 120s 计),异步方法耗时长时可加大 timeout。

常用调试操作

1. 连通性检查

curl -X POST localhost:9229/api/commands -H 'Content-Type: application/json' \
  -d '{"type":"ping"}'
# 期望 status ok, result: { "pong": true, "time": 1723766400000 }

2. 枚举所有已实例化的 Service

curl -X POST localhost:9229/api/commands -H 'Content-Type: application/json' \
  -d '{"type":"rab.listServices"}'

返回示例:

{
  "status": "ok",
  "result": [
    {
      "instanceId": "CartService#1",
      "containerName": "ProductPage_2",
      "identifierLabel": "CartService"
    }
  ]
}
  • instanceId 格式为 类名#序号(如 CartService#1),identifierLabel 为 Service 类名。
  • 仅枚举 Singleton 作用域且已实例化的 Service(Transient 不缓存实例,不会出现在列表中)。

Read the full file on GitHub · 204 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 204 lines · 120 tokens per session scan A 604b61e66907

Subscribe to this mod's changes

rab-rn-debug is a skill published in the GitHub repository ximing/rab (12 stars, last pushed 2d ago), licensed MIT. It adds 120 tokens to every session and 2,197 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

inspector-workbench

Runs Inspector UI work on the standalone Threads state lab so the agent can see the overlay. Use when a CopilotKit employee asks an agent to fix, polish, add, or debug Inspector UI, chrome, panes, overlay actions, launcher, Home, Threads, Playground, Memory, or any visual behavior in @copilotkit/web-inspector. Don't…

CopilotKit/CopilotKit · 112 tokens

heroui-native

HeroUI Native component library for React Native (Tailwind v4 via Uniwind). Use when building mobile UIs with HeroUI Native — creating Buttons, Cards, TextFields, Dialogs; installing heroui-native; configuring dark/light themes; or fetching component docs. Keywords: HeroUI Native, heroui-native, React Native UI…

heroui-inc/heroui · 80 tokens

feature-state-hook

Define typed, module-scoped state and wrap useUrlState in a feature-scoped custom hook so unrelated React components share the same URL-synced state. Covers drawer/modal open-state, tab switching, multi-select toggles, reset/defaults semantics, and the object-identity-based sharing model. Load this skill when storing…

asmyshlyaev177/state-in-url · 112 tokens

nextjs-ssr

SSR-safe useUrlState in Next.js App Router. Forward searchParams from server pages (awaiting the Promise in Next.js 15+) rather than calling useSearchParams(), decide between useHistory true/false, keep pages prerenderable, and use a Proxy (formerly middleware) to expose query params to server layouts. App Router only…

asmyshlyaev177/state-in-url · 104 tokens

react-router-remix-setup

Set up useUrlState for React Router v7 (state-in-url/react-router), React Router v6 (state-in-url/react-router6 — moved here in 6.0.0), and Remix v2 (state-in-url/remix). The hook API is identical across all three; only the import path and per-call NavigateOptions (preventScrollReset, state, replace) differ. Load this…

asmyshlyaev177/state-in-url · 110 tokens

astro-setup

Set up useUrlState in Astro (state-in-url/astro) inside React islands, and keep state in the URL on pages with no client framework at all through encodeState/decodeState in the frontmatter. Covers the searchParams island prop for a matching server render, sharing state between islands, and the replace/push choice with…

asmyshlyaev177/state-in-url · 102 tokens