Context Handling in fp-go
IBM/fp-go
Covers handling Go's context.Context idiomatically in fp-go code: reading and scoping context through operators, timeouts, cancellation and converting ctx-first functions.
Golang project layouts and workspaces. An agent skill from context-labs/whip.
$ npx skills add context-labs/whip --skill golang-project-layout -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install context-labs/whip golang-project-layout --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/context-labs/whip.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/golang-project-layout .claude/skills/golang-project-layout && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "golang-project-layout" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-project-layout into .claude/skills/golang-project-layout/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-project-layout", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/context-labs/whip/tree/main/.agents/skills/golang-project-layoutType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add context-labs/whip --skill golang-project-layout -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install context-labs/whip golang-project-layout --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/context-labs/whip.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/golang-project-layout .agents/skills/golang-project-layout && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "golang-project-layout" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-project-layout into .agents/skills/golang-project-layout/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-project-layout", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add context-labs/whip --skill golang-project-layout -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install context-labs/whip golang-project-layout --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/context-labs/whip.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/golang-project-layout .cursor/skills/golang-project-layout && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "golang-project-layout" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-project-layout into .cursor/skills/golang-project-layout/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-project-layout", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/context-labs/whip.git --path .agents/skills/golang-project-layout--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add context-labs/whip --skill golang-project-layout -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install context-labs/whip golang-project-layout --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/context-labs/whip.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/golang-project-layout .gemini/skills/golang-project-layout && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "golang-project-layout" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-project-layout into .gemini/skills/golang-project-layout/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-project-layout", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install context-labs/whip golang-project-layoutInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add context-labs/whip --skill golang-project-layout -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/context-labs/whip.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/golang-project-layout .github/skills/golang-project-layout && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "golang-project-layout" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-project-layout into .github/skills/golang-project-layout/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-project-layout", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add context-labs/whip --skill golang-project-layout -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install context-labs/whip golang-project-layout --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/context-labs/whip.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/golang-project-layout .opencode/skills/golang-project-layout && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "golang-project-layout" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-project-layout into .opencode/skills/golang-project-layout/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-project-layout", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
golang-project-layoutGolang project layouts and workspaces. An agent skill from context-labs/whip.
Golang Project Layout is an agent skill from context-labs/whip. Golang project layouts and workspaces. Use when starting a new Go project, organizing an existing codebase, setting up a monorepo, creating CLI tools with multiple main packages, deciding between cmd/internal/pkg conventions, or discussing package restructuring, package splits, or module splits.
Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including reference files and assets (for example `evals/evals.json`, `references/config.md` and `references/directory-layouts.md`). Compatibility notes: Designed for Claude Code, Codex or similar harness, and for projects using Golang.
It sits in Development, covering Monorepo tooling and Design patterns. It works with Go. The repository describes itself as: A fast coding-agent harness in Go. Tool-use loop, bubbletea TUI, provider-routable models with live catalog discovery, MCP support, background subagents. One binary, no runtime… The licence is MIT.
Read from SKILL.md and the folder at commit 8876467. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadEditWriteGlobGrepBash(go:*)Bash(golangci-lint:*)Bash(git:*)AgentAskUserQuestionFrom allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
goFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
12factor.netFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Designed for Claude Code, Codex or similar harness, and for projects using Golang.
From compatibility in the SKILL.md frontmatter.
Golang Project Layout loads about 1.8k tokens when it runs, and up to ~5.2k if it reads all its reference files. Until then it costs about 80 tokens; SKILL.md has 707 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from context-labs/whip at commit 8876467, republished under its MIT licence (© context-labs). 707 words, ~1,772 tokens.
.claude/skills/golang-project-layout/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.Persona: You are a Go project architect. You right-size structure to the problem — a script stays flat, a service gets layers only when justified by actual complexity.
Questions: Ask the user through the environment's question tool — never as plain-text prose. Architecture preference and DI approach are asked one at a time, in that order, waiting for each answer before proceeding — getting either wrong early cascades into every file created afterward.
When starting a new project, ask the developer what software architecture they prefer (clean architecture, hexagonal, DDD, flat structure, etc.). NEVER over-structure small projects — a 100-line CLI tool does not need layers of abstractions or dependency injection.
→ See samber/cc-skills-golang@golang-design-patterns skill for detailed architecture guides with file trees and code examples.
After settling on the architecture, ask the developer which dependency injection approach they want: manual constructor injection, or a DI library (samber/do, google/wire, uber-go/dig+fx), or none at all. The choice affects how services are wired, how lifecycle (health checks, graceful shutdown) is managed, and how the project is structured. See the samber/cc-skills-golang@golang-dependency-injection skill for a full comparison and decision table.
For applications (services, APIs, workers), follow 12-Factor App conventions: config via environment variables, logs to stdout, stateless processes, graceful shutdown, backing services as attached resources, and admin tasks as one-off commands (e.g., cmd/migrate/).
| Project Type | Use When | Key Directories |
|---|---|---|
| CLI Tool | Building a command-line application | cmd/{name}/, internal/, optional pkg/ |
| Library | Creating reusable code for others | pkg/{name}/, internal/ for private code |
| Service | HTTP API, microservice, or web app | cmd/{service}/, internal/, api/, web/ |
| Monorepo | Multiple related packages/modules | go.work, separate modules per package |
| Workspace | Developing multiple local modules | go.work, replace directives |
Your module path in go.mod should:
github.com/username/project-namegithub.com/you/my-app (not MyApp)user-auth not user_auth or userAuthExamples:
// ✅ Good
module github.com/jdoe/payment-processor
module github.com/company/cli-tool
// ❌ Bad
module myproject
module github.com/jdoe/MyProject
module utilsPackages MUST be lowercase, singular, and match their directory name. → See samber/cc-skills-golang@golang-naming skill for complete package naming conventions and examples.
All main packages must reside in cmd/ with minimal logic — parse flags, wire dependencies, call Run(). Business logic belongs in internal/ or pkg/. Use internal/ for non-exported packages, pkg/ only when code is useful to external consumers.
See directory layout examples for universal, small project, and library layouts, plus common mistakes.
Every Go project should include at the root:
samber/cc-skills-golang@golang-lint skill for the recommended configurationFor application configuration with Cobra + Viper, see config reference.
Co-locate _test.go files with the code they test. Use testdata/ for fixtures. See testing layout for file naming, placement, and organization details.
Use go.work when developing multiple related modules in a monorepo. See workspaces for setup, structure, and commands.
When starting a new Go project:
samber/cc-skills-golang@golang-dependency-injection skillgo version to detect the current go versiongo mod init github.com/user/project-namecmd/{name}/main.go for entry pointinternal/ for private codepkg/ only if you have public librariesgo work and add modulesgofmt -s -w . to ensure formatting.gitignore with /vendor/ and binary patternssamber/cc-skills-golang@golang-how-to into the project's agent-config file (CLAUDE.md, AGENTS.md, or equivalent) — no user confirmation needed, see that skill's Configure mode→ See samber/cc-skills-golang@golang-cli skill for CLI tool structure and Cobra/Viper patterns. → See samber/cc-skills-golang@golang-dependency-injection skill for DI approach comparison and wiring. → See samber/cc-skills-golang@golang-lint skill for golangci-lint configuration. → See samber/cc-skills-golang@golang-continuous-integration skill for CI/CD pipeline setup. → See samber/cc-skills-golang@golang-design-patterns skill for architectural patterns. → See samber/cc-skills-golang@golang-refactoring skill for safely moving or splitting existing code into the layout above via type-alias gradual code repair and staged PRs, without a big-bang break. → See samber/cc-skills-golang@golang-how-to skill's Configure mode for the always-load directive and optional ## Required Go skills block written to the project's agent-config file (CLAUDE.md, AGENTS.md, or equivalent).
© context-labs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 7 other files (references, assets) in .agents/skills/golang-project-layout of context-labs/whip.
Open the folder on GitHubat commit 8876467
We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in context-labs/whip, which our catalogue first saw on October 7, 2026.
Golang Project Layout next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Golang Project Layout this skillcontext-labs/whip | 1.1k | 1 repos | ~1.8k | Automated safety check: Pass | MIT | |
| Context Handling in fp-goIBM/fp-go | 2k | — | ~4.2k | Automated safety check: Pass | Apache-2.0 | |
| Typed Dependencies with fp-go EffectIBM/fp-go | 2k | — | ~4.3k | Automated safety check: Pass | Apache-2.0 | |
| fp-go Lenses for Go StructsIBM/fp-go | 2k | — | ~4.3k | Automated safety check: Pass | Apache-2.0 | |
| Golang Dependency Injectionsamber/cc-skills-golang | 3.4k | — | ~3.2k | Automated safety check: Pass | MIT | |
| Ddd Teaching Skillsazardev/goca | 299 | — | ~5.3k | Automated safety check: Pass | MIT |
IBM/fp-go
Covers handling Go's context.Context idiomatically in fp-go code: reading and scoping context through operators, timeouts, cancellation and converting ctx-first functions.
IBM/fp-go
Teaches an agent to write fp-go v2 services with the Effect type, carrying dependencies in its type parameter instead of in context.Context or parameters.
IBM/fp-go
Generates or hand-writes composable lenses for the fp-go library so nested Go structs can be read and updated immutably.
samber/cc-skills-golang
Comprehensive guide for dependency injection (DI) in Golang.
sazardev/goca
Enseña Domain-Driven Design y Clean Architecture de forma guiada usando Goca CLI.
IBM/fp-go
Guides writing or reviewing point-free, first-match-wins case lists in fp-go v2 Go code instead of switch statements and if-else chains.
context-labs/whip
Linting best practices and golangci-lint configuration for Go — running linters, configuring .golangci.yml, nolint suppressions, selecting linters.
context-labs/whip
Golang package/module docs via godig, a pkg.go.dev API client (CLI + MCP) — APIs, symbols, versions, importers, licenses, vulnerabilities.
context-labs/whip
Golang testing with stretchr/testify — assert, require, mock, suite: assertions, mock expectations, argument matchers, suite lifecycle, Eventually, JSONEq.
context-labs/whip
CI/CD with GitHub Actions for Golang — testing, linting, SAST, security scanning, coverage, Dependabot, Renovate, GoReleaser, release pipelines.
context-labs/whip
Golang data structures — slices/maps internals (capacity growth, preallocation, hash buckets), slices/maps packages, container/list/heap/ring, strings.Builder vs bytes.Buffer, generic collections…
context-labs/whip
gRPC usage, protobuf organization, and production patterns for Go microservices.
Works with
Categories
Golang project layouts and workspaces. An agent skill from context-labs/whip. Golang Project Layout is an agent skill from context-labs/whip. Golang project layouts and workspaces.
Golang Project Layout fits situations like: starting a new Go project; organizing an existing codebase; setting up a monorepo; creating CLI tools with multiple main packages.
Run `npx skills add context-labs/whip --skill golang-project-layout -a claude-code`. Or copy the skill folder (.agents/skills/golang-project-layout in context-labs/whip) into .claude/skills/golang-project-layout in your project. Claude Code loads it when a task matches its description.
Run `npx skills add context-labs/whip --skill golang-project-layout -a codex`. Or copy the skill folder (.agents/skills/golang-project-layout in context-labs/whip) into .agents/skills/golang-project-layout in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add context-labs/whip --skill golang-project-layout -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/golang-project-layout, .gemini/skills/golang-project-layout, .github/skills/golang-project-layout and .opencode/skills/golang-project-layout in your project.
Going by SKILL.md and its folder, Golang Project Layout needs the command-line tools its instructions call (go). Its frontmatter pre-approves these tools: Read, Edit, Write, Glob, Grep, Bash(go:*), Bash(golangci-lint:*), Bash(git:*), Agent, AskUserQuestion. Compatibility (from SKILL.md): Designed for Claude Code, Codex or similar harness, and for projects using Golang..
SKILL.md names 1 domain. As links in the text: 12factor.net. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Golang Project Layout is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.8k tokens (SKILL.md is roughly 7.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.5k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Golang Project Layout: Context Handling in fp-go (IBM/fp-go, 2k stars), Typed Dependencies with fp-go Effect (IBM/fp-go, 2k stars), fp-go Lenses for Go Structs (IBM/fp-go, 2k stars) and Golang Dependency Injection (samber/cc-skills-golang, 3.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
context-labs (a GitHub organization) maintains it in context-labs/whip, which has 1,083 GitHub stars. The repository holds 40 skills in this directory. The repository was last updated on October 5, 2026.
Source: context-labs/whip on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.