toutiao-publisher
Skill2 starsChanged 8 months agoApache-2.0View on GitHub
Publish articles to Toutiao (头条号) with persistent login. Supports one-time auth setup, pre-flight checks, EXTEND.md preferences, browser automation, and direct authenticated API publishing for title/content/cover flows.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- guanyang/super-publishertheir own version, first seen Oct 13, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- guanyang/super-publisher★ 32same 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 repository27 other files it gives its agents.
- ai-hotspot-collectorSkill
- article-multi-publisherSkill
- article-pipeline-skillSkill
- character-ip-risk-checkSkill
- chrome-extension-devSkill
- chrome-extension-e2e-automationSkill
- chrome-extension-publishSkill
- chrome-extension-social-promoSkill
- chrome-webstore-image-generatorSkill
- code-reviewSkill
- fund-querySkill
- github-trending-writerSkill
- lark-workflow-doc-to-slidesSkill
- notionSkill
- playwright-twitter-accessSkill
- post-to-xhsSkill
- rewrite-skillSkill
- small-capital-investingSkill
- technical-article-preflightSkill
- technical-article-reviewSkill
- technical-spoken-rewriteSkill
- tencent-dev-community-publisherSkill
- url-readerSkill
- wechat-article-formatterSkill
- wechat-article-generatorSkill
- wechat-publisherSkill
- wechat-sticker-publisherSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 44
If none exists and user asks for stable defaults, follow: references/config/first-time-setup.md
- Distinctive: line 89
If check fails, provide specific fix items before continuing.
- Very specific: line 118
If --content points to .html/.htm, the publisher uses that HTML directly.
- Very specific: line 121
If --cover is omitted, the publisher will try nearby files like images/01-cover.*, images/cover.*, images/cover-wide.*, cover.*, or the …
- Distinctive: line 122
Prefer the API publisher for direct article publishing because it uploads the cover and submits the final payload without relying on …
- Distinctive: line 171
if failed: exact failed phase and suggested retry command
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Toutiao Publisher
Language
Match the user's language for all prompts and completion reports.
Script Directory
Determine this SKILL.md directory as SKILL_DIR, and run scripts via:
python ${SKILL_DIR}/scripts/run.py <script.py> [args...]| Script | Purpose |
scripts/check_permissions.py | Pre-flight environment checks |
scripts/auth_manager.py | Login setup/status/validate/clear |
scripts/publisher.py | Article publish automation |
scripts/api_publisher.py | Direct article publish via authenticated in-page API |
scripts/extend_config.py | EXTEND.md preference loading |
When to Use
Trigger when user asks to:
- publish article to Toutiao / 今日头条 / 头条号
- setup or fix Toutiao login session
- automate title/content/cover filling on Toutiao publish page
- publish more reliably through the authenticated API path when browser autosave is unstable
Preferences (EXTEND.md)
Load optional preferences (priority order):
- Project-level:
.baoyu-skills/toutiao-publisher/EXTEND.md - User-level:
~/.baoyu-skills/toutiao-publisher/EXTEND.md
If none exists and user asks for stable defaults, follow: references/config/first-time-setup.md
Supported keys:
default_headlessdefault_no_coverdefault_rawdefault_debug_screenshotsdefault_wait_secondsdefault_login_timeout_minutesdefault_auth_headless
Boolean accepts 1/0, true/false, yes/no.
Value priority for publish/auth:
- CLI args
- EXTEND.md
- Script defaults
Workflow
Use this checklist:
Toutiao Publishing Progress:
- [ ] Step 0: Load EXTEND.md preferences
- [ ] Step 1: Run pre-flight checks
- [ ] Step 2: Ensure authentication is valid
- [ ] Step 3: Resolve publish params (title/content/cover)
- [ ] Step 4: Execute publish flow
- [ ] Step 5: Report result + next actionsStep 0: Load preferences
Scripts auto-load EXTEND.md. If found, mention the loaded file path.
Step 1: Pre-flight checks
python ${SKILL_DIR}/scripts/run.py check_permissions.pyIf check fails, provide specific fix items before continuing.
Step 2: Authentication
First-time login:
python ${SKILL_DIR}/scripts/run.py auth_manager.py setupCommon management:
python ${SKILL_DIR}/scripts/run.py auth_manager.py status
python ${SKILL_DIR}/scripts/run.py auth_manager.py validate
python ${SKILL_DIR}/scripts/run.py auth_manager.py clear
python ${SKILL_DIR}/scripts/run.py auth_manager.py reauthStep 3: Resolve publish params
Reference: references/article-posting.md
Rules:
- Title is strongly recommended for automation success.
- Title length is auto-adjusted to Toutiao constraints (2-30 chars).
--contentaccepts file path or inline text.- If
--contentpoints to.html/.htm, the publisher uses that HTML directly. - For generated article bundles, prefer
article-toutiao.mdover the genericarticle.mdwhen both exist. --coveris optional;--no-covercan force no-cover mode.- If
--coveris omitted, the publisher will try nearby files likeimages/01-cover.*,images/cover.*,images/cover-wide.*,cover.*, or the first image underimages/. - Prefer the API publisher for direct article publishing because it uploads the cover and submits the final payload without relying on front-end autosave.
- The API publisher also uploads local inline images referenced from markdown/HTML and rewrites them to Toutiao-hosted image URLs before submit. This is the stable path when the article package contains local
images/...assets.
Step 4: Publish
Recommended API path:
python ${SKILL_DIR}/scripts/run.py api_publisher.py --title "标题" --content article.mdExplicit cover:
python ${SKILL_DIR}/scripts/run.py api_publisher.py --title "标题" --content article.md --cover ./cover.pngDry-run / payload inspection:
python ${SKILL_DIR}/scripts/run.py api_publisher.py --title "标题" --content article.md --dry-runLegacy browser automation:
python ${SKILL_DIR}/scripts/run.py publisher.py --title "标题" --content article.mdAutomated/headless:
python ${SKILL_DIR}/scripts/run.py publisher.py --title "标题" --content article.md --cover ./cover.png --headlessTroubleshooting mode:
python ${SKILL_DIR}/scripts/run.py publisher.py --title "标题" --content article.md --debug-screenshots --wait-seconds 30Step 5: Completion report
Report:
- input type/path
- resolved options (
headless,no_cover,raw) - auth state usage (existing/new login)
- publish result (success/failure)
- if failed: exact failed phase and suggested retry command
Security Notes
run.pyblocks path traversal and only executes scripts insidescripts/.- Auth state is stored under skill
data/and permissions are restricted on POSIX. - Debug screenshots are disabled by default and only generated when explicitly enabled.
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.

