Install
openclaw skills install jwgl-queryQuery a university jwgl/教务系统 for teacher-facing data such as 课程表 and 考试相关信息(监考/考务安排、课程考试安排、考试信息). Also manage saved school URLs and teacher credentials through natural language. Use when the user asks to 查课程表、查考试安排、查监考/考务安排、添加学校 URL,或要求从教务系统按教师/学期提取表格结果。适合 legacy iframe-heavy jwgl sites with stored local credentials.
openclaw skills install jwgl-query执行教务系统查询并直接返回结果。优先按用户原话理解需求,不要把老师、学期、输出样式写死。
这个 skill 的正确分工是:
也就是说,用户应该直接说:
然后由 agent:
不要把 CLI 命令当作对用户的主入口。CLI 只是底层执行接口。
对 agent 而言,脚本应该被当作“执行接口”而不是“交互界面”:
优先用这个 skill 处理以下需求:
exam_all 聚合查询)如果用户只说“查考试安排”,优先用 exam_all。
course_schedule:课程表invigilation:考务安排 / 监考安排exam_course_arrangement:课程考试安排查询exam_info:考试信息查询exam_all:考试相关总查询(聚合考试类入口)查询类型细节见 references/query-types.md。
优先按下面这种方式理解并处理用户请求:
处理原则:
当用户说“添加老师”“录入老师账号”“记住某老师账号密码”时:
https://jwgl.example.edu.cn。”当用户说“添加学校”“保存学校 URL”“修改学校地址”“删除学校 URL”“设为当前学校”时:
https://jwgl.example.edu.cn。”{base_url}/jsxsd/framework/jsMain.jsp,一般不额外追问--school 或旧写法 --name--teacher 或旧写法 --name当用户说“删除老师”“删掉某老师信息”时:
current_teacher,也要说明当用户说“设为当前老师”“默认用某老师”时:
当用户发起查询时:
current_school,优先使用当前学校current_teacher,优先默认使用当前老师,并可简短说明current_teacher,追问:
2025-2026-2。”区分三种情况:
当用户问“现在有哪些老师”“列出老师账号”时:
推荐格式:
如果为空:
当查到课表时:
推荐格式:
08:00-09:40
如果用户问“今天还有什么课”或“明天课表”,优先只返回对应日期的子集,不把整周都贴出来。
当查到考试相关数据时:
exam_all 返回多类结果,可按 query_type 分组摘要:
当底层成功返回 count=0 时,不要说“报错”,应明确说:
如果条件可能有问题,可追加:
当底层返回结构化错误或执行失败时:
MISSING_TEACHER_CREDENTIALS)
TEACHER_NOT_FOUND)
TEACHER_ALREADY_EXISTS)
MISSING_REQUIRED_FIELDS / MISSING_TEACHER_NAME)
除非用户明确要求调试细节,否则不要直接把 traceback 或 CLI 原文贴给用户。
在 skill 根目录执行底层脚本时,可使用:
# 可手动初始化环境(首次拉取后)
bash scripts/setup.sh
# 查询执行(首次运行会自动补环境)
bash scripts/run.sh --config config.json --teacher "某老师" --term "2025-2026-2" --query-type exam_all --headless
bash scripts/run.sh --config config.json --teacher "某老师" --term "2025-2026-2" --query-type invigilation --headless
bash scripts/run.sh --config config.json --teacher "某老师" --term "2025-2026-2" --query-type exam_course_arrangement --headless
bash scripts/run.sh --config config.json --teacher "某老师" --term "2025-2026-2" --query-type exam_info --headless
bash scripts/run.sh --config config.json --teacher "某老师" --query-type course_schedule --headless
# 账号管理执行接口
python3 scripts/manage_accounts.py --config config.json list
python3 scripts/manage_accounts.py --config config.json add --teacher "某老师" --username "账号" --password "密码" --set-current
python3 scripts/manage_accounts.py --config config.json update --teacher "某老师" --password "新密码"
python3 scripts/manage_accounts.py --config config.json remove --teacher "某老师"
python3 scripts/manage_accounts.py --config config.json set-current --teacher "某老师"
python3 scripts/manage_accounts.py --config config.json school-list
python3 scripts/manage_accounts.py --config config.json school-add --school "某学校" --base-url "https://jwgl.example.edu.cn" --set-current
python3 scripts/manage_accounts.py --config config.json school-update --school "某学校" --base-url "https://jwgl.example.edu.cn"
python3 scripts/manage_accounts.py --config config.json school-remove --school "某学校"
python3 scripts/manage_accounts.py --config config.json school-set-current --school "某学校"
兼容旧写法(为了减少踩坑):
--school / --name--teacher / --name--username / --user / --account--password / --pass不要假设 scripts/*.sh 在安装后的 skill 目录里保留了可执行位。执行底层 shell 脚本时,优先使用 bash scripts/...。
调试探测脚本已放到 tools/,仅在诊断页面结构时使用,不作为主流程入口。
默认输出 JSON。
返回时:
--debug-dir账号管理的对外入口应是自然语言,例如:
agent 负责:
底层脚本仍保留,便于调试或手动执行:
python3 scripts/manage_accounts.py --config config.json list
python3 scripts/manage_accounts.py --config config.json add
python3 scripts/manage_accounts.py --config config.json update
python3 scripts/manage_accounts.py --config config.json remove
python3 scripts/manage_accounts.py --config config.json set-current
若查询时未找到该老师账号:
config.json 中保存凭据,不要外发references/query-types.md 再调整对应 query config