Skip to content
Agentmart
Submit a tool

go-process-cli

Write Go CLIs that manage processes and workloads — daemons, supervisors, job runners, deploy tools, anything that spawns or controls other processes.

Skill by pproenca

IndexedMIT★ 218
Write a review

Chalk Labs

Need help deploying go-process-cli?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/pproenca-go-process-cli

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Write Go CLIs that manage processes and workloads — daemons, supervisors, job runners, deploy tools, anything that spawns or controls other processes. Use when writing, reviewing, or refactoring Go that handles OS signals, runs children via os/exec, fans out concurrent work, threads context for cancellation, returns exit codes, or builds a flag/cobra command surface. Covers the footguns the standard library makes easy to hit — SIGTERM vs Ctrl-C, SIGKILL-by-default children, orphaned process groups, pipe deadlocks, goroutine leaks, zombie reaping, and os.FindProcess lying about liveness. Triggers whenever the task touches process lifecycle, graceful shutdown, subprocess control, or concurrent workload supervision in Go — even if not named.

Use cases: devops, writing, productivity

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/go-process-cli

What's inside

Skill name
go-process-cli
Description
Write Go CLIs that manage processes and workloads — daemons, supervisors, job runners, deploy tools, anything that spawns or controls other processes. Use when writing, reviewing, or refactoring Go that handles OS signals, runs children via os/exec, fans out concurrent work, threads context for cancellation, returns exit codes, or builds a flag/cobra command surface. Covers the footguns the standard library makes easy to hit — SIGTERM vs Ctrl-C, SIGKILL-by-default children, orphaned process groups, pipe deadlocks, goroutine leaks, zombie reaping, and os.FindProcess lying about liveness. Triggers whenever the task touches process lifecycle, graceful shutdown, subprocess control, or concurrent workload supervision in Go — even if not named.
License
MIT
Instructions
55 lines in SKILL.md · view on GitHub

Files (29)

  • AGENTS.md
  • SKILL.md
  • _template.md · assets/templates/
  • metadata.json
  • _sections.md · references/
  • cli-execute-context-wires-signals.md · references/
  • cli-flag-vs-cobra-by-shape.md · references/
  • cli-rune-return-errors.md · references/
  • cli-stdlib-subcommand-pattern.md · references/
  • ctx-cancellable-wait.md · references/
  • ctx-defer-cancel.md · references/
  • ctx-explicit-argument.md · references/
  • err-join-aggregate-workloads.md · references/
  • err-run-function-for-deferred-cleanup.md · references/
  • exec-cancel-sigterm-before-kill.md · references/
  • exec-commandcontext-binds-lifetime.md · references/
  • exec-exit-code-from-exiterror.md · references/
  • exec-kill-process-group.md · references/
  • exec-pipes-without-deadlock.md · references/
  • sig-notify-context-for-shutdown.md · references/
  • sig-second-signal-force-quit.md · references/
  • state-atomic-pidfile.md · references/
  • state-reap-children-wait.md · references/
  • state-signal-zero-liveness.md · references/
  • state-structured-slog-transitions.md · references/
  • work-bound-concurrency.md · references/
  • work-errgroup-fan-out.md · references/
  • work-every-goroutine-has-exit.md · references/
  • work-sender-closes-channel.md · references/

SKILL.md (first lines)

# Go Process-Management CLIs

> Make Go command-line tools that spawn, supervise, and shut down processes correctly — the part the stdlib makes easy to get subtly wrong.

## When to Apply

Reach for this skill when building or reviewing a Go CLI whose job is to *control other processes or concurrent workloads*: a daemon, a process supervisor, a job/worker runner, a deploy or migration tool, a test harness that shells out, or any program that must stop cleanly when an orchestrator says so. It targets **Go 1.22+** on **Unix-like systems** (Linux, macOS); a few rules note where Windows differs. It assumes you already know Go — it only corrects the specific defaults that go wrong in this domain.

## Categories

| # | Category | Prefix | What it covers |
|---|----------|--------|----------------|
| 1 | Signals & Graceful Shutdown | `sig` | Binding a context to SIGINT/SIGTERM; second-signal force-quit |
| 2 | Child Processes | `exec` | `os/exec` lifetime, graceful kill, process groups, pipes, exit codes |
| 3 | Concurrency & Workloads | `work` | errgroup fan-out, bounded concurrency, goroutine-leak discipline, channel ownership |
| 4 | Context Propagation | `ctx` | Explicit context args, `defer cancel()`, cancellable waits |
| 5 | Errors & Exit Codes | `err` | `run() error` for deferred cleanup, aggregating failures |
| 6 | CLI Framework & Flags | `cli` | stdlib `flag` vs cobra, `ExecuteContext`, `RunE`, subcommand patterns |
| 7 | Process State & Supervision | `state` | Liveness probes, atomic PID files, zombie reaping, structured logs |

## Quick Reference

The defaults this skill exists to correct:

- **`signal.NotifyContext(ctx, SIGINT, SIGTERM)`** — not a channel that only watches Ctrl-C. Orchestrators send SIGTERM.
- **`exec.CommandContext` + `cmd.Cancel`/`cmd.WaitDelay`** — plain `CommandContext` SIGKILLs children with no cleanup.
- **`Setpgid` + `kill(-pgid)`** — signalling the direct child orphans grandchildren (`sh -c`, `make`, `npm`).
- **`cmd.Output()`** for capture — reading a pipe after `Wait()` deadlocks.
- **`errgroup.WithContext` + `SetLimit(n)`** — a goroutine per task means a *process* per task: PID/FD exhaustion.
- **`ctx` as an argument** — never a struct field; **`defer cancel()`** on every derived context.
- **`select { case <-ticker.C: case <-ctx.Done(): }`** — `time.Sleep` makes shutdown wait out the interval.
- **`main → run() error → os.Exit(1)`** — `log.Fatal`/`os.Exit` deep in code skip every `defer`.
- **`proc.Signal(syscall.Signal(0))`** — `os.FindProcess` always succeeds on Unix; it never proves liveness.
- **`os.OpenFile(O_CREATE|O_EXCL)`** for PID files — check-then-create is a race; **`cmd.Wait()`** every child or it zombifies.

## How to Use

1. Identify which category your task falls under (see table above).
2. Read the relevant rule files in `references/` — each is a focused, self-contained pattern naming the wrong default it corrects.
3. Apply the pattern; follow the `Reference` link in each rule for the authoritative source.

Rules cross-link (e.g. graceful shutdown ties signals → context → child-process kill → cleanup), so follow the links when a task spans categories.

When extending this skill, copy `assets/templates/_template.md`: WHY first, one canonical example with realistic names, a foil only if the wrong way is a genuine trap.

## Source Authority

Every rule cites primary sources — the Go standard library reference on pkg.go.dev, the official Go blog (go.dev/blog), and the cobra documentation — chosen because they are maintainer-authored and version-current. No content farms, listicles, or undated tutorials.

## Related Skills

- `radical-simplification` — when a supervisor design has accreted accidental complexity.
- `unix-cli` / `cli-for-agents` — broader CLI ergonomics beyond process management.

From pproenca/dot-skills, MIT.

More from pproenca/dot-skills

Signals

Stars
218
Forks
19
Open issues
3
Last commit (this folder)
May 31, 2026 (5 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from pproenca

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get go-process-cli running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying go-process-cli?

CallGet help
Cite this page

go-process-cli skill. Agent Mart. https://agentmart.dev/skills/pproenca-go-process-cli (last updated 2026-10-24)