/pku-cli:xiaobeifrom pku-cli
CLI for PKU's official campus knowledge base (小北). Answers questions about university regulations, library rules, IT services, and administrative procedures using 137 official documents.
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.
Asks 小北, PKU's official campus assistant, whose answers come from 小北知识库 (137 documents: 学生手册, 研究生手册, 图书馆, 财务部, 计算中心, 保卫部, …) and a campus info tool. Answers are Markdown with cited source pages.
ask creates a conversation in the user's 小北 history and deletes it afterwards unless --keep.crates/xiaobei/; protocol in docs/portal-apps-api.md §1.3portal2017 → appSysRedir.do?appId=xiaobei → POST /_api/public/iaaa/finish → cookie xiaobei_auth_token (3 days). One silent re-login on 401.POST /_api/chat/conversations {initialName} → POST /_api/chat/threads/<mainThreadId>/turns (Idempotency-Key, knowledge scope = 小北知识库, 14 document types) → poll GET …/history every 2 s until the turn is not running → the item with the turn's assistantItemId (content Markdown, sourceLinks) → DELETE /_api/chat/conversations/<id>.src/lib.rs — Clap CLI; src/commands.rs — ask (poll loop) and presetssrc/login.rs, src/api.rs — hand-off login, HTTP with re-loginsrc/parse.rs — conversation / turn / history / presets parsers, request body, UUID; unit tests on fixtures/ (conversation + turn are real captures, history is built from the documented shape)| Command | 用途 |
|---|---|
login -p / status / logout | 登录 / 状态 / 退出 |
ask "<问题>" [--keep] [--timeout 120] | 提问;输出 Markdown 回答 + 参考来源(通常 20–40 秒) |
presets | 小北的预设问题(按分类) |
xiaobei ask "本科生休学最长可以多久?"
xiaobei ask "图书馆周末几点闭馆?"
/_api/preset-questions was not captured; parse_presets accepts several common shapes~/.config/info/xiaobei/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 持久化。/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