मुख्य सामग्री पर जाएँ
Skillpedia
ऑटोमेशन29k · #9776

batch-api

यह क्या करती है

यह कई फ़ाइलों को एक चरण में बदलने की योजना तैयार करती है, जैसे उनका अनुवाद या पुनर्लेखन, और उसे वास्तविक-समय कीमत के आधे पर batch सेवा को भेजती है। नतीजे बाद में नई फ़ाइलों के रूप में आते हैं। यह उन लोगों के लिए है जो कम लागत वाले बड़े काम के लिए घंटों इंतज़ार कर सकते हैं।

कब इस्तेमाल करें

  • ✓जब आपको एक ही एक-बारी वाला बदलाव कई फ़ाइलों पर लागू करना हो और नतीजे के लिए घंटों रुक सकें।
  • ✓जब आप बड़ी संख्या में फ़ाइलों का अनुवाद, पुनर्लेखन या सामग्री निकालना कम लागत पर चाहें।
  • ✓जब आप स्पष्ट रूप से batch कीमत चाहें, वास्तविक-समय रन नहीं।

Skill का लिंक

https://github.com/QwenLM/qwen-code/blob/main/packages/core/src/skills/bundled/batch-api/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/QwenLM/qwen-code/blob/main/packages/core/src/skills/bundled/batch-api/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मैं अपनी सभी product विवरण फ़ाइलों का स्पेनिश में अनुवाद सस्ते batch विकल्प से करवाना चाहता हूँ, और मैं नतीजों का इंतज़ार कर सकता हूँ।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट एक योजना फ़ाइल तैयार करता है जो फ़ाइलों और बदलाव का वर्णन करती है, फिर एक कमांड job सबमिट करता है। अनुरोध एजेंट खुद नहीं लिखता, और नतीजे नई फ़ाइलों के रूप में लौटते हैं।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

/batch-api — Agent-prepared Batch API workflow

Hard rule for this whole skill: if any qwen batch … command fails, or the task turns out to be unsuitable, report what happened in a few lines and stop (the one exception, a plan-field error from run, is in §4). Never fall back to doing the transform yourself in this session — the user chose the half-price asynchronous path explicitly, and silently doing the work at full realtime price is exactly what they opted out of. Offering it as a choice ("I can do this realtime instead, at full price") is fine; doing it without being asked is not.

The user explicitly chose async batch mode by typing /batch-api. This mode trades latency for price: the provider bills Batch requests at 50% of the realtime list price (with no context-cache benefit), and a job takes tens of minutes to hours to finish (completion window 24h or more). Your job is to turn the user's task into a small plan file that the deterministic executor (qwen batch run) submits. You never write request JSONL by hand and never call the Batch API yourself.

0. Check readiness before anything else

Run every qwen batch … command with the shell tool as "${QWEN_CODE_CLI:-qwen}" batch … — QWEN_CODE_CLI names the CLI running this session, so a plain qwen on PATH (possibly an older install without these subcommands) is only the fallback. First make sure the CLI you reach has them. Help output never calls a model:

"${QWEN_CODE_CLI:-qwen}" batch --help

If the output does not list batch run <plan>, the qwen it reached is an older install without these subcommands — say so (the session's CLI is not on PATH as qwen) and stop. Do not run any other batch command there: an older CLI treats batch check as a prompt and answers it with a billed model call. Then:

"${QWEN_CODE_CLI:-qwen}" batch check

It proves the credentials, endpoint and Batch route work and shows the model, thinking mode and output limit a run would freeze from the user's current settings — without a billed request. settings.batch.model can select a separate modelProviders entry; its endpoint, envKey and generationConfig are used without changing the conversation model. Do not edit authentication or settings to work around a failed check. If it fails (for example Qwen OAuth, which has no Batch route), relay its message and stop: do not read files or draft a plan the executor cannot submit. Pass its note: lines on to the user.

1. Decide suitability honestly — this is your main job

Suitable: many independent, single-turn transforms whose input materials are fully available right now. Examples: translate a set of documents under a fixed style guide, rewrite files to a new format, summarize or extract structured data from each file of a set.

Unsuitable:

  • Work that needs iterative feedback — debugging, run-test-fix loops, exploratory refactors. The next step there depends on results that do not exist yet.
  • Chained tasks where one item's output is another item's input.
  • A handful of items, or a task the user needs answered soon. Batch's wait buys nothing there.

If the task is unsuitable, say so in one short paragraph and stop.

2. Prepare lightly

The whole point is saving money, so do not burn the savings in preparation:

  • Discover the target files with glob.
  • Read only a small sample (2–3 files) to understand structure and edge cases. Do NOT deeply read every file — the executor reads and embeds the full contents mechanically at submission time.
  • Draft the shared rules once: terminology, style, format constraints, and the exact output contract. The model that runs the batch sees only your plan — spell out everything it needs, including "return ONLY the complete transformed document, no commentary".

3. Write the plan file

Write one JSON file to .qwen/batch/plans/<slug>.json (<slug> = short kebab-case task name) with the write_file tool:

{
  "version": 1,
  "name": "<slug>",
  "kind": "document-transform",
  "shared": {
    "system": "optional role/system prompt",
    "instructions": "the shared transform rules, terminology, output contract"
  },
  "items": [
    {
      "id": "intro",
      "source": "docs/zh/intro.md",
      "target": "docs/en/intro.md"
    }
  ]
}

Rules:

  • id must match [A-Za-z0-9][A-Za-z0-9_-]{0,59} (1–60 characters) and be unique per item; it becomes part of the provider-side custom_id.
  • Paths are relative to the curr
अक्सर पूछे जाने वाले सवाल

यह कितनी सस्ती है?

batch सेवा इन अनुरोधों का बिल वास्तविक-समय सूची कीमत के आधे पर लेती है, और context-cache का कोई लाभ नहीं होता।

एक job में कितना समय लगता है?

Jobs में दस मिनट से घंटों तक लग सकते हैं, और पूरा होने की अवधि 24 घंटे या उससे अधिक हो सकती है।

अगर batch कमांड विफल हो जाए तो?

एजेंट बताता है कि क्या हुआ और रुक जाता है। वह चुपचाप पूरा काम पूरी वास्तविक-समय कीमत पर नहीं करता।

जानकारी

लेखक का मूल विवरण

Prepare a many-file, single-turn transform (translate, rewrite, extract) as a plan and submit it to the asynchronous, half-price DashScope Batch API; results are delivered as new files hours later. Invoke explicitly with /batch-api.

repo: QwenLM/qwen-code

लोकप्रियता

GitHub स्टार
29k
रैंकिंग में स्थान
#9776
लाइसेंस
Apache-2.0
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

codegraph

29k

यह आपके एजेंट को इंडेक्स किए कोडबेस का विश्लेषण करने में मदद करती है, उसके कॉल ग्राफ़, निर्भरताओं, बेकार कोड, हॉटस्पॉट और अर्थ-आधारित खोज के ज़रिए।

कोडिंगसामान्य कोडिंग

qwen-code-claw

29k

यह आपके एजेंट को कोडिंग के काम Qwen Code को सौंपने में मदद करती है, जैसे कोडबेस समझना, बग ठीक करना, कोड रीफ़ैक्टर करना या नया प्रोजेक्ट बनाना।

कोडिंगसामान्य कोडिंग

structured-debugging

29k

यह आपके एजेंट को कठिन बग ढूँढने का चरण-दर-चरण तरीका सिखाती है: परिकल्पना बनाना, लक्षित जांच करना, परखना और ठीक करने से पहले असली कारण ढूँढना।

कोडिंगसामान्य कोडिंग

tmux-real-user-testing

29k

यह आपके एजेंट को tmux के अंदर टर्मिनल ऐप को असली यूज़र की तरह टेस्ट करने में मदद करती है, हर कदम की स्क्रीन-तस्वीर के साथ पढ़ने योग्य लॉग सहेजकर।

कोडिंगटेस्टिंग

मिलती-जुलती skills