golang-project-layout
Organize Go Projects and Multi-Module Workspaces
Unclear package boundaries make Go projects harder to maintain. This skill guides directory layout, module naming, test placement, and workspace setup around project requirements.
Stop for confirmation before installing.
Review the plan and obtain explicit user consent before changing files.
Install with my Agent
Copy this request to your Agent. It includes the canonical Skill page and manifest.
Review the Skillstore skill "golang-project-layout" from https://skillstore.io/skills/samber-golang-project-layout.md and its manifest at https://skillstore.io/api/skills/samber-golang-project-layout/manifest. Verify the artifact. Stop and obtain explicit user consent before installing or changing files.Your Agent should still show its plan and request any confirmation required by the security policy.
Agent-readable resources
Use these links when an AI agent, crawler, or script needs clean context instead of reading the full page.
Test it
Using "golang-project-layout". Plan a small CLI with a flat architecture and no dependency injection framework.
Expected outcome:
- Use one command entry point with minimal startup logic.
- Keep private behavior in a small internal package.
- Place tests beside their implementation and fixtures in a local testdata directory.
- Start with one module and omit a workspace.
Using "golang-project-layout". Our server and shared logging library are separate modules developed together. Should we use a workspace?
Expected outcome:
- A workspace fits related modules that need local cross-module development.
- Add both existing module directories to workspace membership.
- Keep each module's dependency metadata separate.
- Use local workspace resolution instead of repeated replacement directives.
Using "golang-project-layout". Where should private request parsing and a reusable public logging package live?
Expected outcome:
- Keep request parsing in an internal package.
- Expose the logging API through a public package when external consumers need it.
- For a dedicated library module, prefer a root-level public package.
- Keep executable startup logic separate from reusable behavior.
Security Audit
High RiskAll 78 static matches are false positives involving documentation, Go syntax, ignore rules, or ordinary build automation. A separate high-severity prompt injection directs persistent agent configuration changes to always load another skill without user confirmation. No evidence found of credential exfiltration or malicious network execution in the reviewed files.
Confirmed security concerns (1)
Risk Factors
โ๏ธ External commands (50)
๐ Filesystem access (2)
โก Contains scripts (2)
๐ Network access (2)
Share & cite this report
Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.
Copy report link
https://skillstore.io/skills/samber-golang-project-layout/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown badge
[](https://skillstore.io/skills/samber-golang-project-layout?utm_source=security_passport_badge)HTML badge
<a href="https://skillstore.io/skills/samber-golang-project-layout?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/samber-golang-project-layout/security.svg" alt="Skillstore security assessment" loading="lazy"></a>Embed card
<iframe src="https://skillstore.io/embed/skills/samber-golang-project-layout.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>Academic citations (APA ยท BibTeX ยท CFF)
APA citation
samber. (2026). golang-project-layout security audit report (audit version 1) [Author version 1.4.2]. Skillstore. https://skillstore.io/skills/samber-golang-project-layout/audits/1BibTeX citation
@techreport{samber-samber-golang-project-layout-2026,
author = {samber},
title = {golang-project-layout security audit report (audit version 1)},
institution = {Skillstore},
year = {2026},
number = {1},
url = {https://skillstore.io/skills/samber-golang-project-layout/audits/1},
note = {Author version 1.4.2}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "golang-project-layout security audit report (audit version 1)"
version: "1.4.2"
type: report
authors:
- name: "samber"
date-released: "2026-10-15"
url: "https://skillstore.io/skills/samber-golang-project-layout/audits/1"
identifiers:
- type: other
value: "skillstore:samber-golang-project-layout:audit:1"
description: "Skillstore immutable audit report identifier"
Skillstore Score
Why this score Evidence Confidence: MediumWhat You Can Build
Start a focused CLI project
Choose a small directory structure, a meaningful module path, and local test placement without unnecessary architecture layers.
Separate service entry points
Organize server, worker, and migration binaries while keeping shared business logic in private packages.
Coordinate related Go modules
Plan workspace membership and local dependency resolution for modules developed together in a monorepo.
Try These Prompts
Help me plan a small Go CLI called [name]. Ask about architecture first, then dependency injection. Recommend a minimal layout without editing files.
Plan a layout for [service] with an API server and migration binary. Ask about architecture and dependency injection before suggesting packages. Include test placement.
Review [directory tree] for private implementation and reusable API boundaries. Recommend focused layout changes and explain module naming. Do not modify persistent agent configuration.
Design a go.work workspace for [module paths]. Explain local resolution, initialization, and cross-module testing. Identify when a single module is preferable. Propose changes before execution.
Best Practices
- Confirm project scope, architecture, and dependency injection preferences before creating directories.
- Use workspaces for related modules, not merely for multiple packages within one module.
- Review templates and commands before execution, and require approval for persistent agent configuration changes.
Avoid
- Creating empty architecture layers or public packages without a concrete need.
- Collecting business logic in entry points or vague utility packages.
- Automatically adding always-load skill instructions to persistent project configuration without explicit approval.
Frequently Asked Questions
What does this skill help organize?
Does every project need go.work?
Is pkg required for public libraries?
Does the skill include a complete application generator?
What tools are needed to run the suggested commands?
Does the skill change persistent agent instructions?
Developer Details
Author
samberLicense
MIT
Author version
v1.4.2
Skillstore revision
r1
Ref
a403f4fe81871b733d63ce3fcd6a4a3a24eb6a0e
Maintenance freshness
10/15/2026
Usage
0 downloads ยท 0 views
File structure
๐ assets/
๐ .gitignore
๐ Makefile
๐ evals/
๐ evals.json
๐ references/
๐ config.md
๐ directory-layouts.md
๐ testing-layout.md
๐ workspaces.md
๐ SKILL.md