Skip to content
Development
Skill

/cm-auto-publisher

Comprehensive publishing automation skill bridging AI agents (OpenClaw, Manus, Claude) to the Content Factory Router. Uses the Router API to publish markdown articles with rich media to any connected Astro site natively.

From plugin
cm
5662 skills8 agents11 commands3 hooks
+1

Claude Code

$ npx -y skills add tody-agent/codymaster --skill cm-auto-publisher --agent claude-code

SKILL.md

cm-auto-publisher.SKILL.md
name: cm-auto-publisher
description: Comprehensive publishing automation skill bridging AI agents (OpenClaw, Manus, Claude) to the Content Factory Router. Uses the Router API to publish markdown articles with rich media to any connected Astro site natively.

cm-auto-publisher: The Agentic Publishing Skill

> **Goal:** Take unstructured input (links, ideas, raw text), write a highly engaging article following Content Factory rules, and instantly publish it via the Content Factory Router API.

When to Use

**ALWAYS when:**

  • User provides a link/video and says "Write an article about this and publish it".
  • User says "Draft and push this news to the blog".
  • You have finished drafting an article and need to deploy it to the live site.
  • An automated cron job triggers you to aggregate news and auto-publish.

The Process

Phase 1: Content Extraction & Structuring

1. **Analyze Input:** If given a URL, use `read_url_content` (or your browsing tool) to read the source. If given images or Youtube links, extract them. 2. **Draft Content:** Write a compelling article in standard Markdown.

  • Use headings (`##`, `###`).
  • For YouTube videos, use the Astro component: `<YouTube id="VIDEO_ID" />`.
  • For images, just use standard markdown: `![Alt text](image_filename.jpg)`.

Phase 2: Media Preparation

Identify all external images that need to be published with the article. DO NOT try to download them to the local disk using bash commands. The Content Factory Router will handle this. Instead, build a `media` array mapping the original URLs to the desired clean filenames.

"media": [
  {
    "url": "https://source.com/raw-image-123.jpg",
    "filename": "clean-seo-friendly-name.jpg"
  }
]

Phase 3: API Payload Construction

Construct the JSON payload matching the target site's schema. Standard Target: `cody-master` (mapped to `tody-agent/todyle-web`).

{
  "site_id": "cody-master",
  "title": "[Engaging Title]",
  "description": "[1-2 sentence SEO meta description]",
  "category": "news", // or "guide", "use-case"
  "readingTime": "5 min read",
  "tags": ["AI", "Vibe Coding", "Automation"],
  "content": "The raw markdown content here...",
  "media": [ ... ]
}

Phase 4: Publish via Router API

Send the payload to the Cloudflare Worker via a standard `fetch` or `curl` command.

1. **Get the Secret:** Retrieve the API token from the `.env` file or ask the user for the `PUBLISHER_API_KEY`. 2. **Send POST Request:** Use a local script or curl to send the data to the worker.

# Example curl (assuming the payload is saved to payload.json)
curl -X POST https://content-factory-router.<YOUR-CLOUDFLARE-ACCOUNT>.workers.dev/publish \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <API_KEY>" \
  -d @payload.json

Phase 5: Verification

1. Check the response from the Worker. It should return `{"success": true, "message": "Published...", "commit_sha": "..."}`. 2. Inform the user that the article has been successfully committed to GitHub and Cloudflare Pages is now building it.

---

Red Flags - STOP!

  • ❌ **DO NOT** manually create `.mdx` files in `src/content/articles/` and run `git push` if using this skill! Let the Router API handle the Git history and image blob creation to ensure data consistency.
  • ❌ **DO NOT** use `cat` or `echo` to build complex JSON payloads in bash. Save the payload to a `.json` file using your file writing tool, then pass it to `curl`.
Read more
@tody-agent
Ships withcm

"I can't write code. But in 6 months, I shipped 12 real products using AI. CodyMaster is everything I learned — so you don't have to repeat my mistakes." — Tody Le, Head of Product, Creator of CodyMaster 50+ skills. One install.

5662 skills8 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
56
Star history of tody-agent/codymaster on GitHub, a chart by star-history.com

Other skills on cm.

cm-autopilot

cm-autopilot

Easy-to-use conversational CLI (Claude Code style) for non-technical users to spawn parallel AI tasks supervised by a visual web…

@tody-agent@tody-agentInstall Skill
cm-brainstorm-idea

cm-brainstorm-idea

Strategic analysis gate for existing products — multi-dimensional evaluation (tech, product, design, business) using Design…

@tody-agent@tody-agentInstall Skill
cm-browse

cm-browse

Fallback local Playwright daemon for real-browser visual QA / screenshots / smoke. Use ONLY when the host platform has no native…

@tody-agent@tody-agentInstall Skill
cm-clean-code

cm-clean-code

Code hygiene gate — detect and eliminate dead code, duplicates, naming mess, and code smells. TRIZ-powered. Run after features,…

@tody-agent@tody-agentInstall Skill
cm-code-review

cm-code-review

Full review lifecycle — request reviews, handle feedback with technical rigor, and complete branch integration. Use when…

@tody-agent@tody-agentInstall Skill
cm-codeintell

cm-codeintell

Unified code intelligence — routes to Skeleton Index, CodeGraph, Architecture Diagram, or Smart Context Builder based on task…

@tody-agent@tody-agentInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about cm-auto-publisher.

Which coding agents can use cm-auto-publisher?
cm-auto-publisher installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.