batch-job-poller

batch-job-poller is a skill for Claude Code from XuanRanL/loamwright-SEO-Skill. It costs 84 tokens per session (735 once invoked), scanned A, original, Apache-2.0.

A recovery skill for checking image-processing jobs submitted through OpenAI's batch system. It finds jobs that were left unfinished and checks whether they completed, failed, or expired.

In plain words
What is it for?
It is for checking batch status, downloading completed images, reading failure details, and marking expired jobs as abandoned.
Why use it?
It helps recover results after a timeout, crash, or cancellation leaves an image job without a clear final status.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the xuanran-seo-blog-writer plugin — 68 skills, 34 agents, 4 hooks shipped together

Good fit It is for checking batch status, downloading completed images, reading failure details, and marking expired jobs as abandoned.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xuanranl/loamwright-seo-skill/batch-job-poller
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add XuanRanL/loamwright-SEO-Skill --skill batch-job-poller
Clone the repo
git clone --depth 1 https://github.com/XuanRanL/loamwright-SEO-Skill

Made for: Claude Code.

Or install xuanran-seo-blog-writer, the plugin that ships this one along with the rest of its 68 skills, 34 agents, 4 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for batch-job-poller

README.md
[![agentmods](https://agentmods.dev/badge/skills/xuanranl/loamwright-seo-skill/batch-job-poller/github.svg)](https://agentmods.dev/skills/xuanranl/loamwright-seo-skill/batch-job-poller)
Your own site
<a href="https://agentmods.dev/skills/xuanranl/loamwright-seo-skill/batch-job-poller"><img src="https://agentmods.dev/badge/skills/xuanranl/loamwright-seo-skill/batch-job-poller/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for batch-job-poller

Your own site · 80×15
<a href="https://agentmods.dev/skills/xuanranl/loamwright-seo-skill/batch-job-poller"><img src="https://agentmods.dev/badge/skills/xuanranl/loamwright-seo-skill/batch-job-poller.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 735 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00084 $0.00735
Opus 5 $0.00042 $0.00367
Sonnet 5 $0.00017 $0.00147
Haiku 4.5 $0.00008 $0.00073

Measured 8d ago against content hash 94088620ecb7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

batch-job-poller scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

subskills/image/batch-job-poller/SKILL.md · 78 lines

How it starts

The opening of the file, as written. The whole thing — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Batch Job Poller (Supplemental — Recovery Only)

Status (as of 2026-05-21)

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:

Scenario 1: Orphan batch recovery

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:

  • Poll the batch status
  • Download images if completed
  • Read error file if failed for root-cause diagnosis
  • Mark the batch as abandoned if expired (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

Scenario 2: Diagnose stuck or failed batches

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.

Why this is no longer auto-scheduled

The previous design ran this skill every 15 minutes via hooks/scheduled.json. That pattern had three drawbacks:

  1. 15-minute granularity meant up to 15 min of latency after batch completion
  2. No fallback path if batch failed permanently
  3. Multiple background pollers competing across workspaces

Read the full file on GitHub · 78 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 78 lines · 84 tokens per session scan A 94088620ecb7

Subscribe to this mod's changes

batch-job-poller is a skill published in the GitHub repository XuanRanL/loamwright-SEO-Skill (49 stars, last pushed 25d ago), licensed Apache-2.0. It adds 84 tokens to every session and 735 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.