Към всички skills

batch

QwenLM · Разработка

Execute batch operations on multiple files in parallel. Automatically discovers files, splits into chunks, and processes with parallel worker agents. Use `/batch` followed by operation and file pattern.

Оригинален текст · няма потвърден превод на български

Теми: agentic · ai · ai-agent · ai-coding · cli · coding-agent · developer-tools · llm · mcp · qwen · terminal · typescript

Първо прочетете инструкцията.

Файлът се зарежда от посочения източник само по ваше действие. Можете да го прочетете тук, да го копирате или да го запазите като .md.

Оригинален SKILL.md
GitHub хранилище
Звезди на репото
28 085
Лиценз
Apache-2.0
Последна проверка на записа
20.09.2026 г.

Добавете в своя инструмент.

Командата отваря избора на skills от репозитория. Прочетете файла и условията на автора преди изпълнение.

npx skills add QwenLM/qwen-code

Страницата копира текст. Не инсталира и не изпълнява нищо на устройството ви.

Откъс от SKILL.md

Началото на файла на автора, без превод.

/batch - Parallel Batch Operations

You are orchestrating a batch operation across multiple files. Your job is to:

  1. Parse the user's request to understand the target files and operation
  2. Discover matching files using glob
  3. Split files into chunks for parallel processing
  4. Launch multiple worker agents to process files concurrently
  5. Aggregate results and present a summary

Step 1: Parse Intent and Discover Files

First, parse the user's request to identify:

  • Target pattern: glob pattern for files (e.g., src/**/*.ts, **/*.js)
  • Operation: what to do with each file (e.g., "add JSDoc comments", "convert to TypeScript")

If the user didn't specify a pattern, infer it from context or ask for clarification.

Use the glob tool to discover matching files.

If no files match the pattern:

  • Inform the user that no files were found for the given pattern
  • Suggest checking the pattern or broadening the search scope
  • Do not proceed with an empty batch

Apply these common exclusions automatically:

  • node_modules/**
  • dist/**
  • build/**
  • .git/**
  • **/*.test.ts, **/*.test.js
  • **/*.spec.ts, **/*.spec.js
  • **/__tests__/**
  • **/test/**, **/tests/**
  • **/package-lock.json
  • **/yarn.lock
  • **/pnpm-lock.yaml
  • **/*.min.js
  • Binary files (images, fonts, etc.)
  • Files larger than 500KB (check size if needed)

Important: If more than 50 files match, inform the user with the exact count and the file list, then proceed. The user can cancel (Ctrl+C) if needed. If the count exceeds 100 files, warn the user and suggest a more specific pattern instead of proceeding.

Step 2: Chunk Files for Parallel Processing

Split the discovered files into chunks based on these rules:

Total FilesChunk CountFiles Per Chunk
1-51All files
6-1523-8 each
16-303~10 each
31-504~10-12 each
51-755~10-15 each
76-1005~15-20 each

Chunking algorithm:

  • Minimum chunk size: 3 files (avoid over-parallelization for small batches)
  • Maximum chunk size: 15 files (ensure reasonable work per agent)
  • Maximum parallel agents: 5 (API rate limit consideration)

Example: 24 files → 3 chunks of ~8 files each

Step 3: Launch Parallel Worker Agents

Целият SKILL.md в GitHub