/xuanran-seo-blog-writer:batch-job-pollerfrom xuanran-seo-blog-writer
Recovers orphan OpenAI image batches from the fallback path. Polls batch status, downloads images on completion, reads error files for failure diagnosis.
Ships in xuanran-seo-blog-writer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This skill is no longer part of the standard image flow. The new
openai-image-generator skill consolidates submit + poll + download + realtime
fallback into a single synchronous call via openai_image_pipeline.py.
This skill remains for two recovery scenarios only:
If a prior pipeline run gave up on a batch (timeout, crash, user cancellation), the batch may still complete in OpenAI's queue. Use this skill to:
completedfailed for root-cause diagnosisexpired (24h)Example:
# Find orphan batches across all workspaces
for status_file in memory/workspace/*/batch_status.json; do
batch_id=$(python -c "import json,sys; print(json.load(open('$status_file'))['batch_id'])")
python -m scripts.openai.openai_batch_image_api --json poll $batch_id
done
# Download a specific orphan batch's images
python -m scripts.openai.openai_batch_image_api download batch_xxx \
--output-dir memory/workspace/{task_id}/images
If a current batch is reporting failed, get the error_file_id and read it:
python -c "
import sys
sys.path.insert(0, '.')
from scripts._core import credential_hub
import openai
client = openai.OpenAI(api_key=credential_hub.get_credential('openai'))
batch = client.batches.retrieve('batch_xxx')
if batch.error_file_id:
print(client.files.content(batch.error_file_id).text)
"
The error file is JSONL — one line per failed request, with the OpenAI HTTP code
and rejected parameter name. The 2026-05-20 incident on project-charlie post 37063
turned out to be a script bug (sent response_format) detectable only by reading
this file.
The previous design ran this skill every 15 minutes via hooks/scheduled.json.
That pattern had three drawbacks:
The unified pipeline supersedes all three by polling at 60-second granularity inline within the article task, with a 25-minute timeout that triggers automatic realtime fallback.
If you have a hooks/scheduled.json entry for this skill, it can be removed —
the inline pipeline handles standard cases. Keep the skill file for the recovery
scenarios above.
See memory: [[reference-openai-image-pipeline]], [[feedback-batch-image-default-and-polling]]
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub xuanranl/loamwright-seo-skill --plugin xuanran-seo-blog-writer75 skills in this plugin
/ai-overview-recovery4-phase recovery when Google AI Overview drops an article. Measure damage → diagnose skip reason → rewrite → T+7/14/28 monitor. Triggered by drift-detector AIO loss alert OR /aio-recovery command./ai-visibility-trackerActive probe of ChatGPT/PPLX/Claude/Gemini to check if our article is cited. Compares to projects/{slug}/geo-baseline.json. Triggered by /ai-visibility command or daily/weekly schedule./batch-articleRun /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./brand-auto-tunerAnalyze winner vs loser articles to find features that distinguish them, then suggest brand-guideline.yaml updates. Use after ≥10 articles have outcome tags. Closes the data-loop: production → measurement → learning → next-cycle adjustment./brand-guideline-maker7-Block interactive interview + URL Analysis triangulation. Builds projects/{slug}/brand-guideline.yaml that gets injected into every /article draft. The single most impactful one-time investment per brand — wrong voice = wrong content forever. Triggered by /brand-guideline command, OR after /init Stage 5 when voice-discrepancy detected./chart-generatorGenerate markdown tables OR XSS-safe SVG charts for sections with needs_table=true. Ensures ≥2 tables per article with ≥1 in front 50%. Uses scripts/build/chart_svg_builder.py.Other plugins' skills for the same job