← 返回 Skills 市场
ddpie

Batch File Processor

作者 ddpie · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
254
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install batch-file-processor
功能描述
Parallel batch processing of large file sets using sub-agents (summarize, analyze, extract, transform). Use when performing the same operation across many fi...
使用说明 (SKILL.md)

Batch File Processor

Process large numbers of files in parallel using sub-agents, avoiding main agent context overflow.

Workflow

1. List files

find \x3Cdirectory> -type f -name "*.md" | sort

2. Group

Split into batches of 2-4 files each (3 is optimal).

3. Dispatch sub-agents

One sub-agent per batch. Task template:

Read the following files completely and generate a brief summary (under 50 words) for each.
1. /path/to/file1.md
2. /path/to/file2.md
3. /path/to/file3.md
Return ONLY a JSON array:
[{"file": "relative/path/file1.md", "summary": "..."},...]

Key parameters:

  • mode: "run" (one-shot task)
  • runTimeoutSeconds: 120 (increase to 180 for large files)
  • label: descriptive label, e.g. idx-project-batch1

4. Collect results

Sub-agents push results on completion. Use sessions_yield to wait and collect incrementally.

5. Compile output

Once all results are in, the main agent compiles the final deliverable (index file, report, etc.).

Rules

  • 2-4 files per sub-agent — never let one sub-agent process an entire directory sequentially
  • Read full file content — no head/tail truncation; partial reads produce incomplete summaries
  • Standardize output format — JSON makes it easy for the main agent to parse and merge
  • One spawn per turn — system limitation; use multiple spawn + yield cycles

Anti-patterns

Mistake Consequence
head -20 to skim file headers Poor summary quality, key information missed
One sub-agent processes entire directory Context overflow, timeout failure
Main agent reads all files sequentially Context window exhausted, later files unreadable
One sub-agent per large directory Large directories timeout, small ones waste capacity

Benchmarks

70 files → 25 sub-agents (3 files each) → parallel execution → completed in 5 minutes → high accuracy summaries

Task Template Variants

File summarization (default)

Generate a brief summary (under 50 words) for each file.

Information extraction

Extract the following fields from each file: project name, budget, key contacts, risks.
Return JSON: [{"file": "...", "project": "...", "budget": "...", "contacts": [...], "risks": [...]}]

Content classification

Classify each file by checking for these topics: security, compliance, migration.
Return JSON: [{"file": "...", "has_security": true/false, "has_compliance": true/false, "has_migration": true/false}]

Code analysis

Analyze each source file: count lines, list imports/dependencies, identify main functions.
Return JSON: [{"file": "...", "lines": N, "imports": [...], "main_functions": [...]}]
安全使用建议
This skill is coherent with its stated purpose but you should confirm runtime permissions before using it: only run it on directories you trust, or configure an allowlist of paths and file types. Verify your agent platform supports spawning sub-agents and that sessions_yield behavior is safe and rate-limited. Consider testing on non-sensitive sample files first, set size/time limits (the template mentions timeouts), and avoid running it with elevated privileges or against folders containing secrets (keys, credentials, etc.). If possible, add explicit safeguards (path allowlist/denylist, max file size, redaction rules) before processing large or sensitive file sets.
功能分析
Type: OpenClaw Skill Name: batch-file-processor Version: 1.0.0 The skill is a legitimate utility designed to process large sets of files in parallel by distributing tasks among sub-agents to avoid context window limitations. It uses standard shell commands (e.g., `find` in SKILL.md) and provides structured templates for summarization and analysis without any evidence of malicious intent, data exfiltration, or prompt injection attacks.
能力评估
Purpose & Capability
Name/description match the instructions: the SKILL.md explains batching, sub-agents, and file summaries. The skill does not declare required environment variables or config paths, yet the runtime instructions assume access to the host filesystem and a sub-agent/session API. This omission is a declaration gap (not necessarily malicious) — the skill legitimately needs file-read and sub-agent capabilities but doesn't state them explicitly.
Instruction Scope
Instructions explicitly tell sub-agents to 'Read the following files completely' and use shell find to enumerate files. That is coherent for summarization/analysis, but it means the skill will read full file contents (which can include secrets). There are no instructions requiring other unrelated data sources, network exfiltration endpoints, or environment variables. The guidance lacks safeguards (allowlist/denylist, size limits, or redaction) which raises privacy risk if run against sensitive directories.
Install Mechanism
No install spec and no code files — the skill is instruction-only, so nothing is written to disk or downloaded during install. This is the lowest-risk install model.
Credentials
The skill requests no credentials or env vars in metadata, which is appropriate. However, it implicitly requires permission to read arbitrary files and to spawn/collect sub-agents (sessions_yield). Ensure those implicit privileges are minor and scoped; otherwise the ability to read many files could expose sensitive data.
Persistence & Privilege
always is false and the skill does not request persistent/privileged presence or claim to modify other skills or system-wide settings. Autonomous invocation is allowed (platform default) but not combined with other red flags.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install batch-file-processor
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /batch-file-processor 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: parallel batch file processing methodology using sub-agents
元数据
Slug batch-file-processor
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Batch File Processor 是什么?

Parallel batch processing of large file sets using sub-agents (summarize, analyze, extract, transform). Use when performing the same operation across many fi... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 254 次。

如何安装 Batch File Processor?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install batch-file-processor」即可一键安装,无需额外配置。

Batch File Processor 是免费的吗?

是的,Batch File Processor 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Batch File Processor 支持哪些平台?

Batch File Processor 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Batch File Processor?

由 ddpie(@ddpie)开发并维护,当前版本 v1.0.0。

💬 留言讨论