agentleFS
Viy1204Viy1204/hr-skills/skills/liepin-cli/SKILL.md

liepin-cli

Skill10 starsChanged 6 months agoMITView on GitHub

猎聘(lpt.liepin.com)招聘者端自动化 CLI:登录、人才搜索、简历详情、推荐/人才库、聊天列表/记录、 主动打招呼。当用户提到猎聘、liepin、招聘自动化、候选人搜索、批量打招呼、向候选人主动发消息等场景时 立即触发本 skill;典型说法:"用猎聘搜一下前端"、"猎聘打招呼"、"猎聘的简历怎么导出"、"看 一下聊天记录"、"猎聘的推荐候选人"。它封装了 `liepin` CLI 的常用子命令(search / resume / recommend / talent / chatlist / chatmsg / greet / joblist),适用于猎聘上有账号、需要反复搜索 / 浏览 / 主动触达候选人的 HR 或招聘场景。

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. dizhouid-lgtm/liepin-ai-loop-recruiting★ 3same name
    2. xllinbupt/MCP2skill★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository4 other files it gives its agents.

The file

Files
SKILL.md

猎聘 CLI (liepin-cli)

What this is

  • 包名:@viyzhu/liepin-cli(npm 全局安装后得到 liepin 命令)
  • 本质:本地 Node/TypeScript CLI,通过 puppeteer-core 驱动本机已安装的 Chrome/Edge(不自带浏览器内核),模拟招聘者端操作 lpt.liepin.com
  • 不是托管 API:智能体在本机终端跑 liepin,用户需已登录(或调用 liepin login)

Prerequisites

  • Node.js ≥ 20
  • Chrome / Edge:自动检测 Windows / macOS / Linux 常见安装路径;检测失败时手动设置 CHROME_PATH
    # macOS
    export CHROME_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
  • 凭据:不要把账号 cookie、token 等敏感信息提交到仓库。猎聘通过 liepin login 在本地浏览器登录即可

How to run

  • liepin 无参:打印帮助并退出(没有交互式 REPL,所有命令都是一次性执行)
  • 一次性命令:liepin <subcommand> ...,执行完即退出
  • 全局选项:--json 以结构化 JSON 输出(便于 AI Agent 解析);--help / -h 打印帮助;--version / -v 打印版本

常用子命令

登录

liepin login

搜索人才

# 基础搜索
liepin search 前端工程师

# 带筛选条件
liepin search 前端工程师 --city 北京 --experience 3-5年 --salary 20-30K

查看简历

# resumeId = search / recommend / talent 返回的 resume_id
liepin resume <resumeId>

推荐 / 人才库

liepin recommend      # 平台推荐候选人
liepin talent         # 个人人才库
liepin joblist        # 当前账号下的职位列表(取 jobId 用于 greet)

主动打招呼(重点)

这一步是 boss-cli 不擅长、但猎聘上招聘方每天都做的事:拿到候选人 ID 后一键打招呼。

# usercId = search / recommend / talent 返回的 user_id
liepin greet <usercId> --ejobId <jobId>

--ejobId 强烈建议传,作用是关联到具体职位 + 触发平台对招呼语 / 权限的校验;不传也能跑(走默认路径),但有些职位不传 ejobId 会失败(platform 校验)。LPT 接口走 com.liepin.im.b.chat.to-chat2,使用职位预设招呼语,不支持自定义消息文本——如需个性化文案,先打招呼建立会话,再在 IM 里发。

聊天管理

liepin chatlist                          # 聊天列表
liepin chatmsg <oppositeImId>            # 与某候选人的聊天记录(imId = chatlist 返回的 im_id)

命令参数

下表参数名与代码 src/toolset/*.ts 中的 *Options 字段完全一致;位置参数用 <> 标记,命名参数用 -- 前缀。

命令参数类型默认说明
searchquery位置—关键词(必填)
--city命名—城市(如:北京、上海)
--experience命名—工作经验(如:3-5年)
--salary命名—薪资范围(如:20-30K)
--degree命名—学历(如:本科)
--industry命名—行业
--page命名1页码(0 基,内部会 -1)
--limit命名20返回条数(最大 40)
recommend--jobTitle命名—岗位关键字(模糊匹配)
--jobId命名—直接指定 ejobId
--page命名1页码
--limit命名20返回条数(最大 40)
talentquery位置—关键词(必填)
--city命名—城市
--experience命名—工作经验
--salary命名—薪资范围
--degree命名—学历
--page命名1页码
--limit命名20返回条数
resumetalentId位置—简历 ID(search / recommend / talent 返回的 resume_id,必填;代码字段名为 talentId)
chatlist--limit命名30返回条数
chatmsgoppositeImId位置—对方 imId(chatlist 返回的 im_id,必填)
--limit命名50返回消息数(最大 100)
greetusercId位置—候选人 user_id(必填;字段名是 usercId 不是 userId)
--ejobId命名''关联职位 ID(强烈建议传;不传也能跑,部分职位不传会失败)
joblist--status命名''职位状态过滤(10 审核中 / 11 招聘中 / 12 已暂停 / 13 已关闭 / 20 审核未通过)
--page命名1页码
--limit命名20返回条数(最大 40)
login--timeout命名120登录等待超时(秒)
skillaction位置install目前仅支持 install,传 uninstall 等其他值会报错

故障排除

Chrome 未找到(自动检测失败)

export CHROME_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
# Windows 常见路径
# set CHROME_PATH="C:\Program Files\Google\Chrome\Application\chrome.exe"

登录失败

  1. 确认 Chrome 已安装并能正常打开
  2. 检查网络
  3. 手动在浏览器登录一次后再用 CLI(Cookie 可能因过期被踢)

Skill 安装路径

# 默认复制到 ~/.claude/skills/liepin-cli/
# 卸载:手动删除该目录
# 自定义安装路径:
export LIEPIN_SKILL_TARGET_DIR="$HOME/my-skills/liepin-cli"
liepin skill install

When not to use this skill

  • Boss 直聘的同类操作:走 boss-cli
  • 不需要登录就能访问的公开页面抓取:直接 web fetch / scrape
  • 已下载到本地的简历文件本身的解析 / 抽取:这是简历解析 skill 的事,与本 skill 无关

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.