/major-ai-skills:single-command-script-chainingfrom major-ai-skills
Group dependent command-line operations when the shell's failure and sequencing behavior is explicit.
Ships in major-ai-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
When setting up a project or verifying a feature, naive agents execute each shell step across separate, sequential conversation turns:
run_command("mkdir -p src/components")run_command("touch src/components/Modal.tsx")run_command("npm install lucide-react")run_command("npm test")Executing 4 separate commands requires 4 complete API roundtrips, re-sends the conversation transcript 4 times, and takes 20+ seconds of interactive latency.
The Single-Command CLI Chaining Protocol combines dependent commands into a single, atomic shell pipeline using Logical Short-Circuit Operators (&&, |), completing the entire sequence in 1 turn.
┌─────────────────────────────────────────────────────────────┐
│ Command Execution Trajectory │
│ │
│ Sequential Shell Invocations (4 Turns / 12,800 Tokens): │
│ • Turn 1: `mkdir` ──► 1 API Roundtrip (3.2s) │
│ • Turn 2: `touch` ──► 1 API Roundtrip (3.1s) │
│ • Turn 3: `npm install` ──► 1 API Roundtrip (4.5s) │
│ • Turn 4: `npm test` ──► 1 API Roundtrip (3.8s) │
│ ↳ 4 Turns, 14.6s total latency, 12,800 tokens billed │
│ │
│ Compound Chained Execution (1 Turn / 1,400 Tokens): │
│ • Turn 1: `mkdir -p ... && npm i ... && npm test` │
│ ↳ 1 Turn, 3.8s total latency (3.8x Faster, 89% Token Cut!) │
└─────────────────────────────────────────────────────────────┘
| Operator | Logical Behavior | When to Use | Example Syntax |
|---|---|---|---|
&& | AND (Short-Circuit on Error) | Dependent build pipelines; aborts if step 1 fails. | npm run build && npm test |
|| | OR (Fallback on Error) | Fallback commands when primary tool is missing. | ruff check . || flake8 . |
; | Sequential (Always Run) | Running non-fatal cleanup after execution. | npm test; rm -rf scratch/ |
| | Pipe (Stdout $\rightarrow$ Stdin) | Direct stream processing without disk tempfiles. | git log -n 5 | grep "feat" |
# Build, migrate, and run isolated test suite in 1 turn
npx prisma generate && npx prisma migrate deploy && npm test tests/auth.test.ts
PowerShell 7+ supports standard && and ||. For universal compatibility across legacy PowerShell 5.1:
# Universal PowerShell compound command
npm run build; if ($LASTEXITCODE -eq 0) { npm test }
When concluding an autonomous code edit, chain typecheck, lint, and test into a single verification turn:
{
"CommandLine": "npx tsc --noEmit && npx ruff check src/ && npm test -- --runInBand",
"Cwd": "c:/Users/ASUS/Documents/Newfolder/Antigravity/Major AI Skills",
"WaitMsBeforeAsync": 10000,
"toolAction": "Running compound typecheck, lint, and unit test verification",
"toolSummary": "Compound Test Verification"
}
Executing a standard 4-step project build and test pipeline:
| Metric | Sequential Single-Command Invocations | Compound Single-Command Chaining | Improvement |
|---|---|---|---|
| Agent Turns Required | 4 turns | 1 turn | 75% Fewer Turns |
| Cumulative Context Tokens | 14,200 tokens | 1,850 tokens | 87.0% Token Savings |
| Pipeline Latency | 18.5 seconds | 4.2 seconds | 4.4x Faster Velocity |
MANDATORY: Agents must chain dependent terminal commands using logical short-circuit operators (
&&,|). Never execute multi-step setup or verification sequences across separate conversational turns.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub alivirgo/major-ai-skills --plugin major-ai-skills412 skills in this plugin
/3d-slicerAutomate 3D Slicer research workflows with MRML, VTK/ITK, DICOM data, and Segment Editor. Use for software workflows, not clinical interpretation./abbreviated-git-statusInspect Git branch, staging, and working-tree changes with short or porcelain status output when a compact repository check is needed./ableton-liveAutomate Ableton Live sessions with Python MIDI Remote Scripts, Max for Live, AbletonOSC, and Link synchronization./act-as-a-personal-tutorExplain a subject step by step, assess prior knowledge, and use short exercises to check understanding before advancing./add-your-own-human-voiceRevise AI-assisted writing to preserve the author's voice, concrete experience, and intended tone./adobe-after-effectsScaffold After Effects comps and expression rigs, queue Render Queue / AME jobs, and export Essential Graphics (.mogrt) with ExtendScript-safe patterns.