juejin-publisher
Skill1 starsChanged 5 months agoMITView on GitHub
Use when preparing or publishing Juejin/掘金 articles, 掘金草稿, technical Markdown, Juejin front matter, theme/highlight adaptation, categories, tags, or safe Juejin publishing workflows.
- Reads credentials
1 other project uses a version of this.
Adopted by
Most recently taken up by
- eunomia-bpf/eunomia.devtheir own version, first seen Oct 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- eunomia-bpf/eunomia.dev★ 244same 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
- content-package-managerSkill
- csdn-publisherSkill
- xiaohongshu-publisherSkill
- zhihu-publisherSkill
- ddd-java-developerSkill
- doubao-speechSkill
- doubao-videoSkill
- formal-resume-builderSkill
- code-qualitySkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 5 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
If juejin_prepare_article fails on very large inline Markdown (JSON parse), build the package manually: write article.juejin.md from the …
- Very specific: line 26
Add Juejin front matter with theme and highlight (e.g.
- Distinctive: line 27
Check code blocks, technical tags, category, title, summary, external links, Markdown preview, and code highlighting.
- Distinctive: line 28
If browser automation is available, open the Juejin editor and fill a draft only after the package is ready (see Browser Automation …
- Very specific: line 29
Stop before publish unless the user explicitly says 确认发布到掘金 or 确认更新掘金文章.
- Very specific: line 62
delete the trailing bare uploaded image lines (!filename),
- Very specific: line 64
Verify in the preview pane that every img has complete && naturalWidth>0.
- Very specific: line 85
After saving, record draft_id, draft_url, CDN image URLs, tags actually applied (+ intended), cover/column/summary into metadata.json.
- Very specific: line 99
Do not read Cookie, Token, password, .env, browser profile, or account files.
- Distinctive: line 100
Do not use comment, private-message, acquisition, or growth automation.
- Distinctive: line 101
Do not bypass login, CAPTCHA, audit, or platform risk checks.
- Distinctive: line 102
Do not auto-publish, update, delete, withdraw, comment, or send messages.
- Very specific: line 103
Never click 确定并发布 without explicit user authorization.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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
juejin-publisher
Goal
Adapt technical Markdown or a content package into Juejin-ready article content, and (when a browser is available) drive the Juejin Markdown editor to a saved draft without publishing.
Default Tools
- Article package:
juejin_prepare_article - Browser guidance:
juejin_browser_setup_guide - Draft playbook:
juejin_draft_playbook - Browser automation: Playwright MCP (CodeMirror injection + image upload)
Workflow
- Identify source content.
- Generate the Juejin channel package with
article.juejin.md,metadata.json,publish-checklist.md, andbrowser-playbook.md.- If
juejin_prepare_articlefails on very large inline Markdown (JSON parse), build the package manually: writearticle.juejin.mdfrom the source file, then hand-writemetadata.json.
- If
- Add Juejin front matter with
themeandhighlight(e.g.atom-one-dark). - Check code blocks, technical tags, category, title, summary, external links, Markdown preview, and code highlighting.
- If browser automation is available, open the Juejin editor and fill a draft only after the package is ready (see Browser Automation Playbook).
- Stop before publish unless the user explicitly says
确认发布到掘金or确认更新掘金文章.
Browser Automation Playbook (proven stable)
Juejin's Markdown editor uses bytemd + CodeMirror. The right-side pane is a live preview.
Title
- Fill the title textbox directly (
输入文章标题...). The editor auto-saves to a draft; URL changes to/editor/drafts/<draftId>.
Body injection (CodeMirror setValue, NOT paste/typing)
- Body for injection = article Markdown WITHOUT YAML front matter and WITHOUT the duplicate H1 title (title goes in the title bar).
- Inject via Playwright
run_code_unsafe, inline the body as base64 in the script file (placed under.playwright-mcp/), decode in-page withdecodeURIComponent(escape(atob(b64)))(no Buffer/require in page context):const cm = document.querySelector('.CodeMirror'); if (cm && cm.CodeMirror) { cm.CodeMirror.setValue(md); cm.CodeMirror.refresh(); } cm.setValuereplaces the whole document cleanly and preserves newlines — far more reliable than synthetic paste orexecCommand('insertText').- The CodeMirror
textareais intercepted by.CodeMirror-lineoverlays, so a Playwright.click()on it times out — do not rely on clicking the editor; use thecm.CodeMirrorAPI instead.
Inline images (upload to Juejin CDN, then swap local paths)
Local relative image paths (assets/...) will NOT render. Upload each image to Juejin's image host and replace:
- Find the toolbar image button (bytemd toolbar; hover to confirm tooltip
图片). Move CodeMirror cursor to end first so uploads append at the bottom:const ed = document.querySelector('.CodeMirror').CodeMirror; const last = ed.lineCount()-1; ed.setCursor({line:last, ch:ed.getLine(last).length}); ed.focus(); - Click the image button → it opens a native file chooser →
browser_file_uploadwith the absolute image path. Wait ~3s; the editor inserts. - Repeat for every image.
- Extract the uploaded CDN URLs and the original local refs from
cm.getValue(), then in onecm.setValuepass:- delete the trailing bare uploaded image lines (
), - replace each
(assets/.../<filename>)with(<cdn-url>), keeping the descriptive alt text.
- delete the trailing bare uploaded image lines (
- Verify in the preview pane that every
imghascomplete && naturalWidth>0.
Publish drawer config (fill, do NOT submit)
Click 发布 to open the 发布文章 drawer. Fill every required field, then close with 取消 (config persists to the draft):
- 分类: single-select chip (e.g.
人工智能). - 添加标签: tags must come from Juejin's predefined tag library (free-text tags are NOT allowed). Type a candidate, wait for the dropdown, click the matching option. The placeholder div intercepts clicks on the input — click the
.byte-select__wrapwrapper, or set the input via the wrapper. The counter你还能添加 N 个标签enforces a per-account cap (often 2). Common matches:人工智能,机器学习,后端,前端,AI 编程. Try alternates if a term has no library match (e.g.RAG/大语言模型may not exist). - 文章封面: click
上传封面→ native file chooser →browser_file_uploadcover image. Recommended 192*128px; only shown in feed. - 收录至专栏: type the column name, click the dropdown match (max 3 columns).
- 编辑摘要: 100-char limit. Auto-filled from body head; replace with a concise summary using the React-safe setter:
const ta = document.querySelector('textarea[maxlength="100"]'); const setter = Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype,'value').set; setter.call(ta, summary); ta.dispatchEvent(new Event('input',{bubbles:true}));
Save draft, never publish
- Juejin auto-saves to draft on edit (header shows
保存成功). The publish drawer's config (category/tags/cover/column/summary) persists with the draft — verified by closing with取消and re-opening: all fields remain. - The publish buttons are
发布→确定并发布. Never click确定并发布unless the user explicitly authorizes publishing. Closing the drawer with取消leaves a complete, configured draft. - After saving, record
draft_id,draft_url, CDN image URLs, tags actually applied (+ intended), cover/column/summary intometadata.json; setsession.status = draft-saved.
Troubleshooting
- Editor click times out → use
cm.CodeMirror.setValue, never click the CodeMirror textarea. - Pasted/typed body loses newlines or appends to existing text → use
cm.setValue(full replace). - Local images blank in preview → upload to Juejin CDN and swap paths; verify
naturalWidth>0. - Tag won't add → it's not in Juejin's tag library; pick a library term; mind the per-account tag cap.
- Tag/column dropdown option not clickable by ref → query the option text inside a
*dropdown*/*popper*/*select__option*container and click it. run_code_unsafescript with large base64 → save the JS to.playwright-mcp/and load viafilename.- Lost publish config after
取消→ it does NOT lose; config persists with the draft (re-open to confirm).
Safety Rules
- Do not read Cookie, Token, password,
.env, browser profile, or account files. - Do not use comment, private-message, acquisition, or growth automation.
- Do not bypass login, CAPTCHA, audit, or platform risk checks.
- Do not auto-publish, update, delete, withdraw, comment, or send messages.
- Never click
确定并发布without explicit user authorization.
Output Format
建议:...
事实:...
已执行:...
掘金渠道包:...
分类/标签:...
发布门禁:已停在发布前 / 未发布,原因...
下一步:...Does 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.

