Skip to content
Development
Skill

/cm-content-factory

Self-learning SEO content pipeline: dashboard, multi-agent queue, token budgets, research → write → audit → publish. StoryBrand/Cialdini/JTBD-style frameworks; config-driven. Use for content factory, batch articles, or scaled publishing.

From plugin
cm
5362 skills8 agents11 commands3 hooks
+1
Install
$ npx -y skills add tody-agent/codymaster --skill cm-content-factory --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/cm-content-factory

Context preview

The summary Claude sees to decide when to auto-load this skill.

Self-learning SEO content pipeline: dashboard, multi-agent queue, token budgets, research → write → audit → publish. StoryBrand/Cialdini/JTBD-style frameworks; config-driven. Use for content factory, batch articles, or scaled publishing.

SKILL.md

cm-content-factory.SKILL.md
name: cm-content-factory
description: "Self-learning SEO content pipeline: dashboard, multi-agent queue, token budgets, research → write → audit → publish. StoryBrand/Cialdini/JTBD-style frameworks; config-driven. Use for content factory, batch articles, or scaled publishing."

CM Content Factory v2.0 — AI Content Machine Platform

Config-driven, **self-improving** content factory with **real-time dashboard**, **multi-agent independence**, and **token management**. Gets smarter with use through memory + reward system.

Architecture

┌─────────────────────────────────────────────┐
│         🌐 DASHBOARD (localhost:5050)        │
│  Pipeline │ Tasks │ Tokens │ Logs │ Landing  │
└───────────┬─────────────────────────────────┘
            │ SSE / Polling
┌───────────┴─────────────────────────────────┐
│            🏭 PIPELINE ENGINE               │
│  ┌──────────┐ ┌──────────┐ ┌────────────┐  │
│  │  State   │ │  Token   │ │   Agent    │  │
│  │ Manager  │ │ Manager  │ │ Dispatcher │  │
│  └──────────┘ └──────────┘ └────────────┘  │
│                    │                         │
│  EXTRACT → PLAN → WRITE → AUDIT → SEO → PUB│
│                    │         │              │
│              📊 SCOREBOARD (reward/penalty)  │
│                    │                         │
│              🧠 MEMORY (3-layer learning)   │
└─────────────────────────────────────────────┘

**Config file**: `content-factory.config.json` at project root. Schema: `config.schema.json`.

---

🚀 Quick Start

# New project (interactive wizard)
python3 scripts/wizard.py

# Full pipeline WITH dashboard
python3 scripts/pipeline.py --dashboard

# Pipeline with budget limit
python3 scripts/pipeline.py --dashboard --budget 5.0

# Dashboard only (standalone)
python3 scripts/dashboard_server.py

Phase 0: Discovery (MANDATORY)

AI MUST ask 5 question groups in order:

| # | Group | Key Questions | |---|-------|---------------| | Q1 | Niche Info | Industry, brand, address, phone, USP | | Q2 | Reference & Avoid | Reference websites, styles to avoid, tone | | Q3 | Data Sources | Existing files, URLs to extract, images | | Q4 | Content Goals | Number of articles, keywords, language, region | | Q5 | Deploy | Cloudflare account, domain, milestone |

Phase 0.5: Confirm

Display summary table → **WAIT for user OK** → then proceed.

---

Operating Modes (12)

| Mode | Script | Purpose | |------|--------|---------| | 📦 EXTRACT | `extract.py` | Source docs → JSON knowledge-base | | 📋 PLAN | `plan.py` | Knowledge → topic queue | | ✍️ WRITE | `write.py` | AI content generation (batch/single) | | 🔍 AUDIT | `audit.py` | Quality check + auto-fix | | 🔎 SEO | `seo.py` | Metadata optimization | | 🚀 PUBLISH | `publish.py` | Build + deploy | | 🧠 LEARN | `scoreboard.py` + `memory.py` | Extract patterns from feedback | | 🔬 RESEARCH | `research.py` | Auto-research new topics | | 💰 REVIEW | `monetize.py` | Monetization scoring | | 🏭 PIPELINE | `pipeline.py` | Full automated A→Z | | 📊 DASHBOARD | `dashboard_server.py` | Real-time web dashboard | | 🎯 LANDING | `landing_generator.py` | Persona-based landing pages |

All scripts: `python3 scripts/<script> --config content-factory.config.json`

---

Dashboard (NEW in v2.0)

Real-time web dashboard at `http://localhost:5050`:

  • **Pipeline Progress**: Visual 6-phase timeline with progress bars
  • **Task Queue**: Active/queued/completed/failed task cards
  • **Token Tracker**: Cost by provider, budget progress bar
  • **Event Log**: Filterable real-time log viewer
  • **Error Panel**: Highlighted error details
# Auto-start with pipeline
python3 scripts/pipeline.py --dashboard --dashboard-port 5050

# Standalone
python3 scripts/dashboard_server.py --port 5050

---

Multi-Agent Support (NEW in v2.0)

Multiple agents can work independently on the same pipeline via file-based task queue.

from agent_dispatcher import AgentDispatcher
d = AgentDispatcher()

# Enqueue tasks
d.enqueue("write-article-1", "write", {"topic": "SEO Tips"}, priority=3)
d.enqueue_batch([{"id": "w-2", "type": "write"}, {"id": "w-3", "type": "write"}])

# Agent claims next task
task = d.claim_next("gemini-agent-1")
d.heartbeat("gemini-agent-1", task["id"])  # Keep alive

# Complete or fail
d.complete(task["id"], "gemini-agent-1", {"result": "ok"})
d.fail(task["id"], "gemini-agent-1", "API timeout")  # Auto-retry up to 3x

Features: priority ordering, stale lock detection (10min), auto-retry (3x), heartbeat.

---

Token Management (NEW in v2.0)

Track token usage, costs, rate limits, and budget across all providers.

from token_manager import TokenManager
tm = TokenManager(budget_usd=5.0)

# Record usage
tm.record_usage("gemini", input_tokens=1000, output_tokens=500, task_id="w-1")

# Check budget
if not tm.check_budget():
    print("Budget exceeded!")

# Rate limiting
tm.wait_if_rate_limited("gemini")

# Circuit breaker (auto-stop after 5 consecutive failures)
if tm.is_circuit_open("gemini"):
    print("Provider down, switching...")
python3 scripts/token_manager.py status

---

Landing Pages (NEW in v2.0)

Generate persona-based landing pages using Content Mastery SB7 framework.

Add `personas` array to config:

{
  "personas": [{
    "name": "Economic Buyer",
    "headline": "Save 50% on Marketing Costs",
    "subheadline": "AI creates professional content, 10x faster",
    "pain_points": ["High marketing costs", "Lack of content staff"],
    "benefits": [{"title": "Cost Savings", "description": "Reduce costs by 50%"}],
    "social_proof": [{"number": "2,347", "label": "Businesses trust us"}],
    "steps": [{"title": "Configure", "description": "Enter your business information"}],
    "cta_text": "Try It Free"
  }]
}
python3 scripts/landing_generator.py --config content-factory.config.json
python3 scripts/landing_generator.py --config content-factory.config.json --list

---

Pipeline Execution

1. IN
Read more
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.

Get the whole plugin

Other skills on cm.