batch-read

Read multiple files matching a pattern in one atomic operation.

4|Updated Sep 25, 2025
One-click install
npx skills add https://github.com/cowwoc/styler --skill batch-read
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: batch-read
Source: https://github.com/cowwoc/styler/tree/main/.claude/skills/batch-read
Command: npx skills add https://github.com/cowwoc/styler --skill batch-read

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Codebase exploration often requires reading multiple files that share a common pattern. The traditional method of searching, then reading each file individually, is slow and inefficient, consuming many LLM round-trips. This Skill streamlines the process into a single atomic operation.

Core Features & Use Cases

  • Atomic File Discovery & Read: Combines finding files by pattern and reading their contents into a single, optimized operation.
  • Significant Performance Boost: Achieves 50-70% time savings and reduces LLM round-trips from 1+N to 2-3 for reading 3+ files.
  • Flexible Filtering: Supports pattern matching, file type filters (--type java), and limits on the number of files (--max-files).
  • Contextual Output: Provides combined file contents with line numbers, truncation indicators, and size warnings for large outputs.
  • Use Case: When you need to understand how a specific FormattingRule is implemented across your Java codebase, use this Skill to find all relevant files and read their contents in one go, giving you a comprehensive overview without tedious manual steps.

Quick Start

To find and read Java files containing "FormattingRule": /workspace/main/.claude/scripts/batch-read.sh "FormattingRule"
--type java
--max-files 5

Frequently Asked Questions about batch-read

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I read multiple files matching a pattern without individual lookups?

Batch-read combines file discovery and reading into a single atomic operation. Instead of searching then opening files individually, it finds all matching files and outputs their contents together, reducing LLM round-trips from 1+N to 2-3 for three or more files.

Can I filter files by type when batch-reading a codebase?

Yes, batch-read supports file-type filtering with the `--type` flag (e.g., `--type java`), pattern matching on filenames or content, and a `--max-files` limit to control the volume of results returned.

What's the fastest way to gather context across multiple files in a codebase?

Batch-read achieves 50-70% time savings by atomically discovering and reading files that match a pattern in one operation, eliminating the overhead of repeated searches and file opens across your repository.

How does batch-read handle large file outputs and truncation?

Batch-read outputs combined file contents with line numbers, truncation indicators for oversized results, and size warnings so you know when output exceeds practical limits and can adjust filters or max-files accordingly.

Do I need special tools installed to use batch-read?

Batch-read requires Bash tooling and works via command-line scripts. It outputs JSON metadata plus combined file contents, making it compatible with standard codebase exploration workflows.

When should I use batch-read instead of searching files one at a time?

Use batch-read when exploring patterns across multiple files—such as finding all implementations of a class, gathering test samples, or collecting documentation files—to compress many round-trips into a single efficient lookup.