agentsclimarketplace

Boss agent cli

Skill 1xiaoyueryuer/boss-hr-agent-toolkit/boss-agent-cli

BOSS 直聘 CLI 命令参考手册 — 34 个顶层命令,招聘者/求职者双模式。 本 Skill 是 boss-hr-auto 编排流程的参考引用,不应作为入口直接加载。From its SKILL.md

Install
npx -y skills add 1xiaoyueryuer/boss-hr-agent-toolkit --skill boss-agent-cli

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

3 things to look at

  • reads credentialsReads from 3 credential sources: `__zp_stoken__` and 2 more.
  • runs commandsInstructs the agent to run 7 commands, including `uv tool install boss-agent-cli` and 6 more.
  • fetches URLsInstructs the agent to fetch 1 URL, including http://localhost:9222.

SKILL.md

4.2 KB, ~1.4k tokens by cl100k_base, 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 --livelogged_in: truelive: 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          # 提取凭证并复检

硬性规则

  1. extract 返回非 ready → 停止流程,向用户报告缺失项(如 __zp_stoken__),禁止"先跑跑看"
  2. boss login --cdp 返回成功 ≠ 凭证完整(stoken 可能不在浏览器 cookie 中),必须以 extract 的复检 verdict 为准
  3. 守卫脚本已处理:PYTHONHOME 冲突清理、GBK 编码、boss 不在 PATH 时回退 %USERPROFILE%\bin\boss.cmd、CDP 未启动时自动拉起 Edge/Chrome

参考:Cookie 字段(仅背景知识,验收以上述三条为准)

关键 Cookie:zp_at(认证令牌)、wt2(一级登录态)、__zp_stoken__(二级令牌,候选人搜索/详情等只读流必需)、__zp_seo_uuid__bst

Recruiter Workflow

CommandDescription
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

CommandDescription
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 权限不足)
  • 默认低风险模式阻断批量操作
  • 候选人数据链路默认阻断敏感操作

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.