batch-api
Skill by QwenLM
Prepares many-file, single-turn transforms such as translation or extraction and submits them to the DashScope Batch API at half the realtime price. Results arrive as new files hours later, so it suits large jobs that do not need quick answers.
Install batch-api
Built from the published package, never by AI.
git clone --depth 1 https://github.com/QwenLM/qwen-code /tmp/qwen-code && mkdir -p ~/.claude/skills && cp -r /tmp/qwen-code/packages/core/src/skills/bundled/batch-api ~/.claude/skills/batch-apiRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/QwenLM/qwen-code /tmp/qwen-code && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/qwen-code/packages/core/src/skills/bundled/batch-api ~/.gemini/antigravity-cli/skills/batch-apiAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The batch-api skill is a Qwen Code workflow for many independent, single-turn transforms, such as translating a set of documents under a fixed style guide, rewriting files to a new format, or extracting structured data from each file. The assistant writes a small plan file, previews the batch, and submits it through the qwen batch command to the asynchronous DashScope Batch API, which bills at 50% of the realtime list price. It then waits in the background and writes results to new target files when the batch completes.
Jobs take hours to finish, with a completion window of 24 hours by default and up to 14 days. The skill is aimed at many items that need no quick answer. It is not suited to debugging, run-test-fix loops, chained tasks where one output feeds another, or a handful of items. Retries are never automatic, because each retry is a new billed request, and Qwen OAuth has no Batch route.
Written from the project's SKILL.md and checked against it.
What it can do
- Plan file preparationWrites a JSON plan with shared instructions and per-item source and target paths.
- Dry-run previewThe batch run --dry-run command shows item count, model line, cost estimate and digest without uploading.
- Digest-checked submissionThe batch run --expect command submits exactly the snapshot that was previewed.
- Background collectionThe batch collect --wait command polls the provider, then writes the target files.
- Targeted retryThe batch retry command re-runs failed items or items held because their source changed.
- Cost capThe optional maxCostUsd field makes run and retry refuse submission when the worst case exceeds it.
What you need
- Qwen Code CLI with batch subcommands
- DashScope Batch API credentials and endpoint
- A Batch route (Qwen OAuth does not have one)
Try asking
- /batch-api translate docs/zh into docs/en under our style guide
- /batch-api rewrite these config files to the new format
- /batch-api extract structured fields from each file in reports/
Good to know
- Not suited to iterative, chained or small jobs
- Results arrive hours later, with a completion window of 24 hours or more
- Retries are never automatic, and each retry is billed
- Qwen OAuth has no Batch route
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: packages/core/src/skills/bundled/batch-api/SKILL.md, packages/core/src/skills/bundled/batch-api/SKILL.test.ts. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md9 KB -
SKILL.test.ts4 KB
Alternatives to batch-api
All alternatives →Aligns a Qwen Code feature with a Codex or Claude Code reference agent. It runs both under the same scenario, captures HTTP and terminal traces, and compares them until behavior matches.
Searches, views, creates, updates, and deletes the user's Google Contacts from an AI assistant. It is for people who want to manage their address book through conversation. A one-time Google connect is required before it returns data.
Guides an AI assistant on error handling choices. It covers when to use Result, Option, ? propagation, unwrap, expect and panic, plus anyhow and thiserror.
Caveman is an agent skill that makes an AI assistant reply in a terse style. It cuts filler and keeps technical facts, code, commands and errors exact. It is built for users who want shorter, cheaper replies.
docs-sync audits or updates English SDK documentation against the requested implementation scope. It is for maintainers who want docs to match main branch features, configuration options, and defaults.
Guides an AI assistant through setting up and running monorepos with pnpm workspaces, Turborepo and Nx. Aimed at developers who need faster builds, shared code and managed dependencies across multiple packages.
Compare with agent-reproduce-align, google_contacts or m06-error-handling
batch-api: common questions
How much does the Batch API cost?
The provider bills Batch requests at 50% of the realtime list price, with no context-cache benefit. Estimates do not include the session's preparation cost.
When do the results arrive?
A job takes tens of minutes to hours. The waiter writes target files when the batch settles, and an interactive session collects the task on its next start in the project.
Which tasks does batch-api not suit?
The source names debugging, run-test-fix loops, exploratory refactors, chained tasks where one output is another's input, and small sets of items.
How do I install batch-api?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is batch-api free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is batch-api safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to batch-api?
Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.
