← Back to Skills Marketplace
792
Downloads
4
Stars
5
Active Installs
5
Versions
Install in OpenClaw
/install trainclaw
Description
3-in-1 China 12306 query — tickets, route stops, transfer plans. Zero login. Filter 高铁/动车/火车 by type, time, duration. Pure Python, text/json/csv output. 火车票/...
Usage Guidance
TrainClaw appears coherent and implements exactly what it claims: CLI queries to 12306 with local caching. Before installing or enabling it for autonomous use, consider: 1) it will make network requests to kyfw.12306.cn and search.12306.cn (ensure your environment permits outbound HTTP and this is acceptable); 2) it writes a station cache under the skill's directory (cache/stations.json) — check file-write permissions and sandboxing if you are concerned about persistence; 3) the packaged files show minor version mismatches in README/ __version__ vs registry metadata — not a security issue but worth noting (origin is 'unknown' in registry metadata despite GitHub links in files); 4) verify you have Python 3.8+ and the requests library available; 5) if you require stricter isolation, run the script locally in a sandbox/container first to audit behavior and network traffic. Overall the bundle is internally consistent and not requesting unrelated secrets or contacting unexpected endpoints.
Capability Analysis
Type: OpenClaw Skill
Name: trainclaw
Version: 0.0.7
The TrainClaw skill bundle is a legitimate CLI tool for querying China Railway 12306 ticket information, route stops, and transfer plans. The code (trainclaw.py) and configuration (config.py) interact exclusively with official 12306 API endpoints (kyfw.12306.cn and search.12306.cn) using the requests library. It includes standard features like local caching for station data and request rate-limiting. No evidence of data exfiltration, unauthorized execution, or malicious prompt injection was found.
Capability Assessment
Purpose & Capability
Name/description (12306 ticket/route/transfer queries) align with code and SKILL.md. The code uses 12306 endpoints (kyfw.12306.cn, search.12306.cn) and implements ticket/query/route/transfer subcommands as documented. No unrelated services or credentials are requested.
Instruction Scope
SKILL.md instructs running trainclaw.py with appropriate arguments; the script and config are included and the runtime actions described (HTTP requests to 12306, parsing station JS, caching stations) match the code. The instructions do not ask the agent to read unrelated system files or exfiltrate data to third-party endpoints.
Install Mechanism
This is an instruction-only skill (no install spec). Files are bundled in the skill (trainclaw.py, config.py). Dependencies are minimal (requests). No remote downloads or obscure install URLs are used.
Credentials
The skill declares no required environment variables or credentials. The code does not read external secrets or require unrelated tokens; it only performs HTTP requests to 12306. No excessive env access detected.
Persistence & Privilege
The tool creates a local cache (cache/stations.json) under the package directory to store station data (7-day TTL). This is expected for functionality but does mean the skill writes files to disk (requires write permission). always:false and no special privileges are requested.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install trainclaw - After installation, invoke the skill by name or use
/trainclaw - Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.0.7
- Updated to version 0.0.7.
- Shortened and clarified the description to improve readability.
- No code or functionality changes detected.
v0.0.6
- update description in eng and chs
- Added main program file trainclaw.py and supporting files: config.py, requirements.txt, README.md, and README_ENG.md.
- Initial public release with complete CLI functionality: ticket query, route stops, and transfer plans.
- Supports filtering by train type, time range, and sorting; outputs in text, JSON, or CSV formats.
- All core documentation now included in both Chinese and English.
v0.0.5
update description and minor changes:3-in-1 China 12306 query: tickets + route stops + transfer plans, zero login. Filter 高铁/动车/火车 by type, time, duration. Pure Python, text/json/csv output. Use for 火车票/余票/经停站/中转换乘.
v0.0.4
- Added English documentation: README_ENG.md and SKILL_EN.md.
- Updated skill description and documentation to be fully bilingual (Chinese + English).
- Streamlined and clarified parameters, usage examples, and command explanations for international audience.
- No code or functionality changes; documentation improvements only.
v0.0.3
Initial release
Metadata
Frequently Asked Questions
What is TrainClaw?
3-in-1 China 12306 query — tickets, route stops, transfer plans. Zero login. Filter 高铁/动车/火车 by type, time, duration. Pure Python, text/json/csv output. 火车票/... It is an AI Agent Skill for Claude Code / OpenClaw, with 792 downloads so far.
How do I install TrainClaw?
Run "/install trainclaw" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is TrainClaw free?
Yes, TrainClaw is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does TrainClaw support?
TrainClaw is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created TrainClaw?
It is built and maintained by AI4MSE (@ai4mse); the current version is v0.0.7.
More Skills