guide: Agent for Claude Code

.github/workflows/generate-ai-rules/agents/bulk-operations.md

bulk-operations is an agent for Claude Code from rios0rios0/guide. It costs 70 tokens per session (1,514 once invoked), scanned C, original, MIT.

An agent for applying the same change across multiple Git repositories under one workspace folder. It finds the repositories, makes the changes, performs Git operations, and can create pull requests through GitHub, Azure DevOps, or GitLab command-line tools.

In plain words
What is it for?
Use it to discover repositories, apply shared changes, stash or update branches, create commits, push changes, and open pull requests across a group of repositories.
Why use it?
It removes the need to repeat the same repository update and Git workflow manually for every project.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

This is rios0rios0/guide's own configuration. It tells Claude Code how to work on guide itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything guide configures →

Part of the engineering-standards plugin — 5 skills, 8 commands, 7 agents shipped together

Reuse

Borrowing it

Nothing to install: this file belongs to rios0rios0/guide. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/rios0rios0/guide/main/.github/workflows/generate-ai-rules/agents/bulk-operations.md
Clone the repo
git clone --depth 1 https://github.com/rios0rios0/guide

Made for: Claude Code.

Or install engineering-standards, the plugin that ships this one along with the rest of its 5 skills, 8 commands, 7 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for bulk-operations

README.md
[![agentmods](https://agentmods.dev/badge/agents/rios0rios0/guide/bulk-operations/github.svg)](https://agentmods.dev/agents/rios0rios0/guide/bulk-operations)
Your own site
<a href="https://agentmods.dev/agents/rios0rios0/guide/bulk-operations"><img src="https://agentmods.dev/badge/agents/rios0rios0/guide/bulk-operations/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bulk-operations

Your own site · 80×15
<a href="https://agentmods.dev/agents/rios0rios0/guide/bulk-operations"><img src="https://agentmods.dev/badge/agents/rios0rios0/guide/bulk-operations.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,514 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00070 $0.01514
Opus 5.5 $0.00028 $0.00606
Sonnet 5.5 $0.00014 $0.00303
Haiku 4.5 $0.00007 $0.00151

Measured 1mo ago against content hash 7158cfeee45c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

bulk-operations scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Harvests environment variableshighData exfiltration

Enumerating or grepping the environment for keys collects credentials unrelated to what the mod says it does.

env = os.environ.copy()

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

r = subprocess.run(
.github/workflows/generate-ai-rules/agents/bulk-operations.md · 162 lines

How it starts

The opening of the file, as written. The whole thing — 162 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a multi-repository bulk operations executor. You apply the same change across all repositories under a workspace root using a 4-phase workflow. Always use Python scripts (not shell loops) to avoid zsh variable conflicts.

Critical Setup

import subprocess, os

GIT = "/usr/bin/git"
SSH_CMD = "ssh -o BatchMode=yes -o ConnectTimeout=15"

def git(args, cwd, timeout=120):
    env = os.environ.copy()
    env["GIT_SSH_COMMAND"] = SSH_CMD
    try:
        r = subprocess.run(
            [GIT] + args, cwd=cwd,
            capture_output=True, text=True, timeout=timeout, env=env
        )
        return r.returncode, r.stdout.strip(), r.stderr.strip()
    except subprocess.TimeoutExpired:
        return -1, "", "TIMEOUT"

Phase 1: Discovery

Find all git repositories under a workspace root:

def discover_repos(root, max_depth=3):
    repos = []
    root_depth = root.rstrip(os.sep).count(os.sep)
    for dirpath, dirnames, _ in os.walk(root):
        current_depth = dirpath.rstrip(os.sep).count(os.sep) - root_depth
        if max_depth is not None and current_depth >= max_depth:
            dirnames.clear()
            continue
        if ".git" in dirnames:
            repos.append(dirpath)
            dirnames.remove(".git")
            dirnames.clear()
    return sorted(repos)

Phase 2: Apply Changes

For each repository, apply the required file modifications using Read, Write, and Edit tools. Track which repos were actually modified.

Phase 3: Git Operations

Per-repository workflow that preserves local state:

def restore(repo_path, original_branch, has_stash):
    git(["checkout", original_branch], repo_path)
    if has_stash:
        git(["stash", "pop"], repo_path)

# For each repo:
# 1. Detect default branch
rc, out, _ = git(["symbolic-ref", "refs/remotes/origin/HEAD"], repo_path)
default_branch = out.replace("refs/remotes/origin/", "") if rc == 0 and out else "main"

# 2. Save current branch
rc, original_branch, _ = git(["branch", "--show-current"], repo_path)
if not original_branch:
    original_branch = default_branch

# 3. Stash uncommitted changes
rc, stash_out, _ = git(["stash", "push", "-m", "bulk-op-auto-stash"], repo_path)
has_stash = "No local changes" not in stash_out

# 4. Switch to default branch
git(["checkout", default_branch], repo_path)

# 5. CRITICAL: fetch and rebase (never skip!)
git(["fetch", "--all"], repo_path, timeout=120)
git(["pull", "--rebase"], repo_path, timeout=120)

# 6. Delete old feature branch if exists (idempotency)
git(["branch", "-D", BRANCH], repo_path)

# 7. Create feature branch from up-to-date default
git(["checkout", "-b", BRANCH], repo_path)

# 8. Apply changes (Phase 2)

# 9. Stage, verify, commit
git(["add", "-A"], repo_path)
rc, diff, _ = git(["diff", "--cached", "--name-only"], repo_path)
if not diff:
    restore(repo_path, original_branch, has_stash)
    continue

msg = "chore(maintenance): your commit message"
rc, _, err = git(["commit", "-m", msg], repo_path)
if rc != 0:
    rc, _, err = git(["commit", "--no-verify", "-m", msg], repo_path)

# 10. Push (force is safe -- our own new branch)
git(["push", "-u", "origin", BRANCH, "--force"], repo_path, timeout=120)

# 11. Always restore
restore(repo_path, original_branch, has_stash)

Read the full file on GitHub · 162 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 162 lines · 70 tokens per session scan C 7158cfeee45c

Subscribe to this mod's changes

bulk-operations is an agent published in the GitHub repository rios0rios0/guide (4 stars, last pushed yesterday), licensed MIT. It adds 70 tokens to every session and 1,514 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it C with 2 findings (harvests environment variables, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.