AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

open-sourcing

This skill should be used when the user asks to "open source this project", "prepare this repository for public release", "make this repo public", "check open-source readiness", "choose a license for this project", or "set up release automation" ahead of a public launch. Provides a release-readiness workflow covering secrets hygiene, licensing, documentation, CI, and language-specific packaging.

Original source
trailofbits
License
CC-BY-SA-4.0
Pinned revision
2be6433b39e009cd2b6fd3be1895f6b1faa5af9a

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

This skill also requires local files or dependencies. Remote reading alone may not be enough.

Ask your assistant

Use Agentic Memory skills to read trailofbits--open-sourcing at revision 2be6433b39e009cd2b6fd3be1895f6b1faa5af9a, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 9

references/go.md

Go Release Practices

Use the standard go toolchain for everything.

Module setup

  • Initialize with the canonical repository path: go mod init github.com/<org>/<project>. The module path is the import path, so set it correctly before anyone depends on the project.
  • Set the go directive in go.mod to the latest stable release for greenfield code.

Project layout

  • cmd/<appname>/main.go for each binary entry point.
  • internal/ for packages that must not be imported by other modules — use it liberally; exporting a package is an API commitment.
  • Do not create a pkg/ directory reflexively; the official module layout guidance recommends putting importable packages at the repository root unless there is a concrete conflict.
  • Keep packages focused on a single responsibility, handle every error, and reserve panic for unrecoverable states. Follow Effective Go and the Go style guide.

Testing, formatting, and linting

  • go test ./... in CI, with -race enabled — the race detector is cheap insurance for any code with goroutines.
  • gofmt (or go fmt) before committing; enforce in CI.
  • golangci-lint with a committed configuration.
  • govulncheck in CI to flag known-vulnerable dependencies actually reachable from the code.

Documentation

Write doc comments for every exported identifier — complete sentences beginning with the identifier name. pkg.go.dev renders them automatically once the module is public and tagged.

Publishing and releases

  • There is no central upload step: pushing a semver tag (vX.Y.Z) to the public repository is publishing. The module proxy and pkg.go.dev pick it up automatically. See developing modules.
  • Because tags are immutable once fetched through the module proxy, never retag; publish a new patch version instead.
  • For binaries, use goreleaser to build multi-platform artifacts, generate release notes from commits, and attach everything to the GitHub Release on each tag. Consider GitHub artifact attestations for provenance on released binaries.