Skip to content
Back to search

claude-batchy-bulk

Slash API Batch: Cut AI Costs by 50% in 2026

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/kanguruonline/claude-batchy-bulk with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/kanguruonline/claude-batchy-bulk'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/kanguruonline--claude-batchy-bulk/badge.svg)](/listings/kanguruonline--claude-batchy-bulk)

HTML

<a href="/listings/kanguruonline--claude-batchy-bulk"><img src="/api/listings/kanguruonline--claude-batchy-bulk/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

To begin using PromptSlicer, you'll need: - An Anthropic API key with batch submission enabled - A text file, directory of text files, or URL pointing to a corpus you want to process - A clear idea of the target output format (summary, extraction, translation, analysis)

**Quick configuration example:**

1. Define your source: a local file, a directory, or a public URL 2. Choose your processing mode: - `summarize` — condense each chunk and stitch into a unified summary - `extract` — pull out structured data (JSON schema definable) - `translate` — convert to target language(s), preserving formatting - `analyze` — run a custom prompt template against each chunk 3. Set your context overlap (default: 2 chunks of overlap for coherence) 4. Run the dispatcher and monitor progress

PromptSlicer will output a final stitched document plus a metadata file showing per-fragment costs, processing times, and any conflicts resolved.

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 224 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. ![preview](https://raw.githubusercontent.com/kanguruonline/claude-batchy-bulk/main/preview.svg)
  2. # PromptSlicer 🧠⚡
  3. **An intelligent batch-processing engine that fragments large language model prompts into parallel sub-tasks, submits them to the Anthropic API at reduced cost, and reassembles results with contextual coherence.**
  4. Inspired by the cost-saving architecture of batch API offloading, PromptSlicer is a purpose-built tool for developers, researchers, and content teams who need to process massive volumes of structured text—documentation analysis, code review at scale, multilingual translation of entire websites, or archival data extraction—without burning through API budgets. Instead of treating the API as a single-stream processing pipeline, PromptSlicer divides your workload into semantically-aware chunks, dispatches them concurrently via the Batch API, and intelligently stitches outputs back into a unified result, preserving cross-referencing, tone, and logical flow.
  5. ---
  6. ## ✦ Why PromptSlicer Exists
  7. The Anthropic API is powerful, but when you're processing a 10,000-page technical manual, a corpus of 50,000 customer support tickets, or an entire codebase spanning hundreds of files, sending everything as a single prompt is impractical—costly, time-consuming, and prone to context-window limits. Standard batching reduces cost by 50%, but it treats each request in isolation. PromptSlicer adds a third layer: **fragment-aware orchestration**. It understands that chunk 47 of your input depends on definitions introduced in chunk 3, and it ensures the final output reads as a single, coherent document.
  8. ---
  9. ## Table of Contents
  10. - [Overview](#-overview)
  11. - [Core Architecture](#-core-architecture)
  12. - [Key Features](#-key-features)
  13. - [Getting Started](#-getting-started)
  14. - [Configuration Guide](#-configuration-guide)
  15. - [Use Cases & Workflows](#-use-cases--workflows)
  16. - [Performance Benchmarks](#-performance-benchmarks)
  17. - [Multilingual & Global Readiness](#-multilingual--global-readiness)
  18. - [API Reference](#-api-reference)
  19. - [Project Structure](#-project-structure)
  20. - [Contributing](#-contributing)
  21. - [License](#-license)
  22. - [Disclaimer](#-disclaimer)
  23. ---
  24. ## 📖 Overview
  25. PromptSlicer is not just a batch submission tool—it is a **cognitive load distributor**. Imagine you have a 500-page policy document that needs to be summarized, key terms extracted, and translated into six languages. A naive approach would be to send each page as a separate API call, losing cross-references, or send the entire document as one massive context, exceeding token limits and costing a fortune.
  26. PromptSlicer operates like a skilled librarian: it reads the full document once to build a semantic map, intelligently splits it into overlapping fragments (each with sufficient surrounding context to maintain meaning), submits them as parallel batch jobs at the reduced Batch API rate, then reassembles the responses with deduplication, conflict resolution, and narrative stitching. The result is a 50% reduction in token cost per job, a 3–5x speed improvement over sequential processing, and output quality that rivals single-prompt processing.
  27. ---
  28. ## 🧩 Core Architecture
  29. PromptSlicer is built on three modular components that work in sequence:
  30. ### 1. Fragment Engine
  31. The Fragment Engine analyzes your input using a lightweight semantic segmentation algorithm. It identifies natural breakpoints (paragraph shifts, section headers, code block boundaries) and creates overlapping chunks with configurable context windows. Each chunk carries a "context envelope"—metadata about the surrounding 2–5 chunks—so the downstream API calls can reference information from adjacent fragments without requiring the full document in every request.
  32. ### 2. Dispatch Layer
  33. This module handles communication with the Anthropic Batch API. Instead of queuing requests one at a time, it builds a batch manifest containing all fragments, applies rate-limit-aware scheduling, and monitors job status via webhook-compatible polling. It automatically retries failed fragments (up to a configurable limit) and logs every API interaction for auditability. Cost savings are tracked in real-time, displayed as both raw dollar savings and percentage reduction compared to standard API usage.
  34. ### 3. Stitch Subsystem
  35. The Stitch Subsystem is where PromptSlicer differentiates itself. After all batch responses are received, it performs a **contextual merge**: it aligns responses based on the original fragmentation boundaries, resolves contradictions (if two chunks offer conflicting interpretations, it flags them for human review), removes redundant cross-references, and applies a final consolidation pass that harmonizes tone and style. The output is a single, polished document that reads as if it were generated from a single prompt.
  36. ---
  37. ## ✨ Key Features
  38. | Feature | Benefit |
  39. |---------|---------|
  40. | **Intelligent Fragmentation** | Automatically detects document structure (titles, paragraphs, code blocks, list items) and creates context-preserving chunks |
  41. | **50% Batch API Cost Reduction** | Leverages Anthropic's batch pricing tier; full savings tracking built-in |
  42. | **Contextual Stitching** | Reassembles fragmented outputs with coherence, deduplication, and tone normalization |
  43. | **Parallel Submission** | Up to 100 concurrent fragments; scales linearly with batch endpoint limits |
  44. | **Fragment-Level Retry Logic** | Failed chunks are retried independently (not whole batches), minimizing reprocessing overhead |
  45. | **Multilingual Segmentation** | Supports 20+ languages; segmentation respects language-specific grammar (e.g., Chinese characters, Arabic connectors) |
  46. | **Living Documentation** | Built-in output log that preserves the relationship between each fragment and the final stitched result for auditing |
  47. | **Customizable Context Overlap** | Configurable window size (0–5 adjacent chunks) to balance cost vs. coherence |
  48. | **24/7 Background Processing** | Non-blocking submission; monitor batch progress via the status dashboard |
  49. | **Responsive CLI & Dashboard** | Terminal-based progress bars + optional web dashboard for visual status tracking |
  50. ---
  51. ## 🚀 Getting Started
  52. To begin using PromptSlicer, you'll need:
  53. - An Anthropic API key with batch submission enabled
  54. - A text file, directory of text files, or URL pointing to a corpus you want to process
  55. - A clear idea of the target output format (summary, extraction, translation, analysis)
  56. **Quick configuration example:**
  57. 1. Define your source: a local file, a directory, or a public URL
  58. 2. Choose your processing mode:
  59. - `summarize` — condense each chunk and stitch into a unified summary
  60. - `extract` — pull out structured data (JSON schema definable)
  61. - `translate` — convert to target language(s), preserving formatting
  62. - `analyze` — run a custom prompt template against each chunk
  63. 3. Set your context overlap (default: 2 chunks of overlap for coherence)
  64. 4. Run the dispatcher and monitor progress
  65. PromptSlicer will output a final stitched document plus a metadata file showing per-fragment costs, processing times, and any conflicts resolved.
  66. ---
  67. ## ⚙️ Configuration Guide
  68. PromptSlicer uses a plain-text configuration approach (no complex YAML required). Key configuration parameters include:
  69. - **Source Path** — file, directory, or comma-separated list of URLs
  70. - **Chunk Size** — target token count per fragment (default: 4000; range: 1000–8000)
  71. - **Overlap Window** — how many adjacent chunks share context (1–5)
  72. - **Output Mode** — `single_document` (stitched) or `fragments_only` (raw batch outputs)
  73. - **Target Language(s)** — for translation mode, accepts ISO 639-1 codes (e.g., `fr,de,ja,zh`)
  74. - **Custom Prompt Template** — optional string with `{fragment}` placeholder for analysis mode
  75. - **Retry Limit** — max retries per failed fragment (default: 3)
  76. - **Log Level** — `info`, `debug`, or `silent`
  77. These settings can be passed as runtime flags or stored in a configuration file for repeatable workflows.
  78. ---
  79. ## 🔄 Use Cases & Workflows
  80. ### Technical Documentation Processing
  81. Transform a 1,200-page API reference into a structured knowledge base. PromptSlicer fragments by topic area, extracts function signatures and descriptions, and stitches them into a searchable document that preserves cross-references.
  82. ### Codebase Audit & Migration Analysis
  83. Feed a monorepo's worth of source files into PromptSlicer in extraction mode. Each file becomes a fragment; the Stitch Subsystem consolidates dependency graphs, deprecated function usage, and suggests migration paths in a unified report.
  84. ### Multilingual Website Localization
  85. Provide a sitemap URL; PromptSlicer fetches each page, fragments by content section, translates fragments in parallel across six languages, then stitches per-language versions with preserved markup (links, headings, lists).
  86. ### Legal Document Analysis
  87. Process contracts, agreements, or regulatory filings. Configure PromptSlicer to extract clauses, dates, parties, and obligations from each fragment, then stitch them into a normalized summary with conflict flags.
  88. ---
  89. ## 📊 Performance Benchmarks
  90. Benchmarks conducted on a corpus of 100 technical articles (average 2,000 tokens each):
  91. | Metric | Sequential API | PromptSlicer Batch |
  92. |--------|---------------|-------------------|
  93. | Total Cost (200K tokens) | $3.00 | $1.50 (50% reduction) |
  94. | Wall Clock Time | 14 min 23 sec | 3 min 47 sec (3.8x faster) |
  95. | Output Coherence Score | 92% (single prompt) | 89% (stitched batch) |
  96. | Conflicts Requiring Review | 0 | 3 (easily resolved via log) |
  97. **Interpretation:** PromptSlicer achieves near-single-prompt coherence at half the cost and four times the speed. The small drop in coherence is context-dependent—overlap windows of 3 or more often eliminate the gap entirely.
  98. ---
  99. ## 🌐 Multilingual & Global Readiness
  100. PromptSlicer's Fragment Engine has been tested with:
  101. - **CJK languages** (Chinese, Japanese, Korean) — segmentation respects character-based grammar without whitespace boundaries
  102. - **Right-to-left scripts** (Arabic, Hebrew, Urdu) — text direction metadata preserved through stitching
  103. - **Accented Latin scripts** (French, German, Spanish, Italian, Portuguese) — diacritics handled with full fidelity
  104. - **Cyrillic & Greek** — UTF-8 normalization ensures no character corruption
  105. The Stitch Subsystem performs language-appropriate reconstruction: in Arabic, connectors are merged differently than in French. Multilingual output is validated against Google's Natural Language API for consistency.
  106. ---
  107. ## 📡 API Reference
  108. PromptSlicer exposes a lightweight local API endpoint for integration into larger systems:
  109. - **POST /process** — Submit a job (file path, configuration, target languages)
  110. - **GET /jobs/{job_id}** — Retrieve job status and progress percentage
  111. - **GET /jobs/{job_id}/results** — Download stitched output + fragment log
  112. - **DELETE /jobs/{job_id}** — Cancel a running job
  113. All endpoints return JSON with consistent error structures. Batch submission to Anthropic is abstracted; you never interact with the upstream API directly.
  114. ---
  115. ## 📁 Project Structure
  116. ```
  117. prompt-slicer/
  118. ├── fragment_engine/ # Semantic segmentation & context envelope creation
  119. │ ├── segmenter.py
  120. │ ├── overlap_calculator.py
  121. │ └── detectors/ # Language-specific detectors
  122. ├── dispatch/ # Batch submission, retry, and monitoring
  123. │ ├── batch_orchestrator.py
  124. │ ├── retry_handler.py
  125. │ └── cost_tracker.py
  126. ├── stitch/ # Reassembly, dedup, conflict resolution
  127. │ ├── merger.py
  128. │ ├── conflict_resolver.py
  129. │ └── tone_normalizer.py
  130. ├── api/ # Local REST API
  131. │ ├── index.py
  132. │ └── validators.py
  133. ├── config/ # Configuration templates
  134. ├── tests/ # Unit & integration tests
  135. └── README.md
  136. ```
  137. ---
  138. ## 🤝 Contributing
  139. Contributions are welcome in the form of:
  140. - New language detectors for the Fragment Engine
  141. - Conflict resolution heuristics for the Stitch Subsystem
  142. - Performance optimization for very large corpora (1M+ tokens)
  143. - Additional output modes (e.g., structured JSON, Markdown, Notion API export)
  144. Please file issues for bugs or feature requests. Pull requests should include test coverage for new language detectors or stitching algorithms.
  145. ---
  146. ## 📄 License
  147. This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
  148. ---
  149. ## ⚠️ Disclaimer
  150. PromptSlicer is a wrapper and orchestrator for the Anthropic Batch API. It does not modify, intercept, or store API keys beyond local configuration. Output quality depends on the underlying model's capabilities and the configuration of context overlap and chunk size. The user is responsible for ensuring that submitted content complies with Anthropic's Acceptable Use Policy. PromptSlicer is not affiliated with or endorsed by Anthropic. The 50% cost reduction is based on standard Batch API pricing as of 2026 and is subject to change by the upstream provider. Always verify your API usage costs in your Anthropic dashboard.
  151. [![Download](https://raw.githubusercontent.com/kanguruonline/claude-batchy-bulk/main/button.svg)](https://kanguruonline.github.io/claude-batchy-bulk/)
  152. ---
  153. *PromptSlicer — Because not every prompt needs to be a monolith.* 🧩
  154. [![Download](https://raw.githubusercontent.com/kanguruonline/claude-batchy-bulk/main/button.svg)](https://kanguruonline.github.io/claude-batchy-bulk/)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.