agentsclimarketplace

Go cli

Skill nyquistwilder/personal-pi/skills/go-cli

My personal pi harness configuration.

Install
npx -y skills add nyquistwilder/personal-pi --skill go-cli

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Greenfield Go CLI workflow for command shape, flags, environment integration, stdin/stdout/stderr discipline, exit codes, shell-friendly UX, Cobra or stdlib flag choices, and CLI tests.

SKILL.md

2.2 KB, as published. Nobody here has run it

Go CLI

Rule

Build CLIs that are predictable for humans and scripts. Keep parsing and process exit at the edge; put core behavior in testable packages.

Hard Stops

Ask before:

  • Adding Cobra, changing public flags/subcommands, changing output formats, or changing exit codes.
  • Performing destructive filesystem/network/database actions.
  • Reading secrets, writing shell completions into user directories, or modifying global config.
  • Introducing interactive prompts for automation-oriented commands.

Defaults

  • Use stdlib flag for simple single-command tools.
  • Use spf13/cobra only for public multi-command CLIs, nested help, completions, or long-term command growth.
  • Keep main tiny: call run(ctx, args, stdin, stdout, stderr) int or equivalent.
  • Write requested machine-readable output to stdout; diagnostics and progress to stderr.
  • Use stable, documented exit codes: 0 success, 1 generic failure, 2 usage error unless the project defines more.
  • Make environment variables explicit and documented.

Testing

Test command behavior without os.Exit in tests. Pass explicit args and buffers. Use real subprocess tests only for installed binary behavior, signals, or shell integration. Assert stdout, stderr, exit code, config/env precedence, and side effects.

Workflow

  1. Define command contract: name, args, flags, env vars, stdin/stdout/stderr, exit codes.
  2. Choose stdlib flag or Cobra based on real complexity.
  3. Keep business logic out of command parsing.
  4. Add tests for success, usage errors, failure paths, and output stability.
  5. Run targeted tests, go test ./..., go vet, lint, and just check.

Antipatterns

  • Calling os.Exit deep in business logic.
  • Logging to stdout or printing requested data to stderr.
  • Hidden env vars, machine-local config defaults, or prompts in scripts.
  • Cobra for a one-flag internal tool.

Completion

Report command contract, dependency choice, flags/env vars, exit codes, tests, and validation results.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.