/pku-cli:shuttlefrom pku-cli
CLI for PKU shuttle bus reservation (Yanyuan-Xinyanyuan) on campus network. Checks seats, lists bookings, books/cancels with preview mode.
Ships in pku-cli. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Client for the 燕园–新燕园 commuter shuttle reservation (wproc.pku.edu.cn, hall 1 of 网上办事大厅): seats left per departure, the user's bookings, book and cancel. Free for PKU students; boarding is checked by QR scan, and five missed check-ins block booking.
process.pku.edu.cn, which does not answer off campus; the CLI then says so plainly. Never route it through a proxy or VPN (the client uses none).book and cancel change a real reservation. Without --yes they only print a preview. Add --yes only after the user confirmed route, date and time (or which booking to cancel).cancel only touches a booking that is in the user's own mine list.info-auth store) or PKU_USERNAME / PKU_PASSWORD.crates/shuttle/; protocol in docs/portal-services-api.md §3portal2017 → portal → appSysRedir.do?appId=process → process.pku.edu.cn/site/login/cas-login?token= (PHPSESSID) → GET process/site/pku-seal/login?targetAppId=wproc&redirect_url=<hallView> → 302 …&token=T2 → GET wproc/api/login/main?…&token=T2 → wproc PHPSESSID. Hops are followed manually and stay on those two hosts (common::portal::follow_hops). Session loss (e = 10042 / 100421, 401, redirect to login) → one silent re-login.{ e, m, d } (e != 0 = error m; e = 2 on launch = an extra verification the CLI cannot do). resource-info-margin gives the seat grid per route; launch (form: resource_id, data=[{"date","period":time_id,"sub_resource_id":0}], empty code/remarks/position_data); single-time-cancel (appointment_id, data_id[i]). Routes: 7 燕园→新燕园, 4 新燕园→燕园, 6/2 via 200号, 5/3 via 肖家河/西二旗, 13/14 新燕园↔200号.src/lib.rs — Clap CLI + dispatchsrc/login.rs — three-step sign-in, off-campus errorsrc/api.rs — HTTP with one re-login on session losssrc/parse.rs — pure parsers and form builders (seat grid, launch/cancel forms, bookings, cancel guard) with unit tests on fixtures/src/commands.rs| Command | 用途 |
|---|---|
login -p / status / logout | 登录(需要校园网)/ 状态 / 退出 |
routes | 线路编号和名称(不联网) |
seats [-r 7,4] [--date YYYY-MM-DD] [--days N] [--upcoming] | 每班车余座(默认今天,北京时间,燕园→新燕园和新燕园→燕园;可提前 7 天约) |
mine [-n 20] [--json] | 我的班车预约(含 id) |
book -r 7 --date YYYY-MM-DD --time HH:mm [--yes] | 预约(先核对座位表:班次存在、有座、没发车;默认预览) |
cancel <appointment_id> [--data-id N …] [--yes] | 取消(默认取消该预约的全部时段;默认预览) |
shuttle seats --upcoming # 今天还有哪几班、余几座
shuttle seats -r 7 --date 2026-11-30 # 某天燕园→新燕园
shuttle book -r 7 --date 2026-11-30 --time 07:00 # 预览 → 给用户确认
shuttle book -r 7 --date 2026-11-30 --time 07:00 --yes
shuttle mine; shuttle cancel <id> --yes
anyhow::Result + .context("中文描述")~/.config/info/shuttle/ (the cookie jar holds both PHPSESSIDs)launch / single-time-cancel are read from the site's JS, not exercised live; the row shape of my-list-time is unverified (the sample account had none), so mine --json shows the raw rowsWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub pkuinfo/pkucli --plugin pku-cli23 skills in this plugin
/bdkj北京大学空间 (bdkj.pku.edu.cn) 学术研讨教室预约 CLI 工具。当用户提及 bdkj、北大空间、学术研讨教室、教室预约、研讨间、借教室 或想要查询/预约/取消 二教/四教/地学 教学楼里的空闲学术研讨教室时使用此 skill。支持保存固定参与人分组(如课题组),重复发起预约时只需 `--group <名字>`。Also use when dealing with bdkj IAAA SSO callback (app_id=bdkj), `/space` / `/space/schedule` / `/space/lockStatus` / `/classRoom/seachStudent` / `/classRoom/handle/submit` 这些端点,或 bdkj groups.json 持久化。/campuscardPKU Campus Card (校园卡) CLI tool built in Rust. Use this skill when working on the campuscard crate, debugging campus card commands, adding features, or when the user mentions 校园卡, campus card, balance, recharge, payment QR, transaction history, monthly spending, or bdcard.pku.edu.cn. Also use when dealing with Synjones platform auth, berserker-auth flow, mobile User-Agent requirements, or HTTP/1.1 constraints./claspiderOther plugins' skills for the same job