/pku-cli:info-authfrom pku-cli
Manages PKU unified credentials via CLI, storing passwords in OS keyring and checking session status across PKU services. Use before other PKU tools for auto-login.
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.
Secure credential management for all PKU IAAA-based CLI tools. Allows AI Agents to trigger login flows without ever seeing passwords.
AI Agents (like OpenClaw/Claude Code) cannot and should not handle user passwords directly. This tool lets users store credentials once in the OS keyring, then all CLI tools auto-authenticate from the keyring.
crates/info-auth/keyring crate
info-pku| Command | Alias | Function |
|---|---|---|
store | save | Interactively input and store credentials to OS keyring |
status | Show credential storage status (never shows password) | |
check | Show session status for ALL services (treehole/course/campuscard/elective) | |
clear | Remove credentials from OS keyring |
When any CLI tool runs login -p, credentials are resolved in this order:
info-auth store (recommended)PKU_USERNAME + PKU_PASSWORD (for CI/automation)SMS verification codes follow a similar pattern:
PKU_SMS_CODE (Agent can set this after asking user)info-auth store
# User enters username + password interactively
# Credentials stored in OS keyring, encrypted
# 1. Check which services have valid sessions
info-auth check
# 2. Login to any service (auto-reads credentials from keyring)
treehole login -p
course login -p
campuscard login -p
elective login -p # may need: --dual major / --dual minor
# 3. If SMS verification is needed (treehole first login):
# Ask user for the code, then set env var:
PKU_SMS_CODE=123456 treehole login -p
# 4. Use the service
treehole list
course courses --all
campuscard info
elective show
info-auth status to checkinfo-auth check shows "未登录" or "会话已过期", run <tool> login -pinfo-auth storeanyhow::Result with .context("中文描述")store command requires password confirmation (enter twice)keyring_has_credential() returns diagnostic info on failure for debuggingWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
pku, credential-management, authentication, cli, keyring, unified-auth
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