batch-article
Run /article end-to-end for a list of keywords. Each keyword goes through the FULL pipeline (research → plan → build → optimize → publish → monitor baseline). Use for agency-scale operations — drop 10-500 keywords, get 10-500 published articles. Resumable across sessions.
XuanRanL · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add XuanRanL/loamwright-SEO-Skill --skill batch-article技能说明
name: batch-article description: Run /article end-to-end for a list of keywords. Each keyword goes through the FULL pipeline (research → plan → build → optimize → publish → monitor baseline). Use for agency-scale operations — drop 10-500 keywords, get 10-500 published articles. Resumable across sessions. allowed-tools: [Bash, Read, Skill, Write, Edit] disable-model-invocation: false user-invocable: true
/batch-article — Bulk full-pipeline content production
For agency-scale ops: give a list of keywords, get a list of published articles. Each goes through the COMPLETE /article pipeline — no shortcuts, no quality compromises.
When to invoke
/batch-article --project my-site --file keywords.txt/batch-article --project my-site --keywords "kw1,kw2,kw3"/batch-article --resume <batch_id>— pick up after interruption/batch-article --status <batch_id>— check progress/batch-article --list— all known batches
Input file formats (auto-detected)
Plain text (.txt) — one keyword per line, optional comma-separated fields:
best fishing rods 2026, listicle
how to choose fishing rod, how-to-guide, professional, 4500
graphite vs fiberglass rods, comparison
CSV (.csv) — header with keyword column required:
keyword,format,voice,word_count
"best fishing rods 2026",listicle,professional,6000
"how to choose fishing rod",how-to-guide,casual,4500
JSON (.json) — array of objects:
[
{"keyword": "best fishing rods 2026", "format": "listicle"},
{"keyword": "how to choose fishing rod", "format": "how-to-guide", "word_count": 4500}
]
Workflow (Claude executes this)
Phase 1: Enqueue
python -m scripts._core.batch_queue enqueue \
--project {project_slug} \
--file {keywords_file}
This creates workspace/batches/{batch_id}/index.json with all entries pending.
Output shows: batch_id + entry count + total estimated cost.
Contract notes (v3.41.0):
- Generated task_ids are underscore-form (
art_YYYYmmddHHMMSS_NNN_hex) — they MUST satisfyschemas/state.schema.json :: task_id^[a-z0-9_]{8,32}$, becauseassemble.pyvalidates the full state against it mid-pipeline. The pre-v3.41.0 hyphenated ids passed the early stages then hard-failed at assembly (2026-07-17 project-lima batch). Pinned bytests/test_batch_queue_taskid_schema.py. daily_cost_cap_usdin the index comes from~/.xuanran-seo/config.yaml :: cost_limits.daily_total_usd— never a hardcode. A stale index with an empty cap is backfilled from config on load.- Task workspaces live under
memory/workspace/{task_id}/(the runner's WS_ROOT); theworkspace/root holds onlybatches/. - FORMAT IDS (v3.41.4): the per-row
formatcolumn validates againstschemas/angle.schema.json :: format_idenum — the single source of truth, mirrored 1:1 bytemplates/*.mdbasenames. An unknown format still soft-falls back to the default, but now WARNS on stderr; pre-v3.41.4 the check ran against a stale hand-maintained 10-item literal, so a REAL format likebuyers-guidewas silently rewritten tolisticleand the whole article was planned in the wrong format with no error anywhere (2026-07-24 project-india batch). Pinned bytests/test_batch_queue_format_enum_seam.py. Watch the enqueue output's format column — it must echo the format you asked for.
STOP & CONFIRM: surface the estimate to user. Example:
"Created batch-20260519-143201-7c2f8 with 25 entries. Estimated total cost: $58.40. Proceed?"
Wait for user approval before iteration.
Phase 2: Iterate (one entry at a time, sequential)
For each pending entry (call batch_queue next --batch-id X until empty):
1. Get next entry:
python -m scripts._core.batch_queue next --batch-id {batch_id} --json
→ returns {task_id, keyword, format, voice, ...}
2. Mark as running:
python -m scripts._core.batch_queue mark --batch-id {batch_id} \
--task-id {task_id} --status running
3. Create workspace + brief:
- Create workspace/{task_id}/
- Write brief.json with {keyword, format, voice, project_slug, ...}
- Write initial state.json with stage=brief-intake
- BRIEF ENUM DISCIPLINE (v3.41.3): `intent_override` accepts ONLY
informational|commercial|transactional|navigational|null — the analyst
label "commercial-investigation" is NOT a valid enum and now fails the
fresh-task schema gate at the first runner advance (before any spend).
- CTA PRODUCT ANGLE (2026-08-08): if the content-plan row names a CTA
product angle (e.g. "Ear wash", "Gut probiotic"), set
`brief.cta_category_hint` to that category's slug or name. The
cta-brief-builder prefers the hint over content matching (which
structurally cannot select one-token or long category names) while still
enforcing `excluded_categories` + in-stock validation. Without the hint,
short-named categories silently degrade to `default_category` and the
operator's intended product angle is lost.
- KEYWORD DIALECT (Rule 1): a keyword with opposite-dialect spelling
("optimisation" on an en-US project) stays VERBATIM in title/slug/meta;
set `target_market_locale` to the keyword's dialect only if the audience
really is that market — `spelling_dialect_check` auto-exempts the exact
keyword's inflections either way (v3.41.3).
- IMAGE COUNT (v3.42.17): OMIT `image_count` from the brief unless overriding —
the enforced default is `scripts/_core/image_policy.py :: DEFAULT_IMAGE_COUNT`
(6 = 1 cover + 5 section images; max 8), pinned to the schema annotation by
`tests/test_image_count_policy.py`. Short formats (news-analysis,
faq-knowledge, shortlist-validation) SHOULD set a lower explicit count —
the cost estimator's per-format rows assume they do; generation itself
always follows the brief, not the format.
- QUALITY TARGET (v3.42.16): OMIT `quality_target_score` from the brief
unless the ope
阅读完整来源 ↗