agentleFS
goca-segoca-se/dotcontext/.claude/skills/batch-operations/SKILL.md

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
  1. Distinctive:

    Search for all files that match the change (imports, usages, references)

    line 25
  2. Very specific:

    Do not skip this step: If the scope is unclear, use the Agent tool with subagent_type=Explore to map the codebase first.

    line 30
  3. Distinctive:

    Run targeted tests for the affected files

    line 38
  4. Distinctive:

    If a batch fails: Stop. Fix the issue in that batch before continuing.

    line 41
  5. Distinctive:

    After all batches are complete:

    line 45
  6. Distinctive:

    Run git diff --stat to review the scope of changes

    line 47
  7. Distinctive:

    Run the full test suite

    line 48
  8. Distinctive:

    Run type checking / linting if available

    line 49
  9. Distinctive:

    Remove any dead code left behind by the migration

    line 54
  10. Distinctive:

    Check for unused imports

    line 55
  11. Very specific:

    Verify no files were missed (grep for the old pattern)

    line 56

“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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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.

  1. Search for all files that match the change (imports, usages, references)
  2. List them grouped by directory
  3. Note edge cases (re-exports, dynamic imports, config files, tests)
  4. 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.

  1. Pick a batch (one directory or a logical group of ~5-10 files)
  2. Make the changes in that batch
  3. Run targeted tests for the affected files
  4. 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:

  1. Run git diff --stat to review the scope of changes
  2. Run the full test suite
  3. Run type checking / linting if available
  4. 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 (grep for 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 mv for 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"

Download now (ZIP)

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. vudovn/ag-kit★ 8.2ksame name
    2. vudovn/antigravity-kit★ 8.2ksame name
    3. 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.

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.