← 返回 Skills 市场
493
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install batch-processor-1-0-0
功能描述
Process multiple documents in bulk with parallel execution
使用说明 (SKILL.md)
Batch Processor Skill
Overview
This skill enables efficient bulk processing of documents - convert, transform, extract, or analyze hundreds of files with parallel execution and progress tracking.
How to Use
- Describe what you want to accomplish
- Provide any required input data or files
- I'll execute the appropriate operations
Example prompts:
- "Convert 100 PDFs to Word documents"
- "Extract text from all images in a folder"
- "Batch rename and organize files"
- "Mass update document headers/footers"
Domain Knowledge
Batch Processing Patterns
Input: [file1, file2, ..., fileN]
│
▼
┌─────────────┐
│ Parallel │ ← Process multiple files concurrently
│ Workers │
└─────────────┘
│
▼
Output: [result1, result2, ..., resultN]
Python Implementation
from concurrent.futures import ProcessPoolExecutor, as_completed
from pathlib import Path
from tqdm import tqdm
def process_file(file_path: Path) -> dict:
"""Process a single file."""
# Your processing logic here
return {"path": str(file_path), "status": "success"}
def batch_process(input_dir: str, pattern: str = "*.*", max_workers: int = 4):
"""Process all matching files in directory."""
files = list(Path(input_dir).glob(pattern))
results = []
with ProcessPoolExecutor(max_workers=max_workers) as executor:
futures = {executor.submit(process_file, f): f for f in files}
for future in tqdm(as_completed(futures), total=len(files)):
file = futures[future]
try:
result = future.result()
results.append(result)
except Exception as e:
results.append({"path": str(file), "error": str(e)})
return results
# Usage
results = batch_process("/documents/invoices", "*.pdf", max_workers=8)
print(f"Processed {len(results)} files")
Error Handling & Resume
import json
from pathlib import Path
class BatchProcessor:
def __init__(self, checkpoint_file: str = "checkpoint.json"):
self.checkpoint_file = checkpoint_file
self.processed = self._load_checkpoint()
def _load_checkpoint(self):
if Path(self.checkpoint_file).exists():
return json.load(open(self.checkpoint_file))
return {}
def _save_checkpoint(self):
json.dump(self.processed, open(self.checkpoint_file, "w"))
def process(self, files: list, processor_func):
for file in files:
if str(file) in self.processed:
continue # Skip already processed
try:
result = processor_func(file)
self.processed[str(file)] = {"status": "success", **result}
except Exception as e:
self.processed[str(file)] = {"status": "error", "error": str(e)}
self._save_checkpoint() # Resume-safe
Best Practices
- Use progress bars (tqdm) for user feedback
- Implement checkpointing for long jobs
- Set reasonable worker counts (CPU cores)
- Log failures for later review
Installation
# Install required dependencies
pip install python-docx openpyxl python-pptx reportlab jinja2
Resources
安全使用建议
This skill appears coherent for bulk document processing. Before installing or running: (1) run pip installs in a virtualenv and add tqdm if you want progress bars; (2) ensure the agent/process you give this skill has only the file-system access it needs (it will read input files and create checkpoint.json in the working directory); (3) validate or scan input files (malicious documents can exploit processors); (4) if you plan autonomous runs, restrict the agent's file-path scope to prevent unexpected file access. If you need stronger guarantees, ask the author for explicit input validation and a minimal dependency list.
功能分析
Type: OpenClaw Skill
Name: batch-processor-1-0-0
Version: 1.0.0
The skill is classified as suspicious due to its reliance on high-risk capabilities like `code_execution` and `file_operations` (declared in SKILL.md), and the instruction to `pip install` multiple packages. While these capabilities are plausibly needed for its stated purpose of 'batch processing' and the listed packages are legitimate, the open-ended nature of the `process_file` placeholder and the ability to install dependencies via `pip` present a significant attack surface for potential prompt injection or supply chain vulnerabilities if the agent's guardrails are insufficient or if a malicious dependency were introduced.
能力评估
Purpose & Capability
The name/description (bulk document processing) matches the SKILL.md contents: design patterns, Python code examples using concurrent.futures, checkpointing, and suggested document libraries. The listed pip packages (python-docx, openpyxl, python-pptx, reportlab, jinja2) are relevant for converting and manipulating office files and PDFs.
Instruction Scope
Instructions stick to processing user-provided files, progress tracking, and checkpointing. The examples read and write files within the working directory (e.g., checkpoint.json) which is expected for a batch processor. There are no instructions to exfiltrate data, call unrelated external services, or access system credentials. A minor note: the prose allows the agent discretion ('I'll execute the appropriate operations')—this is normal for instruction skills but means the agent will need permission to run file operations and code execution.
Install Mechanism
This is an instruction-only skill (no install spec). The SKILL.md suggests installing Python packages via pip, which is proportionate. Minor inconsistency: the examples use tqdm for progress bars but tqdm is not included in the pip install command—add it if you expect CLI progress bars. No downloads from unknown hosts or archive extraction are present.
Credentials
The skill requests no environment variables, credentials, or config paths. The only file artifact is a local checkpoint (checkpoint.json) created in the working directory — this is appropriate for resume-safe batch jobs.
Persistence & Privilege
always is false and the skill does not request permanent presence or elevated privileges. It writes/reads its own checkpoint file but does not modify other skills or system-wide settings.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install batch-processor-1-0-0 - 安装完成后,直接呼叫该 Skill 的名称或使用
/batch-processor-1-0-0触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of the Batch Processor skill:
- Enables bulk processing of documents with parallel execution for tasks like conversion, extraction, and transformation.
- Supports progress tracking and checkpointing for easy error recovery and resume-safe operation.
- Provides sample Python implementation, including best practices for reliability and efficiency.
- Compatible with Claude Sonnet 4 and Opus 4 models; uses file, code execution, and basic computer tools.
- Includes installation guide and resource links.
元数据
常见问题
Batch Processor 1.0.0 是什么?
Process multiple documents in bulk with parallel execution. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 493 次。
如何安装 Batch Processor 1.0.0?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install batch-processor-1-0-0」即可一键安装,无需额外配置。
Batch Processor 1.0.0 是免费的吗?
是的,Batch Processor 1.0.0 完全免费(开源免费),可自由下载、安装和使用。
Batch Processor 1.0.0 支持哪些平台?
Batch Processor 1.0.0 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Batch Processor 1.0.0?
由 Leo Wing(@leowing)开发并维护,当前版本 v1.0.0。
推荐 Skills