
Batch API Document Transform
Plans a many-file, one-shot transform and submits it to DashScope's half-price asynchronous Batch API.
- Repository
- QwenLM/qwen-code
- Stars
- 28,880
- Licence
- Apache-2.0
- Files
- 2 files
What it does
When you type /batch-api with a task, the agent checks that the Qwen CLI's batch commands work, decides whether the job suits a slow, cheaper background run, and if so writes a plan file listing your input and output files plus shared rules. It then previews the batch with a cost estimate and only submits after you approve that exact preview. Results arrive as new files hours later rather than in the chat.
Great for
- Translating or rewriting a large set of independent documents under one style guide
- Extracting structured data from many files where no result depends on another
- Developers who accept a wait of hours in exchange for roughly half the realtime price
Skip it if
- Debugging, run-test-fix loops or exploratory refactors, because each step needs results that do not exist yet
- A handful of files or anything needed soon, because the wait saves nothing and adds delay
- Users on Qwen OAuth, which has no Batch route, so the check will fail
Try asking
- “/batch-api translate every file in docs/zh into English under docs/en using our style guide”
- “/batch-api rewrite all Markdown changelogs in docs/ into the new YAML front-matter format”
- “/batch-api extract title and date from each file in reports/ into a JSON file per report”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 2 original files, the Apache-2.0 licence and an attribution note.
batch-api.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip batch-api.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip batch-api.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Give a clear output contract such as 'return ONLY the complete transformed document' so results need no cleanup
- Read the dry-run preview carefully, including the cost estimate and digest, before approving submission
- Set maxOutputTokens for long outputs, since truncated items can only be retried with a larger limit
What's inside
- SKILL.md
- SKILL.test.ts
Redistributed unmodified from QwenLM/qwen-code under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.