Boss agent cli
BOSS 直聘 HR 智能体工具箱,基于 boss-agent-cli 的简历筛选全流程自动化
npx -y skills add 1xiaoyueryuer/boss-hr-agent-toolkit --skill boss-agent-cliAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 16 stars16 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
BOSS 直聘 CLI 命令参考手册 — 34 个顶层命令,招聘者/求职者双模式。 本 Skill 是 boss-hr-auto 编排流程的参考引用,不应作为入口直接加载。
SKILL.md
4.2 KB, as published. Nobody here has run it
boss-agent-cli
AI Agent 专用的 BOSS 直聘本地辅助 CLI 工具 — 34 个顶层命令,默认低风险模式聚焦本地辅助、只读优先、用户主动触发,不做自动触达、批量操作或平台数据抓取。
Install
uv tool install boss-agent-cli
# 或 pipx install boss-agent-cli
登录流程(守卫脚本状态机)
唯一入口:scripts/boss_login_guard.py(位于本 SKILL.md 同级 scripts/ 目录)。
⚠️ 禁止凭单一弱信号宣布登录成功。
boss status返回logged_in: true只代表本地有凭证文件,不代表凭证完整或可用(可能假阳性,也可能缺__zp_stoken__的半登录)。
登录验收标准(三条强信号,全部满足才算 ready)
| # | 验收项 | 判定 |
|---|---|---|
| 1 | 登录态存活 | boss status --live → logged_in: true 且 live: true |
| 2 | 凭证完整 | auth_state == "full"(wt2 与 __zp_stoken__ 均存在) |
| 3 | 凭证可用 | hr jobs list 返回 ok: true(真实数据探针) |
auth_state == "partial"(缺 __zp_stoken__)一律视为未完整登录,不得带病继续后续步骤。
状态机(check → open-login / extract)
GUARD="<本skill目录>/scripts/boss_login_guard.py"
# 第1步:检查(exit: 0=ready / 2=degraded / 3=not_logged_in / 4=cdp_unreachable)
python "$GUARD" check
# ready → 继续后续任务
# degraded(浏览器在线但缺 stoken)→ 重提取,无需用户操作:
python "$GUARD" extract
# not_logged_in / cdp_unreachable / extract 后仍 degraded:
python "$GUARD" open-login # 自动拉起 CDP 浏览器并打开登录页
# → 明确告知用户「登录页面已打开,请扫码登录」
# → 用户确认已扫码后:
python "$GUARD" extract # 提取凭证并复检
硬性规则
extract返回非 ready → 停止流程,向用户报告缺失项(如__zp_stoken__),禁止"先跑跑看"boss login --cdp返回成功 ≠ 凭证完整(stoken 可能不在浏览器 cookie 中),必须以extract的复检 verdict 为准- 守卫脚本已处理:
PYTHONHOME冲突清理、GBK 编码、boss不在 PATH 时回退%USERPROFILE%\bin\boss.cmd、CDP 未启动时自动拉起 Edge/Chrome
参考:Cookie 字段(仅背景知识,验收以上述三条为准)
关键 Cookie:zp_at(认证令牌)、wt2(一级登录态)、__zp_stoken__(二级令牌,候选人搜索/详情等只读流必需)、__zp_seo_uuid__、bst。
Recruiter Workflow
| Command | Description |
|---|---|
boss hr applications | 查看候选人投递申请 |
boss hr candidates <keyword> | 搜索候选人 |
boss hr chat | 招聘者沟通列表 |
boss hr resume | 查看/请求候选人简历 |
boss hr reply <friend_id> <message> | 回复候选人消息 |
boss hr request-resume <friend_id> --job-id <id> | 请求候选人附件简历 |
boss hr jobs list/online/offline | 职位列表与上下线管理 |
Key Commands
| Command | Description |
|---|---|
boss schema | 返回全部命令 JSON(Agent 首先调用) |
boss search <query> | 搜索职位(8 维筛选) |
boss detail <security_id> | 职位详情 |
boss hr resume <encryptGeekId> --job-id <encryptJobId> --security-id <securityId> | 查看候选人简历 |
boss login | 四级降级登录 |
boss status | 检查登录态 |
boss doctor | 诊断环境 |
Output Conventions
- stdout: JSON only (structured envelope)
- stderr: Logs and progress (controlled by
--log-level) - exit 0: Success (
ok: true) - exit 1: Failure (
ok: false)
Platform & Role
# 招聘者模式
boss --role recruiter --platform zhipin --cdp-url http://localhost:9222 <command>
# 求职者模式(默认)
boss ... (no flags)
Safety
- 不自动发消息(CLI 权限不足)
- 默认低风险模式阻断批量操作
- 候选人数据链路默认阻断敏感操作