/pku-cli:treeholefrom pku-cli
Rust CLI client for PKU Treehole anonymous forum and academic schedule. Use when developing or debugging the treehole crate, or when querying course schedules via the CLI.
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 anonymous discussion platform (PKU Helper Treehole).
crates/treehole/app_id="PKU Helper") → JWT callback at /chapi/cas_iaaa_login → optional SMS verify/chapi/api/v3/* (modern) and /chapi/api/* (legacy)docs/treehole-api.mdsrc/main.rs — Clap CLI definition with all subcommandssrc/commands.rs — Command implementations (login, post, search, etc.)src/api.rs — HTTP API client, request builders, response typessrc/display.rs — Terminal output formatting with colored cratesrc/client.rs — reqwest client builders (build for auth, build_simple for IAAA)| Command | Alias | Function |
|---|---|---|
login | IAAA password/QR login → JWT | |
logout / status | Session management | |
list | ls | Browse posts/feed |
show | View single post with replies | |
search | Full-text search | |
post | Create post (text, tags, images, rewards/树叶) | |
reply | Reply to a post | |
like / tread | Vote on posts | |
star / unstar / stars | Bookmark management | |
follow / unfollow | Follow posts | |
msg / read | Notifications | |
me | Profile + own posts | |
score | Grade query (with color rendering) | |
course | Weekly course schedule (canonical source — includes 主修 + 辅修 + 双学位) | |
schedule | This week's day-by-day schedule | |
academic-cal / activity-cal | Academic / activity calendar | |
otp | TOTP 2FA management (bind/set/show/clear) |
# Check session status
info-auth check
# Auto-login (reads credentials from OS keyring, no password needed)
treehole login -p
# If SMS verification is needed (first login or periodic):
PKU_SMS_CODE=123456 treehole login -p
Treehole may require SMS verification on first login or periodically (~30 days). When PKU_SMS_CODE env var is set, it auto-confirms sending and submits the code without interactive prompts.
anyhow::Result with .context("中文描述")redirect(Policy::none()) for manual redirect handling~/.config/info/treehole/ via info_common::session::Storeinfo_common::credential (keyring → env → interactive)info-common crate (see info-common skill for details)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