batch-processor

A document-processing guide for splitting large documents into batches before extracting, translating, formatting, checking, and recombining them. A batch is one smaller section processed at a time.

In plain words
What is it for?
Use it for PDFs, web documents, or Markdown files over the stated size limits. It can plan batch ranges, translate each batch into Chinese, format the results, check quality, and merge the completed document.
Why use it?
It prevents large translation jobs from becoming unwieldy and provides progress tracking, saved intermediate results, error handling, retries, and recovery after an interruption.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/threefish-ai/negentropy/batch-processor
Any agent
npx skills add ThreeFish-AI/negentropy --skill batch-processor
Clone the repo
git clone --depth 1 https://github.com/ThreeFish-AI/negentropy

Made for: Claude Code, Codex.

Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,853 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00046 $0.01853
Opus 5 $0.00023 $0.00927
Sonnet 5 $0.00009 $0.00371
Haiku 4.5 $0.00005 $0.00185

Measured 2d ago against content hash ecc356bdd522, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

batch-processor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agent/skills/batch-processor/SKILL.md · 275 lines

How it starts

The opening of the file, as written. The whole thing — 275 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Batch Processor

专门管理大文档的批次处理,协调完整的翻译工作流程(提取、翻译、格式化),确保在处理大型文档时的效率和稳定性。

批次规则

批次大小限制

  • 最大页数: 30 页/批次
  • 最大段落数: 60 段落/批次
  • 最大字数: 6000 字/批次

批次划分策略

  1. 优先级: 页数 > 段落数 > 字数
  2. 边界处理: 在章节、段落等自然边界处分割
  3. 内容完整性: 确保每个批次的内容相对完整

Workflow

1. 文档分析

输入: 文档路径或内容
输出: 文档分析报告

分析内容:

  • 文档类型(PDF/Web/Markdown)
  • 总页数、段落数、字数
  • 建议的批次数量
  • 预估处理时间

2. 批次规划

输入: 文档分析报告
输出: 批次处理计划

规划内容:

  • 批次数量
  • 每个批次的范围
  • 处理顺序
  • 临时文件命名

3. 批次执行

输入: 批次处理计划
输出: 批次处理结果

执行步骤:

  1. 创建工作目录
  2. 按顺序处理每个批次
  3. 跟踪处理进度
  4. 保存中间结果
  5. 错误处理和重试
批次内处理流程
FOR EACH batch:
    1. 内容提取
       - PDF: 调用 pdf-reader
       - Web: 调用 web-translator
    2. 内容翻译
       - 调用 zh-translator
    3. 格式优化
       - 调用 markdown-formatter
    4. 质量检查
       - 验证输出质量
    5. 保存批次结果
END FOR

4. 结果合并

输入: 所有批次结果
输出: 最终合并文档

合并操作:

  • 按顺序合并内容
  • 处理批次间的衔接
  • 清理临时文件
  • 生成处理报告

使用方法

自动批次处理

请处理这个大文档,自动分成合适的批次:/path/to/large_document.pdf

自定义批次大小

处理这个文档,每批最多 20 页:/path/to/document.pdf

恢复中断的处理

继续处理上次未完成的文档,从第 3 批开始:/path/to/document.pdf

批次命名规范

临时文件格式

  • 批次文件:{doc_name}_batch_{N}.md
  • 图片目录:{doc_name}_batch_{N}_images/
  • 进度文件:{doc_name}_progress.json
  • 错误日志:{doc_name}_errors.log

最终输出

  • 合并文档:{doc_name}_translated.md
  • 图片目录:{doc_name}_images/
  • 处理报告:{doc_name}_report.md

进度跟踪

进度信息格式

{
  "document": "document.pdf",
  "total_batches": 5,
  "current_batch": 3,
  "status": "processing",
  "start_time": "2025-12-10T20:00:00Z",
  "estimated_completion": "2025-12-10T20:30:00Z",
  "batches": [
    {
      "batch_id": 1,
      "status": "completed",
      "pages": "1-20",
      "processed_at": "2025-12-10T20:05:00Z"
    },
    {
      "batch_id": 2,
      "status": "completed",
      "pages": "21-40",
      "processed_at": "2025-12-10T20:12:00Z"
    },
    {
      "batch_id": 3,
      "status": "processing",
      "pages": "41-60",
      "started_at": "2025-12-10T20:18:00Z"
    }
  ]
}

Read the full file on GitHub · 275 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 275 lines · 46 tokens per session scan A ecc356bdd522

Subscribe to this mod's changes

batch-processor is a skill published in the GitHub repository ThreeFish-AI/negentropy (10 stars, last pushed 2d ago), licensed Apache-2.0. It adds 46 tokens to every session and 1,853 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

Functional Enrichment Analysis (GSEA + ORA)

Translate differential expression results into biological insights using GSEA and ORA.

TianGzlab/OmicsClaw · 11 tokens

mcp-builder

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

HKUDS/DeepCode · 61 tokens

security-ownership-map

Analyze git repositories to build a security ownership topology (people-to-file), compute bus factor and sensitive-code ownership, and export CSV/JSON for graph databases and visualization. Trigger only when the user explicitly wants a security-oriented ownership or bus-factor analysis grounded in git history (for…

HKUDS/DeepCode · 99 tokens

llm-wiki

The foundational knowledge distillation pattern for building and maintaining an AI-powered Obsidian wiki. Based on Andrej Karpathy's LLM Wiki architecture. Use this skill whenever the user wants to understand the wiki pattern, set up a new knowledge base, or needs guidance on the three-layer architecture (raw sources…

Ar9av/obsidian-wiki · 113 tokens

wiki-lint

Audit and maintain the health of the Obsidian wiki. Use this skill when the user wants to check their wiki for issues, find orphaned pages, detect contradictions, identify stale content, fix broken wikilinks, or perform general maintenance on their knowledge base. Also triggers on "clean up the wiki", "what needs…

Ar9av/obsidian-wiki · 152 tokens

wiki-status

Show the current state of the wiki — what's been ingested, what's pending, and the delta between sources and wiki content. Use this skill when the user asks "what's the status", "how much is ingested", "what's left to process", "show me the delta", "what changed since last ingest", "wiki dashboard", or wants an…

Ar9av/obsidian-wiki · 210 tokens