← Back to Skills Marketplace
m-lemon

知乎发帖-谷歌浏览器

by M-Lemon · GitHub ↗ · v0.0.2 · MIT-0
linux ✓ Security Clean
72
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install zhihu-publish-attach
Description
Publish Zhihu column articles on Linux via Chrome remote debugging (VNC login). After setup, use exec with zhihu_publish.sh and --title/--body-file. Triggers...
README (SKILL.md)

Zhihu publish (Chrome attach / Linux VNC)

This skill is self-contained: everything runs from {baseDir}/scripts/. No other repository files are required.

Publish column articles (专栏) by attaching to Chrome on 127.0.0.1:9222 after the user logged in via VNC.

Uses exec + bash {baseDir}/scripts/zhihu_publish.sh — not Browser Relay (see ClawHub zhihu-post for Windows).

First-time setup (after ClawHub install)

Run once on the Linux server:

bash {baseDir}/scripts/setup.sh
bash {baseDir}/scripts/install_chromedriver.sh
bash {baseDir}/scripts/start_chrome_debug.sh

In VNC: log in to Zhihu in that Chrome window.

Verify:

bash {baseDir}/scripts/zhihu_publish.sh --check --json

Expect: "ok": true, "logged_in": true.

Details: {baseDir}/references/linux-vnc-setup.md

When to use

  • Linux server + VNC, Chrome started with debug port 9222
  • Zhihu already logged in (or user can log in after start_chrome_debug.sh)
  • User wants to publish with title + body

Scripts in {baseDir}/scripts/

Script Purpose
setup.sh pip install selenium + chmod (after skill install)
install_chromedriver.sh Install chromedriver (once)
start_chrome_debug.sh Start Chrome (VNC window)
ensure_chrome_debug.sh Restart Chrome if closed (keeps login profile)
zhihu_publish.sh Agent entry — always use this
zhihu_attach_standalone.py Called by zhihu_publish.sh

Title and body (parameters)

Parameter How
--title "..." Required
--body-file /path Preferred for long text — write file first, then pass path
--body "..." Short text only
--publish Open editor and fill
--submit Click 发布 (real post; omit for dry-run)
--json JSON result for the agent
--no-ensure-chrome Skip auto-start (only if Chrome is already running)

Auto-start: Every zhihu_publish.sh run automatically calls ensure_chrome_debug.sh first. If the user closed the browser, Chrome restarts in the background with the same profile (~/.chrome-zhihu-automation) — login usually persists. No need to pass a separate flag unless debugging.

Never put user content inside one shell string. Use separate exec args or --body-file.

Agent workflow

0. Check login (Chrome auto-starts if closed)

bash {baseDir}/scripts/zhihu_publish.sh --check --json

1. Dry-run (fill draft, do not publish)

Write body to e.g. /tmp/zhihu_body.txt, then:

bash {baseDir}/scripts/zhihu_publish.sh \
  --publish \
  --title "USER_TITLE" \
  --body-file /tmp/zhihu_body.txt \
  --json

Confirm with user (VNC or chat). JSON has dry_run: true without --submit.

2. Real publish (only after user confirms)

bash {baseDir}/scripts/zhihu_publish.sh \
  --publish \
  --title "USER_TITLE" \
  --body-file /tmp/zhihu_body.txt \
  --submit \
  --json

Success: "ok": true, "submitted": true.

Exec examples

command: bash
args: ["{baseDir}/scripts/zhihu_publish.sh", "--check", "--json"]
command: bash
args: [
  "{baseDir}/scripts/zhihu_publish.sh",
  "--publish",
  "--title", "\x3Ctitle>",
  "--body-file", "/tmp/zhihu_post_body.txt",
  "--submit",
  "--json"
]

Chromedriver (version must match Chrome)

Selenium attach requires chromedriver even when Chrome is already running.
Install to /usr/local/bin/chromedriver (or set CHROMEDRIVER_PATH).

bash {baseDir}/scripts/install_chromedriver.sh
bash {baseDir}/scripts/verify_chrome_stack.sh

If you installed Chrome via dnf RPM (e.g. 148.0.7778.215), chromedriver must be the same build from Chrome for Testing — see {baseDir}/references/linux-vnc-setup.md.

Troubleshooting

Symptom Action
chromedriver not in PATH install_chromedriver.sh or export CHROMEDRIVER_PATH=/usr/local/bin/chromedriver
Version mismatch verify_chrome_stack.sh; re-download driver for your google-chrome-stable --version
Cannot connect to 9222 Usually auto-fixed on next zhihu_publish.sh run; or ensure_chrome_debug.sh
Browser closed Auto-restart on publish; re-login in VNC only if --check returns 401
Chrome starts but no window on VNC Set DISPLAY for the OpenClaw/exec user (e.g. export DISPLAY=:1)
No selenium module bash {baseDir}/scripts/setup.sh
API 401 Re-login in VNC

Safety

  • Without --submit = draft only.
  • Use --submit only when the user explicitly asks to publish.
  • Wait ≥ 3 minutes between posts if publishing repeatedly.
Usage Guidance
Install this only if you want an agent to control a dedicated logged-in Chrome profile for Zhihu posting. Review the setup commands before running sudo or downloading ChromeDriver, keep the remote debugging port local, use dry-run mode first, and only allow --submit when you are ready for a real public post.
Capability Tags
crypto
Capability Assessment
Purpose & Capability
The scripts and documentation consistently match the stated purpose: start or attach to local Chrome, verify Zhihu login, fill a column article draft, and publish only when the submit flag is used.
Instruction Scope
The trigger phrases are somewhat broad for a skill that can interact with a logged-in public account, but the runtime instructions distinguish dry-run drafting from real publishing and require explicit use of --submit for posting.
Install Mechanism
Setup installs Selenium and may download/install ChromeDriver or advise sudo system package commands; these are expected for Selenium-based browser automation, but users should verify sources and understand the host changes.
Credentials
Linux, VNC, Chrome remote debugging on 127.0.0.1, network access to Zhihu and Google ChromeDriver sources, and reading a body file are proportionate to the publishing workflow and are documented.
Persistence & Privilege
The skill keeps a dedicated Chrome profile at ~/.chrome-zhihu-automation and can start Chrome in the background so login persists; this is disclosed and bounded to the automation profile, with no cron or broader persistence found.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install zhihu-publish-attach
  3. After installation, invoke the skill by name or use /zhihu-publish-attach
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.0.2
- Added scripts/verify_chrome_stack.sh for checking Chrome and chromedriver versions. - Updated documentation to reflect improved auto-start behavior and troubleshooting steps. - Clarified chromedriver requirements and provided verification instructions. - Minor edits to parameter explanations and troubleshooting table for clarity.
v0.0.1
Initial release — publish Zhihu column articles via Chrome remote debugging on Linux VNC. - Publishes Zhihu 专栏 articles using local Chrome on port 9222 after VNC login. - Provides bash scripts for setup, Chrome launch, and attachment. - Supports draft and publish modes with clear distinction (`--submit` for real publishing). - Accepts title and body (recommended via file) as parameters; outputs results in JSON. - Includes troubleshooting steps and safe usage guidelines. - Designed for Linux, with dependencies on python3, curl, and unzip.
Metadata
Slug zhihu-publish-attach
Version 0.0.2
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is 知乎发帖-谷歌浏览器?

Publish Zhihu column articles on Linux via Chrome remote debugging (VNC login). After setup, use exec with zhihu_publish.sh and --title/--body-file. Triggers... It is an AI Agent Skill for Claude Code / OpenClaw, with 72 downloads so far.

How do I install 知乎发帖-谷歌浏览器?

Run "/install zhihu-publish-attach" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is 知乎发帖-谷歌浏览器 free?

Yes, 知乎发帖-谷歌浏览器 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does 知乎发帖-谷歌浏览器 support?

知乎发帖-谷歌浏览器 is cross-platform and runs anywhere OpenClaw / Claude Code is available (linux).

Who created 知乎发帖-谷歌浏览器?

It is built and maintained by M-Lemon (@m-lemon); the current version is v0.0.2.

💬 Comments