content-factory
Build exactly two SEO-friendly AI-tool articles per run by reading ~/openclaw-work/clients/<client>/config.json, scraping configured RSS + HTML sources, and writing markdown to ~/openclaw-work/out/art
SKILL.mdskills/content-factory/SKILL.md
GitHubContent Factory
Overview
Automates the creation of two SEO-grade articles that track trending AI tools: it pulls from curated feeds, assembles outlines/sections/FAQs, and drops polished markdown drafts into the dated out/articles folder.
Quick Start
- Prepare client config at
~/openclaw-work/clients/<client>/config.json(schema + example inreferences/config-and-production.md). Include persona, CTA, RSS/HTML sources, and at least two article specs with keywords. - Install dependencies (once):
pip install requests beautifulsoup4 - Run the factory:
Optional flags:cd /Users/chenjiaxuan/openclaw/skills/content-factory python scripts/run_content_factory.py --client <client-slug>--date YYYY-MM-DD,--max-per-source 10,--dry-run,--init-dirs. - Polish outputs in
~/openclaw-work/out/articles/<date>/. Each run emits exactly two markdown files with frontmatter, outline, sections, FAQ, meta description, keywords, CTA, and source notes.
Workflow
1. Configure Inputs
persona,cta, and orderedarticles[]entries (slug, title, primary keyword, keywords, angle, hook, optional outline/section/FAQ/meta overrides) live in the client config.- Define ≥1 source of trending AI tools:
html-list: provideitem_selector,title_selector,description_selector,link_selector.rss: supply feed URL.api: optionalpath+mappingto shape JSON payloads.
- Use
references/config-and-production.mdfor the full JSON contract and checklist.
2. Harvest Signals (Web RSS + HTML)
scripts/run_content_factory.pyfetches all configured sources, dedupes tool names, and caps each feed via--max-per-source.- HTML scraping relies on BeautifulSoup; inspect upstream DOM changes and adjust selectors as needed.
- RSS parsing runs through
xml.etree; API payloads are navigated with dot-paths.
3. Generate Two SEO Articles
- The script always loads
assets/seo-article-template.mdtwice—once per article spec. - Template injects: YAML frontmatter (title, slug, keywords, meta description), numbered outline, three narrative sections, featured tool table, FAQ block, CTA, and source notes.
- Exactly two articles are produced each run (first two entries in
articles[]). Missing entries cause the script to exit with an error.
4. QA & Delivery
- Ensure
primary_keywordappears in intro, meta description, and CTA. - Confirm at least three tools populate the table; bump
--max-per-sourceif the feeds run light. - Use
--dry-runto preview markdown while refining selectors, outline bullets, or FAQ copy.
Scripts
| Path | Purpose |
|---|---|
scripts/run_content_factory.py |
CLI orchestrator. Reads the client config, scrapes RSS/HTML/API sources, fills the SEO template twice, and writes markdown to ~/openclaw-work/out/articles/<date>/. Supports --init-dirs, --dry-run, and --max-per-source. |
References & Assets
references/config-and-production.md: Config schema, selector guidance, and quality checklist.assets/seo-article-template.md: Markdown boilerplate with outline, sections, FAQ, CTA, meta description, and source note placeholders.