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
npx -y skills add JMY2003/a-skill-to-do-anything-in-zhihuAssembled 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-plancontaining 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 useanswer. 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
--directwhen the user asked to publish. Read markdown-publishing.md. - Inspect or manage the user's creations: use
creator list,creator stats,creator edit, orcreator 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
- Reuse
--browser default --account defaultunless the user asks for another account or browser. - Prefer one
run-planover repeated single commands. - Use semantic actions such as
upvoteandfavorite; avoid brittle CSS selectors unless diagnosing a changed page. - Preserve
blocked,unconfirmed, andfaileddistinctions in the reported result. - Do not retry a mutating action after an unconfirmed result until
interaction-stateor a fresh page inspection shows whether it already took effect. - Never describe a staged comment, answer, or article as submitted or published.
- Keep generated task artifacts; they contain step records and failure diagnostics needed for debugging.
- Do not use
continueOnErrororcontinueOnUnconfirmedfor later mutating steps; an adverse record still makes the final CLI outcome nonzero. - Use the
type:idkey returned bycreator listfor 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/
- openai.yaml356 B
references/
- answering-questions.md2.4 KB
- creator-management.md2.6 KB
- markdown-publishing.md2.7 KB
- operation-plans.md4.0 KB
- sdk-architecture.md4.1 KB
- ui-workflows.md2.3 KB
scripts/
- browser_fixture_selftest.mjsruns7.2 KB
- live_smoke.mjsruns1.3 KB
- sdk/account_manager.mjsruns3.5 KB
- sdk/answer_verification.mjsruns2.2 KB
- sdk/creator_management.mjsruns19.8 KB
- sdk/diagnostics.mjsruns4.6 KB
- sdk/interaction_actions.mjsruns10.4 KB
- sdk/markdown_pipeline.mjsruns8.9 KB
- sdk/plan_runner.mjsruns6.3 KB
- sdk/publish_verification.mjsruns1.5 KB
- sdk/question_discovery.mjsruns2.2 KB
- sdk/runtime_guard.mjsruns5.7 KB
- sdk_selftest.mjsruns15.1 KB
- sdk/task_artifacts.mjsruns2.8 KB
- sdk/zhihu_feed_explorer.mjsruns4.6 KB
- validate_all.mjsruns1.1 KB
- zhihu_article.pyruns4.4 KB
- zhihu_web.mjsruns91.7 KB
- .gitignore76 B
- package.json448 B
- README.md6.7 KB