Skip to content
Back to skills

Batch Run

ASecurity

Use when an investigation needs several read-only shell commands (git/gh status, log triage, listing, grepping, CI or container checks) or output that would be long or noisy. Runs them in one Bash call, in parallel, and returns a compact trimmed summary. Emulates Claude Code's Code Mode token saving for shell work.

  • 24 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 4, 2026
ai-agentspythonshellbashdockergitapi

Works with

  • claude code
  • api
  • mcp

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 4, 2026

npx -y skills add modem7/claude-config-sync --skill batch-run --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Batch Run?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Batch Run
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modem7-batch-run/badge)](https://www.skillsdirectory.com/skills/modem7-batch-run)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: batch-run
description: Use when an investigation needs several read-only shell commands (git/gh status, log triage, listing, grepping, CI or container checks) or output that would be long or noisy. Runs them in one Bash call, in parallel, and returns a compact trimmed summary. Emulates Claude Code's Code Mode token saving for shell work.
---

# Batch run

One Bash call instead of many, and only the useful part of the output reaches context. Use it for read-only shell investigation. It does not replace Read, Edit, MCP tools or subagents.

## When to use

- Two or more independent read-only commands whose results you need together (repo state checks, `gh pr list` plus `git log`, several `docker`/`systemctl` status calls).
- A command whose raw output is long or noisy (CI logs, `docker logs`, big JSON from an API). Trim it before it enters context.

Skip it for a single short command, for anything that edits or deletes, and when a dedicated tool (Read, Grep, Glob) does the job.

## How

```bash
python3 ~/.agents/skills/batch-run/batch.py [options] -- 'git status -sb' -- 'git log --oneline -5' -- 'gh pr list --state all --limit 5'
```

Or put one command per line in a file (a line may be `label=>command`) and pass `-f FILE`; use the scratchpad for the file.

| Option | Default | Effect |
|---|---|---|
| `--max-lines N` | 20 | Lines kept per command |
| `--max-chars N` | 2000 | Characters kept per command |
| `--tail` | off | Keep the last lines instead of the first (logs) |
| `--json-keys` | off | For JSON output, show keys and sizes instead of the body |
| `--timeout S` | 60 | Per-command limit |
| `--jobs N` | 8 | Parallel commands |
| `--cwd DIR` | current | Working directory |

Each command prints a header `== [i] label (exit N, secs) ==` followed by its trimmed output, in the order given. The script always exits 0 unless the usage is wrong, so read failures from the headers. A command that hits `--timeout` shows `TIMEOUT` in its header instead of an exit code.

## Tips

- Filter in the command itself when you know what you want (`| grep -E 'ERROR|FAIL'`, `jq '.items[].name'`); the script trims whatever is left.
- Start narrow. If a header shows `... N more lines omitted` and you need them, re-run only that command with a larger `--max-lines` or a better filter.
- Do not put secrets on the command line.

## Safety

The script refuses commands that look like they change things (`rm`, `mv`, `sudo`, `git push|commit|reset`, `gh ... create|merge|close`, `sed -i`, file redirects, and similar) and runs nothing in that case. That is a guard against accidents, not a sandbox, and it does not replace the permission rules and hooks that apply to each separate tool call. Do not use `--allow-write` unless the user has approved the specific commands.

Files in this skill

  • SKILL.md2.7 KB
  • batch.py25.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.