Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Execute and supervise external programs safely from Go CLIs with explicit arguments, typed failure classification, working directories, environments, bounded streams, deadlock-safe pipes, contexts, timeouts, signals, platform adapters, descendant cleanup, runner seams, and lifecycle tests. Use when wrapping a command, diagnosing start or exit failures, hangs, deadlocks, or orphan processes, or implementing cancellable cross-platform CLI workflows.
.claude/skills/hashgraph-online-go-cli-process-control/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 22% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 20% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 3% | 0% |
| case-26 | ✓→✗ | ▼ Worse | 44% | 0% |
| case-23 | ✓→✓ | = Same ✓ | 7% | 0% |
Treat child-process lifecycle as correctness. Observe the terminal result, propagate cancellation, and clean up every process, pipe, and temporary resource.
| Task | Load | |---|---| | Implement or repair process supervision | guidelines.md, workflows/supervise-external-command.md | | Apply modern execution and cancellation rules | references/process-control/rules.md | | Use runner, pipeline, signal, or cleanup patterns | references/process-control/patterns.md | | Start from focused code examples | references/process-control/examples.md | | Review a subprocess boundary | references/process-control/checklist.md | | Understand lifecycle and shell semantics | references/process-control/knowledge.md |
exec.Command invokes a shell.Start as success; inspect the terminal result.Cmd.String() as diagnostic text, never shell-safe replay or secret-safe output.Guidance is transformed and paraphrased from Ricardo Gerardi, Powerful Command-Line Applications in Go (Pragmatic Bookshelf, 2021), especially Chapter 6. Examples are original adaptations.
Book: https://pragprog.com/titles/rggo/powerful-command-line-applications-in-go/
Verify current behavior against https://pkg.go.dev/os/exec and https://pkg.go.dev/os/signal, including Cmd.Cancel, WaitDelay, and signal.NotifyContext.
Failure taxonomy, pipe ordering, and platform-adapter guidance also incorporates transformed material from Marian Montagnino, Building Modern CLI Applications in Go (Packt, 2023), especially Chapter 6.
In-process cancellation boundary guidance also incorporates transformed material from Inanc Gumus, Go by Example: Programmer's Guide to Idiomatic and Testable Programs (Manning, 2025), Chapters 6-7.
Other measured skills in the registry, with their headline benchmark lift.