zhihu-publish
Skill168 starsChanged 3 months agoMITView on GitHub
Publish Markdown articles to Zhihu Columns through authentication context recovered locally from Bifrost traffic and a built-in publish payload schema, save drafts, prevent duplicate posts, and verify the live title/body without browser automation. Use when the user asks to create, preview, save, publish, repost, or验收 a 知乎/知乎专栏/Zhihu article, or automate future Zhihu article releases from Markdown.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- momo0338/skillstheir own version, first seen Oct 11, 2026
- Harzva/learn-likecctheir own version, first seen Apr 30, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- Harzva/learn-likecc★ 57same name
- momo0338/skills★ 1same 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 repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- codex-task-inspectorSkill
- design-mdSkill
- e2e-testSkill
- e2e-verifySkill
- github-actions-patSkill
- juejin-publishSkill
- rust-project-validateSkill
- site-cookie-loginSkill
- bifrostSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 9 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Never print or save Cookie values, XSRF tokens, x-zse-*, x-zst-*, raw request headers, or unredacted Bifrost traffic.
- Distinctive: line 16
Start the body with the introduction or an H2.
- Distinctive: line 17
Keep one source file per intended article so duplicate prevention remains stable.
- Distinctive: line 22
Read traffic-contract.md only when diagnosing a Zhihu API or capture change.
- Distinctive: line 26
Always run a dry run before a live write:
- Distinctive: line 36
Check the captured authentication/signing state without exposing credentials:
- Very specific: line 44
Use --draft-only for a Zhihu draft.
- Very specific: line 59
Read only their authentication and endpoint-specific signing headers locally with bifrost traffic get.
- Distinctive: line 60
Create or resume a draft, then update title and HTML content.
- Very specific: line 64
Treat already_published as successful duplicate prevention.
- Distinctive: line 89
After publishing, compare the rendered title and body with the source without browser automation:
- Distinctive: line 118
Never weaken assertions or retry validation errors as authentication failures.
- Distinctive: line 120
Verify the live page after every real publish.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Zhihu Publish
Use the bundled scripts for deterministic publishing. Do not operate Chrome or another browser through UI automation. Read only authentication and endpoint-specific signing context from Bifrost traffic. The stable publish payload schema is built into the script; never read a captured request body as a reusable template.
Never print or save Cookie values, XSRF tokens, x-zse-*, x-zst-*, raw request headers, or unredacted Bifrost traffic.
Prepare the article
Copy article.template.md and fill title. The remaining fields are optional.
- Start the body with the introduction or an H2; do not repeat the title as an H1.
- Keep one source file per intended article so duplicate prevention remains stable.
- Existing frontmatter fields for another platform are allowed and ignored.
- The renderer supports headings, paragraphs, lists, links, images, inline code, fenced code blocks, blockquotes, emphasis, and horizontal rules.
- Images may use HTTP(S), a local JPEG/PNG/GIF/WebP/BMP path relative to the article, an absolute local image path, or a matching base64 data URI. Live writes transfer every non-Zhihu image to Zhihu first; SVG and files over 20 MiB are rejected.
Read traffic-contract.md only when diagnosing a Zhihu API or capture change.
Preview
Always run a dry run before a live write:
.agents/skills/zhihu-publish/scripts/zhihu-publish \
--article /absolute/path/article.md \
--dry-runConfirm the title, Markdown/HTML character counts, action, duplicate state, and image counts. Dry-run never uploads an image.
Check the captured authentication/signing state without exposing credentials:
.agents/skills/zhihu-publish/scripts/zhihu-publish --check-authSave a draft or publish
Use --draft-only for a Zhihu draft. Use --publish only when the user explicitly requests publication.
.agents/skills/zhihu-publish/scripts/zhihu-publish \
--article /absolute/path/article.md \
--draft-only
.agents/skills/zhihu-publish/scripts/zhihu-publish \
--article /absolute/path/article.md \
--publishThe script performs the captured workflow:
- Find recent Zhihu draft and publish requests with
bifrost search. - Read only their authentication and endpoint-specific signing headers locally with
bifrost traffic get. - Create or resume a draft, then update title and HTML content.
- Assemble the built-in publish payload schema with the new draft ID, title, content, disclosure settings, and trace ID.
- Publish and store only IDs, URL, and a content hash in local state.
Treat already_published as successful duplicate prevention. Do not use --force-new unless the user explicitly wants a second post from the same source.
To change the same already-published article, require explicit user intent and pass --update-existing:
.agents/skills/zhihu-publish/scripts/zhihu-publish \
--article /absolute/path/article.md \
--publish \
--update-existingTo adopt a known existing Zhihu article into the local idempotency state, require explicit user intent and pass its numeric ID. This is useful for replacing a temporary protocol-probe article without editing the state file by hand:
.agents/skills/zhihu-publish/scripts/zhihu-publish \
--article /absolute/path/article.md \
--publish \
--update-existing \
--article-id 1234567890The live workflow uploads remote images through POST /api/uploaded_images, uploads local/data images as multipart picture, accepts only HTTPS URLs on Zhihu's allowlisted upload hosts (*.zhimg.com or the exact pic-private.zhihu.com host), and emits standalone images as <figure> nodes before saving or publishing. The private upload URL is temporary; Zhihu must rewrite the published article to stable *.zhimg.com content.
Verify the live article
After publishing, compare the rendered title and body with the source without browser automation:
.agents/skills/zhihu-publish/scripts/zhihu-verify ARTICLE_ID \
--article /absolute/path/article.mdThe verifier reuses safe, local Bifrost request context to load Zhihu, normalizes rendered text, rejects a duplicated title at the start of the body, and requires the expected image count with every public image hosted on stable HTTPS *.zhimg.com. It returns status=verified only when text and images both match.
Authentication recovery
The scripts first reuse the newest valid Bifrost capture. If no usable capture exists, do not copy cookies manually. Ask the user to open the Zhihu editor and perform one normal save or publish while Bifrost is running, then retry.
For a bounded capture command, use:
bifrost capture wait \
--host zhuanlan.zhihu.com \
--path /api/articles/drafts \
--method POST \
--timeout 5m \
--format jsonA formal publish also needs a recent POST www.zhihu.com/api/v4/content/publish capture because Zhihu supplies endpoint-specific signing headers. Its request body is not read or reused.
Safety and validation
- Accept production API bases only on
https://zhuanlan.zhihu.comandhttps://www.zhihu.com; allow loopback only for tests. - Never weaken assertions or retry validation errors as authentication failures.
- Persist a new draft ID before updating it so interrupted runs resume without creating duplicates.
- Verify the live page after every real publish.
- Validate changes with:
node --test .agents/skills/zhihu-publish/scripts/*.test.mjs
python3 /Users/eden_studio/.codex/skills/.system/skill-creator/scripts/quick_validate.py \
.agents/skills/zhihu-publishDoes 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.

