12306-android-adb

12306-android-adb is a skill for Claude Code, Codex from Lord1Egypt/awesome-skill-forge. It costs 55 tokens per session (2,317 once invoked), scanned A, original, MIT.

A guide for automating train-ticket bookings in the 12306 Android app, including its unusual train-list and booking screens. 12306 is a Chinese railway ticketing service.

In plain words
What is it for?
Use it when controlling the 12306 app through Appium, Android Debug Bridge, or uiautomator2 to search for trains and book tickets.
Why use it?
It explains which Android automation methods work with the app and highlights common problems that can make automated clicks fail.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: built for openclaw.

Good fit Use it when controlling the 12306 app through Appium, Android Debug Bridge, or uiautomator2 to search for trains and book tickets.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lord1egypt/awesome-skill-forge/12306-android-adb
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 Lord1Egypt/awesome-skill-forge --skill 12306-android-adb
Clone the repo
git clone --depth 1 https://github.com/Lord1Egypt/awesome-skill-forge

Made for: Claude Code, Codex.

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 12306-android-adb

README.md
[![agentmods](https://agentmods.dev/badge/skills/lord1egypt/awesome-skill-forge/12306-android-adb/github.svg)](https://agentmods.dev/skills/lord1egypt/awesome-skill-forge/12306-android-adb)
Your own site
<a href="https://agentmods.dev/skills/lord1egypt/awesome-skill-forge/12306-android-adb"><img src="https://agentmods.dev/badge/skills/lord1egypt/awesome-skill-forge/12306-android-adb/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 12306-android-adb

Your own site · 80×15
<a href="https://agentmods.dev/skills/lord1egypt/awesome-skill-forge/12306-android-adb"><img src="https://agentmods.dev/badge/skills/lord1egypt/awesome-skill-forge/12306-android-adb.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,317 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.
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.00055 $0.02317
Opus 5 $0.00028 $0.01158
Sonnet 5 $0.00011 $0.00463
Haiku 4.5 $0.00006 $0.00232

Measured 12d ago against content hash 4f9236521c05, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

12306-android-adb 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 12d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

subprocess.run(['adb', 'shell', 'screencap', '-p', '/sdcard/screen.png'], timeout=10)
community/clawhub/1/12306-android-adb/SKILL.md · 213 lines

How it starts

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

12306 Train Booking (Android)

12306-specific knowledge, workflows, and pitfalls. The app uses Alipay Nebula UC WebView for the train list and booking pages, which has unique automation challenges.

🚨 Before Any 12306 Action

Ensure the app is running and on the correct page:

# Start Appium bridge (if using bridge_daemon.py approach):
bash ~/.openclaw/workspace/skills/appium-android-adb/start_bridge.sh

# Or use uiautomator2 directly (more reliable for WebView):
python3 -c "import uiautomator2 as u2; d = u2.connect(); d.app_start('com.MobileTicket')"

⚠️ Critical: UC WebView Virtual List Behavior

The train list uses a virtual list inside the UC WebView. This has extreme implications:

What DOES work

Method Target Reliability
uiautomator2 text('预订').click() "预订" book buttons ✅ Always works (proper persistent bounds)
uiautomator2 text('查询车票').click() Native query button ✅ Always works
uiautomator2 text('选择乘车人').click() Native passenger selector ✅ Always works
uiautomator2.click(x, y) on native views Date tabs, bottom buttons ✅ Always works
Screenshot + OCR + ADB tap Any visible element ✅ Works with good OCR
Appium element.click() on "预订" buttons "预订" with proper bounds ✅ Works

What DOES NOT work

Method Target Why
Clicking collapsed train name text Train entry at y=407 or y=2255 (h=6) Virtual list collapses ALL non-current items
ADB input tap Any UC WebView content UC WebView filters synthetic touch events
W3C Actions swipe UC WebView scroll Touch events filtered
mobile: scrollGesture UC WebView element Returns False consistently
d.textContains('G 7 0 0 4').click() Train name in collapsed zone Multiple trains share collapsed bounds
tap_bounds on collapsed element Train name at y=2255 with h=6 Event goes to WebView's virtual position, not visual

Read the full file on GitHub · 213 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. 12d ago First seen · 213 lines · 55 tokens per session scan A 4f9236521c05

Subscribe to this mod's changes

12306-android-adb is a skill published in the GitHub repository Lord1Egypt/awesome-skill-forge (2 stars, last pushed 3mo ago), licensed MIT. It adds 55 tokens to every session and 2,317 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories