go-cli-builder
Skill0 starsChanged 6 months agoMITView on GitHub
Use when building a Go CLI tool as a releasable command binary.
- Reads credentials
1 other project uses a version of this.
Adopted by
Most recently taken up by
- dedene/skillstheir own version, first seen Sep 15, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- dedene/skills★ 14same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repositoryOne other file it gives its agents.
- frontend-builderSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 3 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Use this skill when building a Go CLI tool as a releasable command binary.
- Very specific: line 13
Put the CLI entrypoint at the repository root as main.go.
- Very specific: line 14
Keep main.go thin: configure process-wide logging, call the command package, translate known command errors to exit codes, log unexpected …
- Very specific: line 15
Put command behavior outside main.go, typically under packages such as internal.
- Distinctive: line 16
Prefer standard Go project conventions before adding framework-specific structure.
- Distinctive: line 17
Write tests for pure-function parts.
- Very specific: line 18
Use aqua as the package manager.
- Very specific: line 22
Run go test ./... after every code change.
- Very specific: line 23
Run golangci-lint run ./...
- Very specific: line 77
Create .github/workflows/release.yaml and run GoReleaser when a version tag is pushed.
- Very specific: line 78
After creating the workflow, run pinact run --update -min-age 3 to update to current packages.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Go CLI Builder
Use this skill when building a Go CLI tool as a releasable command binary.
Project Shape
- Put the CLI entrypoint at the repository root as
main.go. - Keep
main.gothin: configure process-wide logging, call the command package, translate known command errors to exit codes, log unexpected errors, and exit. - Put command behavior outside
main.go, typically under packages such asinternal. - Prefer standard Go project conventions before adding framework-specific structure.
- Write tests for pure-function parts.
- Use
aquaas the package manager. Initialize it withaqua init, runaqua g -i suzuki-shunsuke/pinact golangci/golangci-lint, then runaqua i.
Test/Lint
- Run
go test ./...after every code change. - Run
golangci-lint run ./...andgolangci-lint fmt ./...after every code change.
Version Information
Embed the release version through the package-level Version variable in main.go. Refer to this implementation:
var Version string
func getVersion() string {
if Version != "" {
return Version
}
if info, ok := debug.ReadBuildInfo(); ok {
if info.Main.Version != "(devel)" {
return info.Main.Version
}
if v, ok := getVCSBuildVersion(info); ok {
return v
}
}
return "(unset)"
}
func getVCSBuildVersion(info *debug.BuildInfo) (string, bool) {
var (
revision string
dirty string
)
for _, v := range info.Settings {
switch v.Key {
case "vcs.revision":
revision = v.Value
case "vcs.modified":
if v.Value == "true" {
dirty = " (dirty)"
}
}
}
if revision == "" {
return "", false
}
return revision + dirty, true
}Release
Create .github/workflows/release.yaml and run GoReleaser when a version tag is pushed.
After creating the workflow, run pinact run --update -min-age 3 to update to current packages.
name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version-file: go.mod
cache: true
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
with:
distribution: goreleaser
version: '~> v2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

