batch-editing

Automate idempotent bulk edits across multiple files with dry-run planning.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/swat9013/dotfiles --skill batch-editing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: batch-editing
Source: https://github.com/swat9013/dotfiles/tree/main/.claude-global/skills/batch-editing
Command: npx skills add https://github.com/swat9013/dotfiles --skill batch-editing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a structured workflow for performing deterministic, repeatable edits across multiple files while minimizing risk of partial failures and ensuring idempotency and verification.

Core Features & Use Cases

  • Threshold guidance: Advises when to run ad-hoc edits versus plan-and-execute workflows and mandates parallelization for very large batches.
  • Execution patterns: Recommends tool-first approaches, simple shell iteration, find-based searches, and dividing work for sub-agent parallel runs.
  • Safety practices: Emphasizes dry-run planning, atomic temporary-file swap updates to avoid intermediate states, and clear success/failure reporting.
  • Failure handling: Stop-on-first-error for single-file failures and explicit partial-success reporting with file lists.
  • Use case: Apply consistent refactors, mass search-and-replace, or repetitive file transformations across many project files while preserving recoverability.

Quick Start

Perform a dry-run replacement across the target files, review the results for idempotency and correctness, then execute atomic batch updates in groups of ten.

Frequently Asked Questions about batch-editing

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

FAQPage Schema
How do I safely bulk-edit many files at scale without partial failures?

To safely bulk-edit many files at scale, use a workflow that performs dry-run planning and atomic temporary-file swaps. This ensures updates are idempotent, verifiable, and prevents intermediate states during mass search-and-replace operations.

What is the best way to refactor repetitive code across multiple project files?

The best way to refactor repetitive code across multiple files is applying rule-based replacements with idempotency checks. This method guarantees deterministic, repeatable file transformations while preserving recoverability through atomic batch updates.

When do I need to parallelize batch file processing tasks?

You need to parallelize batch file processing tasks when editing more than ten files. For these larger batches, dividing work into sub-agent parallel runs ensures efficient execution compared to simple shell iteration or ad-hoc edits.

How does atomic file swapping prevent data corruption during bulk edits?

Atomic file swapping prevents data corruption by writing changes to a temporary file first, then swapping it with the target file only upon success. This avoids partial states and ensures clear success or failure reporting for every file.

How do I handle partial failures when applying mass search-and-replace operations?

To handle partial failures during mass search-and-replace, use stop-on-first-error for single-file failures and explicit partial-success reporting. This provides clear file lists of completed and failed updates to maintain workflow recoverability.