/pku-cli:campuscardfrom pku-cli
CLI tool for PKU campus card operations: login, balance, payment QR, recharge, bills, stats, and TOTP 2FA. Handles Synjones platform auth chain with mobile UA and HTTP/1.1 enforcement.
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.
A CLI client for PKU's campus card system (Synjones platform at bdcard.pku.edu.cn).
crates/campuscard/app_id="portal2017") → portal → berserker-auth → JWTsynjones-auth headerPKUANDROID) and http1_only() (server rejects HTTP/2)src/main.rs — Clap CLI with subcommandssrc/commands.rs — Command implementationssrc/api.rs — API client with synjones-auth header injectionsrc/display.rs — Terminal output, QR code renderingsrc/client.rs — reqwest client with mobile UA and HTTP/1.1 enforcement| Command | Alias | Function |
|---|---|---|
login / logout / status | IAAA → portal → berserker → JWT | |
info | Card balance and details | |
pay | Display payment QR code in terminal | |
recharge | Top up card balance | |
bills | ls | Transaction history (pagination, monthly filter) |
stats | Monthly spending statistics | |
otp | TOTP 2FA management |
# Check session status
info-auth check
# Auto-login (reads credentials from OS keyring, no password needed)
campuscard login -p
PKUANDROID) or requests will be rejectedhttp1_only() — the Synjones server does not support HTTP/2info_common::qr (viuer or system viewer)anyhow::Result with .context("中文描述")~/.config/info/campuscard/info_common::credential (keyring → env → interactive)What 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 持久化。/claspider北京大学课程信息爬取 CLI (dean.pku.edu.cn 教务部 + elective.pku.edu.cn 选课网 + onlineroomse.pku.edu.cn 智云课堂)。当用户提及 claspider、课程爬虫、课程信息爬取、课程目录、全校开课、按院系/教师/关键词查课、合并课程数据 时使用此 skill。适用于要批量导出某学期全部课程(课号/名称/学分/教师/时间地点/简介)做离线查询、语义搜索、选课决策的场景。Also use when dealing with 教务部课表查询 HTML 抓取、选课网分类遍历、智云课堂 JWT token 周课表接口、或三方数据合并。**不是**选课/退课工具——那是 `elective` skill;也不是单人课表——那是 `treehole course` (treehole skill)。/coursePKU Teaching Platform (北大教学网/Blackboard Learn) CLI tool built in Rust. Use this skill when working on the course crate, debugging course commands, adding features to the teaching platform CLI, or when the user mentions 教学网, Blackboard, course downloads, assignment submission, video downloads, or PKU teaching. Also use for teaching-assistant (助教) work via `course ta`: posting files, creating assignments, downloading submissions, grading with feedback (登分/批改/成绩中心), and publishing 课堂实录 recordings. Also use when dealing with HTML scraping via the scraper crate, Blackboard SSO callback, or multipart file uploads. **NOT for course schedule / 课表 / weekly timetable questions — for those use the `treehole` skill (`treehole course`), which is the canonical source and includes 辅修/双学位.** This `course` crate only deals with the Blackboard teaching platform (assignments, files, recordings, announcements). 四六级成绩 (CET) is not here: use `simso cet`./cwfw北京大学财务综合信息门户 (cwfw.pku.edu.cn) CLI 工具,只读。当用户提及 cwfw、财务门户、个人酬金、助教/助研/劳务费、奖学金/助学金按月发放、工资查询、谁给我打了钱、入卡/银行卡到账、报销进度/报销被退回、借款/暂借款、外汇到款/境外汇款、财务部汇率 时使用此 skill。Also use when dealing with cwfw IAAA 登录 (app_id=IIPF)、home2.jsp→findpages_postData.action→home3.jsp 多步 bootstrap、WF_CWBS / YBX 子系统入口、Wingsoft loadDefinition/responseButtonEvent/doQuery 协议或 cwfw 的加密表单字段。学费住宿费、缴费订单不在这里(见 cwpay)。/cwpay北京大学收费平台 / 收费大厅 (cwpay.pku.edu.cn) 只读 CLI 工具。当用户问 学费、住宿费、学宿费 交了没有 / 还欠多少、收费平台待缴费、缴费订单/缴费记录、某笔订单的支付方式或电子票据(发票)链接、在收费平台一共花了多少(浴卡充值/网费/校园卡就诊账户等)、收费平台有哪些缴费项目、学费缴费通道是否暂停、收费平台公告 时使用此 skill。不负责缴费/下单(只读);个人酬金/工资请用 cwfw skill,校园卡余额请用 campuscard skill。Also use when dealing with cwpay IAAA (app_id=CWSF) → /dealcas → X-Token 登录、响应 AES-256-ECB 解密、messageCode -3 续期 token。/disk北京大学网盘 (disk.pku.edu.cn,爱数 AnyShare 7) CLI 工具,只读:浏览和下载。当用户提及 北大网盘、PKU 网盘、disk.pku.edu.cn、AnyShare、个人文档库、其他文档库(别人共享给我的)、部门文档库、北大网盘公共资源,或想要 列出/查找/下载 网盘里的文件或整个文件夹 时使用此 skill。Also use when dealing with the AnyShare OAuth2 (Ory Hydra) login chain, IAAA app_id=anyshare, `/api/efast/v1/entry-doc-lib` / `dir/list` / `file/osdownload`, or token refresh via `/anyshare/oauth2/login/refreshToken`.Other plugins' skills for the same job