cursor-cli
Skill1 starsChanged 50 days agoMITView on GitHub
Use when Hermes must run cursor-cli / cursor-agent: drafting, or a coding task the user explicitly hands to Cursor (print, stream, model pick).
- Reads credentials
3 other projects use a version of this.
Adopted by
Most recently taken up by
- SnowyLake/snowy-agent-skillstheir own version, first seen Oct 20, 2026
- SnowyLake/SnowySkillstheir own version, first seen Oct 20, 2026
- Ottili-ONE/skillstheir own version, first seen Oct 13, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- SnowyLake/snowy-agent-skills★ 4same name
- SnowyLake/SnowySkills★ 4same name
- Ottili-ONE/skills★ 2same 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 repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- ai-hotspot-digestSkill
- convert-documents-to-markdownSkill
- desktop-browser-chromeSkill
- feishu-chat-style-reviewSkill
- feishu-ui-feedbackSkill
- figma-copy-proofreadSkill
- hermes-daily-reviewSkill
- hermes-upstream-checkSkill
- writing-with-cursorSkill
The file
Files
cursor-cli(Hermes 调用 Cursor Agent)
Hermes 调 Cursor Agent CLI 的适配器。只管怎么启动、选模型、盯流式输出。
不管:写什么、写作口径、飞书写入 → 由调用方写作 skill 决定。
本机细节:若 references/local-*.md 存在,先读它(本机调用方 skill 与额外约束)。
When to Use
- 用户或其它 skill 说
cursor-cli/cursor-agent/ Cursor 再写一版 - 调用方写作 skill 的第一稿和改稿
writing-with-cursor:成篇文案 / 文档润色- 用户明确说「交给 cursor / 让 cursor 写 / 用 cursor 改代码」的编码任务(见下方「编码任务」)
- 要把任务交给 Cursor CLI 而不是自己润色交差
不要用
- 操作 Cursor IDE 窗口 / 键鼠
- 只问「Cursor 是什么」
- 飞书短回复、确认、一句改(见
writing-with-cursor) - 用户没点名 Cursor 的编码任务:Hermes 不自己决定外包
Prerequisites
- 二进制:
~/.local/bin/cursor-agent(login zsh 里cursor-cli是它的 alias) - Hermes 默认 非 login bash,看不到 alias
- 调用必须
zsh -lic(硬·2026-09-21):解析用zsh -lic 'whence -v cursor-cli';真正跑也包进zsh -lic,或直接~/.local/bin/cursor-agent。禁止在非 login shell 里which cursor-cli后宣称没有,再空等--print。 - 必须后台
stream-json:禁止前台--output-format text/ 裸--print干等。jsonl 长时间 0 增长或只见 reconnect → kill。课例 2026-09-20 长文空转 34 分钟。
How to Run
- 选模型(调用方没点名时走这条):
python3 ${HERMES_SKILL_DIR}/scripts/pick_gemini_flash.py
# 打印一行,例如 gemini-3.8-flash-high;3.9 在 list 里就会打印 3.9禁止写死带小版本的 Gemini id。picker 失败 → 告诉用户并按调用方降级。版本下限只在脚本 FLOOR,不要抄进 MEMORY。
- 非交互 print + 流式(长任务默认;必须
zsh -lic或绝对路径二进制):
terminal(
command="zsh -lic '~/.local/bin/cursor-agent --print --output-format stream-json --stream-partial-output --trust --force --sandbox disabled --model <id> --workspace <dir> --add-dir <extra> \"$(cat <prompt-file>)\"'",
background=true
)stdout 逐行落 jsonl;text delta 同步写调用方指定的 md。notify 盯结束。
- 盯进度:轮询 md/jsonl 体积。长时间 0 增长或只见 reconnect → kill 再跑。禁止
--output-format text前台干等。 - 超时(硬):墙钟 12 分钟仍无切干净的终稿 → kill,按调用方降级自己写,第一句标明「Cursor 超时」。不要空等到用户催。
编码任务(用户明确交给 Cursor 时)
- 账号:只用主号(
~/.local/bin/cursor-agent,不设CURSOR_CONFIG_DIR);禁止cursor-cli002/cursorn。跑之前unset CURSOR_API_KEY CURSOR_CONFIG_DIR AGENT_CLI_CREDENTIAL_STORE。 - 命令同上面第 2 步:后台 stream-json,
--workspace是用户给的仓库;12 分钟超时规则照旧。 - 模型:用户没说 →
auto(套餐里 Auto/Composer 额度宽松)。说了 → 查下表。 - 收尾:让 Cursor 在最后输出改了哪些文件;Hermes 自己
git -C <仓库> status --short和git diff --stat核对,再回复用户。不替 Cursor 补写代码冒充它的产物。
切换模型
先跑 ~/.local/bin/cursor-agent --list-models,在输出里按下表前缀找 id;同前缀多个时取版本号最高、不带 -fast 的那个(用户说「快一点」才带 -fast)。找不到 → 告诉用户「当前 Cursor 没有 X」,列出相近的 id,不擅自换别的模型。
| 用户说法 | id 前缀 | 备注 |
| 没说 / 自动 | auto | 默认 |
| composer | composer- | Cursor 自家模型,额度宽 |
| opus / claude | claude-opus- | 带 -thinking-high 的那个 |
| sonnet | claude-sonnet- | 同上 |
| gpt / sol | gpt- + 最新 -sol-high | 「luna」→ -luna- |
| codex | gpt-*-codex | 默认不带 low/high 后缀;「高强度」→ -high |
| grok | grok- | 默认 -medium |
| gemini | gemini- | 写稿仍走 pick_gemini_flash.py |
用户中途说「换成 X」:kill 当前后台进程,用新 --model 重跑同一个 prompt 文件,告诉用户已切换到哪个 id。
Quick Reference
| 要做 | 命令 |
| 解析入口 | zsh -lic 'whence -v cursor-cli' 或 ~/.local/bin/cursor-agent |
| 列出模型 | ~/.local/bin/cursor-agent --list-models |
| 最新 Gemini Flash-high | python3 ${HERMES_SKILL_DIR}/scripts/pick_gemini_flash.py |
| 只读问答 / 改稿润色 | 加 --mode ask(现稿塞进 prompt,不扫仓) |
| 只规划 | 加 --mode plan |
| 编码任务换模型 | 查「切换模型」表,--list-models 核对后改 --model |
Procedure
- 写好 prompt 文件(调用方给契约;本 skill 不发明写作口径)。
- 解析二进制;没有 → 停,让调用方降级。
- 取
--model:调用方指定 或pick_gemini_flash.py。 - 后台 stream-json;workspace /
--add-dir由调用方给。 - 从产物里切干净终稿(掉 prompt 回显、过程句、重复全文)。
- 完成标准:md 有调用方要的终稿,且 jsonl 不再增长。
Pitfalls
| 坑 | 处理 |
非 login shell which cursor-cli 说没有 | zsh -lic 或直接 ~/.local/bin/cursor-agent;禁止空等 --print(课例 2026-09-20 空转 34 分钟) |
前台等 --print text,日志一直空 | 后台 + stream-json + delta 写 md;jsonl 不增长就 kill |
写死 gemini-3.8-flash / 用 IDE 短名 | CLI id 带 -high;用 picker |
| 自己润色却说是 Cursor 稿 | 必须真跑 cursor-agent |
| 流式把 prompt/过程句当终稿 | 按调用方标记切干净 |
Verification
~/.local/bin/cursor-agent --list-models有输出- picker 打印的 id 出现在
--list-models里,且是最高gemini-*.flash-high(下限见脚本FLOOR) - 后台 jsonl 有 text delta,不是空转 reconnect
- 终稿文件不是 Hermes 自己改写的第一稿冒充
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
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.

