← 返回 Skills 市场
46
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install zhihu-publisher
功能描述
知乎文章自动发布技能。通过 xbrowser 控制 Chrome 浏览器完成知乎登录、撰写和发布文章的全流程。 触发词:发布知乎、知乎文章、zhihu publish、发知乎文章、知乎发文章。 依赖:xbrowser skill(--browser chrome)。
使用说明 (SKILL.md)
知乎文章自动发布
依赖
- xbrowser skill,xb 路径:
D:\QClaw\resources\openclaw\config\skills\xbrowser\scripts\xb.cjs - Chrome 浏览器(
--browser chrome),禁止使用 cft/edge(ref 失效 bug)
文章要求
- 目标字数:1500 字(含标点),下限 1200,上限 1800
流程一:登录(仅需一次)
1. 打开登录页
node xb.cjs run --browser chrome --headed open https://www.zhihu.com/signin
2. 切换密码登录
node xb.cjs run --browser chrome -- find role button click --name 密码登录
3. 获取 ref 并填写凭据
node xb.cjs run --browser chrome -- batch --bail "wait --load networkidle" "snapshot -i"
记录 textbox ref(通常账号 @e39、密码 @e40、登录按钮 @e12),然后:
node xb.cjs run --browser chrome -- batch --bail "fill @e39 \x3C账号>" "fill @e40 \x3C密码>" "click @e12"
⚠️ 账号密码通过用户输入获取,禁止写死到文件中。
4. 验证
- 如触发滑块验证码:URL 停留
/signin,需用户手动拖动滑块完成验证 - 登录成功:URL 变为
https://www.zhihu.com/
流程二:发布文章
1. 打开编辑器
node xb.cjs run --browser chrome --headed open https://zhuanlan.zhihu.com/write
node xb.cjs run --browser chrome -- batch --bail "wait --load networkidle" "snapshot -i"
2. 填标题
node xb.cjs run --browser chrome -- batch --bail "click @e25" "fill @e25 \x3C标题>"
3. 填正文(长文本用 JS 逐段插入)
❌ 直接
fill长文本(>500字符)会被命令行截断;fill中的\会变成普通字符。✅ 用
eval+document.execCommand('insertText')逐段插入,每段 \x3C500 字符。
node xb.cjs run --browser chrome -- eval "document.querySelector('.DraftEditor-root [role=textbox]').focus()"
node xb.cjs run --browser chrome -- eval "document.execCommand('insertText', false, '第1段内容...')"
node xb.cjs run --browser chrome -- eval "document.execCommand('insertText', false, '\
\
## 标题\
\
第2段内容...')"
# 继续分段...
4. 智能排版
node xb.cjs run --browser chrome -- batch --bail "snapshot -i" "click @e48"
@e48为创作助手面板中的「智能排版」按钮(name 含"智能排版自动修正空格"),实际 ref 以 snapshot 为准。
5. 发布
node xb.cjs run --browser chrome -- batch --bail "snapshot -i" "click @e37" "wait --load networkidle"
成功标志:URL 变为 https://zhuanlan.zhihu.com/p/\x3CID>,出现发布成功弹窗。
核心规则
| 规则 | 说明 |
|---|---|
| ref 必须每次刷新 | 每步操作前 snapshot -i,ref 只在同一 batch 内有效 |
| 禁止跨 batch 用 ref | batch 之间 ref 编号会重新生成 |
| 长文本用 eval | >500 字符的正文必须用 document.execCommand('insertText') 分段插入 |
| 正文后必须排版 | 插入完成后点击「智能排版」修复换行和标点 |
| 全程用 chrome | cft/edge 有 ref 失效 bug,--browser chrome 是唯一可靠选项 |
安全使用建议
This result is inconclusive: reinstall or rerun the review where metadata.json and the artifact directory can be read before making an install decision.
能力评估
Purpose & Capability
Artifact contents were not accessible through the shell tool, so purpose and capability coherence could not be verified from files.
Instruction Scope
Instruction scope could not be assessed because the artifact files could not be read.
Install Mechanism
Install mechanism could not be assessed because metadata.json and artifact contents were inaccessible.
Credentials
Environment proportionality could not be assessed from artifact evidence due to local sandbox execution failure.
Persistence & Privilege
Persistence and privilege behavior could not be assessed from artifact evidence due to local sandbox execution failure.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install zhihu-publisher - 安装完成后,直接呼叫该 Skill 的名称或使用
/zhihu-publisher触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of zhihu-publisher skill for automated Zhihu article publishing using xbrowser with Chrome.
- Supports full workflow: login, writing, formatting, and publishing articles on Zhihu.
- Requires xbrowser skill (Chrome only, cft/edge unsupported due to bugs).
- Ensures secure credential input (no credentials stored in files).
- Enforces best practices for ref usage and long text insertion via script commands.
- Includes smart formatting step before article publication.
元数据
常见问题
Zhihu Publisher 是什么?
知乎文章自动发布技能。通过 xbrowser 控制 Chrome 浏览器完成知乎登录、撰写和发布文章的全流程。 触发词:发布知乎、知乎文章、zhihu publish、发知乎文章、知乎发文章。 依赖:xbrowser skill(--browser chrome)。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 46 次。
如何安装 Zhihu Publisher?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install zhihu-publisher」即可一键安装,无需额外配置。
Zhihu Publisher 是免费的吗?
是的,Zhihu Publisher 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Zhihu Publisher 支持哪些平台?
Zhihu Publisher 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Zhihu Publisher?
由 verifier(@liuxucai)开发并维护,当前版本 v1.0.0。
推荐 Skills