batch-operations
Skill9 starsChanged 4 months agoMITView on GitHub
Apply a change safely across many files — refactors touching more than 5 files, library or API migrations, project-wide renames of symbols/imports/paths, or adding boilerplate to many files. Use when "do it all at once" risks context overflow or silent failures.
We split this skill into the rules it gives an agent
11 rules. 0 are common, 9 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
9
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Search for all files that match the change (imports, usages, references)
- Very specific: line 30
Do not skip this step: If the scope is unclear, use the Agent tool with subagent_type=Explore to map the codebase first.
- Distinctive: line 38
Run targeted tests for the affected files
- Distinctive: line 41
If a batch fails: Stop. Fix the issue in that batch before continuing.
- Distinctive: line 45
After all batches are complete:
- Distinctive: line 47
Run git diff --stat to review the scope of changes
- Distinctive: line 48
Run the full test suite
- Distinctive: line 49
Run type checking / linting if available
- Distinctive: line 54
Remove any dead code left behind by the migration
- Distinctive: line 55
Check for unused imports
- Very specific: line 56
Verify no files were missed (grep for the old pattern)
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: Batch Operations
When to Use
- Refactoring that touches more than 5 files
- Library or API migrations across the codebase
- Renaming symbols, imports, or paths project-wide
- Adding boilerplate or patterns to many files
- Any change where "do it all at once" risks context overflow or silent failures
Workflow
Step 1: Scope — Plan Before Touching Anything
Identify every file affected. Map old → new without making changes.
- Search for all files that match the change (imports, usages, references)
- List them grouped by directory
- Note edge cases (re-exports, dynamic imports, config files, tests)
- Present the plan to the user before proceeding
Do not skip this step. If the scope is unclear, use the Agent tool with subagent_type=Explore to map the codebase first.
Step 2: Batch — Execute in Directory Groups
Process changes in small batches, grouped by directory or module.
- Pick a batch (one directory or a logical group of ~5-10 files)
- Make the changes in that batch
- Run targeted tests for the affected files
- Confirm tests pass before moving to the next batch
If a batch fails: Stop. Fix the issue in that batch before continuing. Do not proceed with broken state.
Step 3: Verify — Confirm the Full Change
After all batches are complete:
- Run
git diff --statto review the scope of changes - Run the full test suite
- Run type checking / linting if available
- Present the results to the user
Step 4: Clean Up
- Remove any dead code left behind by the migration
- Check for unused imports
- Verify no files were missed (
grepfor the old pattern)
Parallel Processing with Subagents
For large migrations (20+ files), delegate each directory batch to a subagent:
- Each subagent gets one directory to process
- Subagents run tests for their batch independently
- Results are collected and verified together
This prevents context window saturation and speeds up execution.
Constraints
- Never modify files outside the stated scope without asking
- Never skip the planning step — list affected files first
- Always test between batches — do not batch all changes then test once at the end
- Preserve git history — use
git mvfor file renames so history follows
Anti-Patterns to Avoid
- Making all changes in one pass without testing between batches
- Reading every file in the project before starting
- Fixing unrelated issues discovered during the migration
- Skipping the verification step because "it should work"
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- vudovn/ag-kit★ 8.2ksame name
- vudovn/antigravity-kit★ 8.2ksame name
- soumatheusgomes/agentville★ 9same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- templates/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- templates/CLAUDE.mdCLAUDE.md
- add-cli-subcommandSkill
- add-new-commandSkill
- bug-reproductionSkill
- git-platformSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

