agentsclimarketplace

A skill to do anything in zhihu

Skill JMY2003/a-skill-to-do-anything-in-zhihu

Operate Zhihu through its web interface with a persistent local browser session. Use for first-run login and later session reuse, content search and collection, finding suitable questions, writing Markdown answers, question/answer/article browsing, upvotes, downvotes, comments, favorites, follows, notifications, creator content listing and analytics, editing or deleting existing creations, repeatable multi-step plans, and reliable answer or article staging and direct publishing with verified outcomes.From its SKILL.md

Install
npx -y skills add JMY2003/a-skill-to-do-anything-in-zhihu

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

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

6.9 KB, ~1.5k tokens by cl100k_base, as published. Nobody here has run it

Do Anything In Zhihu

Use the scripts in this skill as the primary interface. They run against a persistent browser profile, preserve the user's login, and report blocked or unconfirmed operations instead of claiming success without evidence.

Start Here

SKILL_DIR="/absolute/path/to/do-anything-in-zhihu"
"$SKILL_DIR/scripts/zhihu_web.mjs" login --browser default --account default

Resolve SKILL_DIR to the directory containing this SKILL.md; do not assume a user-specific installation path.

Install the locked runtime dependencies once after cloning or updating:

cd "$SKILL_DIR" && npm ci

Ask the user to finish login only when this command cannot verify an existing session. Subsequent commands reuse the same profile and CDP browser; do not close it between steps.

Check current state when a workflow starts or after a login-related failure:

"$SKILL_DIR/scripts/zhihu_web.mjs" status --browser default --account default

Choose A Workflow

  • Search or collect information: use search, then inspect returned canonical URLs and metadata. Read ui-workflows.md.
  • Browse or interact with one item: create one run-plan containing navigation, state inspection, and the requested action. Read operation-plans.md.
  • Find a suitable question or write an answer: use find-questions, inspect the ranked candidates, then use answer. Read answering-questions.md.
  • Write or publish an article: prepare Markdown, optionally package it, stage it first when publication was not explicitly requested, and use --direct when the user asked to publish. Read markdown-publishing.md.
  • Inspect or manage the user's creations: use creator list, creator stats, creator edit, or creator delete. Read creator-management.md.
  • Diagnose browser/session/runtime behavior: read sdk-architecture.md.

Search

"$SKILL_DIR/scripts/zhihu_web.mjs" search "大模型推理优化" \
  --limit 20 --out /tmp/zhihu-search.json

Use the structured items output instead of scraping navigation text. Treat an empty result with diagnostics as empty or blocked, not as a successful collection.

Browse And Interact

Use a plan for multi-step work so one browser tab and one login session are reused:

"$SKILL_DIR/scripts/zhihu_web.mjs" run-plan /absolute/path/to/plan.json \
  --out /tmp/zhihu-plan-result.json

Supported plan actions include goto, search, find-questions, answer-question, scroll, extract, interaction-state, upvote, downvote, favorite, unfavorite, follow, share, comment, notification, wait, and diagnose.

For comments, direct: false only fills and verifies the editor. Set direct: true when the user requested submission. Upvote, downvote, favorite, and follow operations require an observed control-state change; an unconfirmed result stops the plan by default.

Plan results distinguish done, staged, unconfirmed, blocked, and failed. run-plan exits nonzero when any step is failed, blocked, or unconfirmed; never infer success from a written artifact alone.

Find And Answer Questions

"$SKILL_DIR/scripts/zhihu_web.mjs" find-questions "向量数据库如何选型" --limit 8
"$SKILL_DIR/scripts/zhihu_web.mjs" answer https://www.zhihu.com/question/123456 /absolute/path/to/answer.md

The first command deduplicates answer links into question candidates and read-only inspects top candidates for answerability. The second stages a Markdown answer without publishing. Add --direct only when the user asked to submit the answer.

Publish Markdown Articles

Markdown can be passed directly:

"$SKILL_DIR/scripts/zhihu_web.mjs" publish /absolute/path/to/article.md

Without --direct, this opens the editor, writes the title/body, applies topics, verifies the rich structure, and leaves a Zhihu draft. To publish immediately:

"$SKILL_DIR/scripts/zhihu_web.mjs" publish /absolute/path/to/article.md --direct

Direct publication is confirmed only after the browser reaches a canonical https://zhuanlan.zhihu.com/p/<id> page whose title matches the staged article. An editor URL ending in /edit never counts as published.

Manage Existing Creations

"$SKILL_DIR/scripts/zhihu_web.mjs" creator list --type all --limit 50
"$SKILL_DIR/scripts/zhihu_web.mjs" creator stats answer:123456 --period all
"$SKILL_DIR/scripts/zhihu_web.mjs" creator edit answer:123456 /absolute/path/to/revised.md
"$SKILL_DIR/scripts/zhihu_web.mjs" creator delete answer:123456

creator edit stages and verifies the revised Markdown unless --direct is present. creator delete without --direct resolves the exact creator card and returns staged; with --direct, deletion is confirmed only after the exact target card disappears following Zhihu's confirmation dialog. Never treat a menu click or toast alone as completion.

Operating Rules

  1. Reuse --browser default --account default unless the user asks for another account or browser.
  2. Prefer one run-plan over repeated single commands.
  3. Use semantic actions such as upvote and favorite; avoid brittle CSS selectors unless diagnosing a changed page.
  4. Preserve blocked, unconfirmed, and failed distinctions in the reported result.
  5. Do not retry a mutating action after an unconfirmed result until interaction-state or a fresh page inspection shows whether it already took effect.
  6. Never describe a staged comment, answer, or article as submitted or published.
  7. Keep generated task artifacts; they contain step records and failure diagnostics needed for debugging.
  8. Do not use continueOnError or continueOnUnconfirmed for later mutating steps; an adverse record still makes the final CLI outcome nonzero.
  9. Use the type:id key returned by creator list for edit, data, and delete operations; do not select a creation by title alone.

Utilities

Create a self-contained article package:

python3 "$SKILL_DIR/scripts/zhihu_article.py" create \
  --markdown /absolute/path/to/article.md \
  --out /absolute/path/to/package \
  --topic 人工智能 --topic 软件工程 \
  --comment-mode open

Run local regression checks after changing the skill:

cd "$SKILL_DIR" && npm run check

What ships with it: 28 files

219.1 KB alongside SKILL.md, 18 of them executable

agents/

Keep looking

Skills are one crate of 326,758. 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.