1---2name: batched-bash3description: Batched bash4---56# Batched bash781. **The project's own verbs beat hand-rolled pipelines.** If the environment9 note or repo shows a Justfile, Makefile, Taskfile, or package.json10 scripts, use those (`just build`, `make test`, `bun run check`): they11 encode the flags and env the project actually uses. Hand-roll only what12 the project has not named.132. **One call per goal, not per command.** Each tool round costs a full model14 round-trip; the commands themselves are nearly free. Write15 `bash -lc "mkdir -p public && mv dashboard.html public/index.html && ls public"`.16 Never three separate calls for mkdir, mv, ls.173. **Label the stages** so the output reads like a report and a failure names18 its stage:19 `echo "=== install ===" && bun install 2>&1 | tail -2 && echo "=== typecheck ===" && bunx tsc --noEmit 2>&1 | head -20`204. **Make pipelines self-verifying.** Append the check to the action:21 `grep -q "export default" index.ts && echo OK || echo MISSING`.225. **Bound every noisy step** inside the chain: `| head -20`, `| tail -5`,23 `--stat`, `-n 5`. The context you save is your own.246. **Batch independent probes with separators:**25 `ls src; echo ---; ls tests; echo ---; head -5 Cargo.toml`.267. **Repo content lookups do not go through the shell.** `search_files` and27 `find_files` already run ripgrep without the overhead; never shell out to28 `rg`, `grep -r`, `find`, or `fd` for repository files.