Grades
pkuinfo/pku-harness-plugins/plugins/grades
Your grades and GPA, semester by semester.
What the plugin can access
A plugin can only do what it declares here. The app shows you this same list before you install the plugin. If an update needs more access, the app asks you again.
- Campus serviceswith your sign-in
- Treeholetreehole.pku.edu.cn
The app sends these requests with your signed-in session. The plugin never sees your password, cookies or tokens.
- Other websites
None
- App features
- Treehole verification codes
- Tools
- Check gradesgrades.listScoresYour grades by semesterRead
- Check GPAgrades.gpaYour overall GPA and creditsRead
- Send verification codegrades.sendCodeText a treehole verification code to your phoneChange
- Screens and commands
- Dashboard widgets: gpa
System capabilities
Campus sign-in
Uses your signed-in campus session. Your password never leaves your phone.
Network
Connects to servers on the internet.
Cloud data
Does not use PKU harness Cloud.
Checks
- Maintained by pkuinfo. The source code is in the official plugins repository.
Instructions for the AI
The body text of PLUGIN.md. It is sent to the model together with the plugin.
成绩和绩点是隐私:只在用户明确问起时才调用 grades 的工具或提及具体分数,不要主动在其他回答、总结或看板建议里带出成绩。
- 问某学期/某门课的分数用 grades__listScores(可传 semester,如 "25-26-1" 或 "2025-2026-1");只问绩点用 grades__gpa。
- 已在「手机令牌」插件绑定时,成绩二次验证会自动完成,不必问用户。
- 返回 status "verification_required" 时:kind "login" 只能用短信;kind "course" 可用手机令牌(OTP)或短信。用 ui__render 给用户一个输入验证码的表单(发短信前先调用 grades__sendCode),拿到验证码后再调用原工具并传 code 和 method。
- GPA 以学校返回的为准(4 分制);gpa 为 null 表示学校没给出,不要自己估算冒充官方数字。
Manifest
The frontmatter of PLUGIN.md, exactly as written. Source: plugins/grades/PLUGIN.md. Field reference
spec: 1
id: grades
name: 成绩
description: 查询各学期成绩和绩点(GPA)。
version: 0.2.0
author: pkuinfo
icon: medal
homepage: https://github.com/pkuinfo/pku-harness-plugins/tree/main/plugins/grades
requires: [campus-session, network]
# Scores and GPA via the treehole course API (pkucli crates/treehole/src/api.rs get_scores,
# display.rs print_scores). Read-only. Shares treehole's course-data token with course-sync:
# verifying in either unlocks both until the server expires it.
campus: [treehole]
abilities: [verify]
tools:
listScores: tools/listScores.yaml
gpa: tools/gpa.yaml
sendCode: tools/sendCode.yaml
widgets:
gpa: widgets/gpa.json
i18n:
en:
name: Grades
description: Your grades and GPA, semester by semester.
tools: { listScores: { title: Check grades, summary: Your grades by semester }, gpa: { title: Check GPA, summary: Your overall GPA and credits }, sendCode: { title: Send verification code, summary: Text a treehole verification code to your phone } }
widgets: { gpa: { title: Overall GPA, description: 'Your overall GPA and total credits; hidden until you tap, since grades are private.' } }{
"id": "grades",
"name": "成绩",
"description": "查询各学期成绩和绩点(GPA)。",
"author": "pkuinfo",
"kind": "builtin",
"auth": "none",
"icon": "medal",
"requires": [
"campus-session",
"network"
],
"scopes": [
"treehole.pku.edu.cn"
],
"tags": [
"official",
"campus"
],
"version": "0.2.0",
"i18n": {
"en": {
"name": "Grades",
"description": "Your grades and GPA, semester by semester."
}
}
}Other plugins in this repository
pkuinfo/pku-harness-pluginsGenerative UIOfficial
ui
Lets the AI build native UI in the chat: forms, pickers and data cards.
No campus sign-in
DashboardOfficial
dashboard
A dashboard the AI builds for you and you can change any time.
No campus sign-in
Reminders and scheduled tasksOfficial
scheduler
On-time local reminders, plus scheduled checks on your data (like a balance) that notify you when a condition is met.
No campus sign-in
To-dosOfficial
todo
To-dos with due dates, on-time reminders, an important flag and repeats, plus a dashboard widget.
No campus sign-in
TimetableOfficial
timetable
Your class timetable, today’s classes and class reminders.
No campus sign-in
Official timetableOfficial
course-sync
Syncs this semester’s timetable from the university into Schedule.
Uses your campus sign-in forTreehole