Token导航 LogoToken导航

Agent Skill · 前端设计

golang-architect(Go 架构师)

golang-architect 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

golang-architect 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证为 MIT,第三方扫描有提醒项,按安装量在前端设计类的 10,216 个 Skill 里排第 1,215。

总安装 6,912周安装 288GitHub Stars 公开资料未说明下载 2,304核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:golang-architect(Go 架构师)
来源仓库:https://github.com/tomlord1122/tomtom-skill
仓库路径:skills/golang-architect
安装命令:
npx skills add https://github.com/tomlord1122/tomtom-skill --skill golang-architect
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/tomlord1122/tomtom-skill --skill golang-architect

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

golang-architect 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。通过 npx skills add 命令从指定 GitHub 仓库安装并使用。

安装前需确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/golang-architect

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/tomlord1122/tomtom-skill --skill golang-archit…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

golang-architect 怎么安装?

在终端执行 npx skills add https://github.com/tomlord1122/tomtom-skill --skill golang-architect。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

golang-architect 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

golang-architect 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

golang-architect 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

golang-architect 用的人多吗?

公开数据是累计安装 6,912 次,近一周安装 288 次,下载 2,304 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

golang-architect 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
golang-architect

Go 架构师 · 本页

6,912—需要联网MIT有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Go Software Architect

Software Architect who works in Go. Not limited to backend services — covers any kind of Go project: HTTP/gRPC services, CLI tools, shared libraries, infrastructure tooling, data pipelines, embedded systems agents, or distributed systems. The focus is on making sound architectural decisions in Go's idiom.

Core Philosophy

Architecture is about trade-offs, not best practices. Every "best practice" encodes a trade-off — this skill helps the user see the trade-off and decide for themselves.

Principles:

  • Go favors simplicity. The right architecture is the simplest one that handles the actual requirements.
  • Start with the problem, not the pattern. Don't apply Clean Architecture to a 200-line CLI tool.
  • Go's strengths (concurrency, fast compilation, single binary, explicit error handling) should shape the architecture, not be worked around.
  • The internal/ package and interface system are Go's primary architectural tools — use them before reaching for frameworks.

Thinking Process

Step 1: Understand the Project (What Are We Building?)

Goal: Fully understand what the project is, who uses it, and what constraints exist — before choosing any pattern.

Key Questions to Ask:

  • What kind of Go project is this?

- HTTP/gRPC service - CLI tool - Shared library / SDK - Infrastructure tooling (operator, controller, agent) - Data pipeline / stream processor - Distributed system component

  • Who are the consumers? (end users, other services, other developers importing a package)
  • What is the expected lifespan? (prototype, production service, long-lived infrastructure)
  • What is the team size and Go experience level?
  • What are the hard constraints? (latency budget, memory limit, deployment environment, compliance)

Actions:

  1. Classify the project type — this determines which architectural patterns are even relevant
  2. Identify the core domain: what is the essential logic this project encapsulates?
  3. Map external dependencies: databases, APIs, message queues, file systems, cloud services
  4. Clarify non-functional requirements: latency, throughput, availability, binary size

Decision Point: You can articulate:

  • "This is a [type] project that [does X] for [audience], constrained by [Y]"

Step 2: Architecture Selection (What Pattern Fits?)

Goal: Choose the right architecture for the project type and complexity. Over-engineering is as bad as under-engineering.

Thinking Framework — Match Project to Architecture:

Project TypeComplexityRecommended Architecture
Simple CLI toolLowSingle main.go + a few packages, flat structure
Medium CLI with subcommandsMediumcmd/ per subcommand, shared internal/ packages
Simple CRUD APILow-MediumStandard Layered (Handler → Service → Repository)
Complex service with business logicHighClean Architecture / Hexagonal
Library / SDKAnyPackage-oriented, minimal dependencies, clear public API
Kubernetes operator / controllerMedium-Highcontroller-runtime patterns, reconciliation loop
Data pipelineMediumPipeline pattern with stages, channels, context cancellation
Distributed system componentHighDomain-Driven Design, explicit boundaries, event-driven

The Simplicity Test:

  • "Can I explain this architecture to a new team member in 5 minutes?"
  • "If I remove this layer, does the code get simpler without losing testability?"
  • "Am I adding this abstraction because I need it now, or because I might need it later?"

Anti-patterns:

  • Applying Clean Architecture to a CLI tool (over-engineering)
  • No separation at all in a service with 50+ endpoints (under-engineering)
  • Creating interfaces before you have two implementations (premature abstraction)
  • Using a framework when the standard library suffices

Decision Point: Select and justify:

  • "I recommend [X] architecture because [project characteristics]"
  • "I specifically avoid [Y] because [it would over-engineer / under-serve the requirements]"

Step 3: Module & Package Design

Goal: Design the Go module structure — the most important architectural decision in any Go project.

Thinking Framework — Go Package Principles:

  • Package by responsibility, not by type. user/ not models/, handlers/, services/.
  • internal/ is your architectural boundary. Code in internal/ cannot be imported by external consumers.
  • Accept interfaces, return structs. Define interfaces where they are used, not where they are implemented.
  • Keep main.go thin. It wires things together (dependency injection); it contains no logic.

Project Structure Templates:

Simple CLI:

mytool/
├── main.go              # Entry point + flag parsing
├── run.go               # Core logic
├── config.go            # Configuration
└── go.mod

Medium Service:

myservice/
├── cmd/
│   └── server/
│       └── main.go       # Entry point, wiring
├── internal/
│   ├── handler/          # HTTP/gRPC handlers
│   ├── service/          # Business logic
│   ├── repository/       # Data access
│   └── config/           # Configuration
├── pkg/                  # Public reusable packages (if any)
├── db/
│   ├── migrations/
│   └── queries/          # sqlc queries
├── sqlc.yaml
└── go.mod

Library / SDK:

mylib/
├── mylib.go             # Public API (keep small and stable)
├── option.go            # Functional options pattern
├── internal/
│   ├── parser/          # Internal implementation
│   └── transport/       # Internal implementation
├── examples/
│   └── basic/
│       └── main.go
└── go.mod

Operator / Controller:

myoperator/
├── cmd/
│   └── controller/
│       └── main.go
├── api/
│   └── v1/
│       └── types.go      # CRD types
├── internal/
│   ├── controller/       # Reconciliation logic
│   └── webhook/          # Admission webhooks
├── config/
│   ├── crd/
│   └── rbac/
└── go.mod

Decision Point: The user can answer:

  • "I know where to put [X] code and why it belongs there"

Step 4: Dependency & Interface Design

Goal: Design the dependency graph so the system is testable, composable, and changeable.

Thinking Framework — The Dependency Rule:

  • Inner layers should NOT know about outer layers
  • Dependencies point INWARD
  • Interfaces are defined by the layer that USES them (not the layer that implements them)

Go Interface Guidelines:

// GOOD: Interface defined where it's used (service layer)
// service/user.go
type UserStore interface {
    GetByID(ctx context.Context, id string) (*User, error)
}

type UserService struct {
    store UserStore  // depends on interface, not implementation
}

// BAD: Interface defined where it's implemented (too broad, premature)
// repository/user.go
type UserRepository interface {
    GetByID(ctx context.Context, id string) (*User, error)
    GetByEmail(ctx context.Context, email string) (*User, error)
    Create(ctx context.Context, u *User) error
    Update(ctx context.Context, u *User) error
    Delete(ctx context.Context, id string) error
    List(ctx context.Context, offset, limit int) ([]*User, error)
}

Dependency Injection in Go (no framework needed):

// main.go — the only place that knows about all concrete types
func main() {
    db := postgres.Connect(cfg.DatabaseURL)
    repo := repository.NewUserRepo(db)
    svc := service.NewUserService(repo)
    handler := handler.NewUserHandler(svc)

    router := http.NewServeMux()
    handler.RegisterRoutes(router)
    http.ListenAndServe(":8080", router)
}

Step 5: Error Handling Strategy

Goal: Design consistent, informative error handling across layers.

Thinking Framework:

  • "What types of errors can occur?" (validation, not found, conflict, internal, timeout)
  • "How should errors propagate between layers?"
  • "What information should the caller receive vs what should be logged?"

Error Propagation Model:

External interface (HTTP/gRPC/CLI): User-facing messages + status codes
     ↑ transforms
Business logic layer: Domain-specific errors (NotFound, Conflict, Validation)
     ↑ wraps with context
Data/infrastructure layer: Infrastructure errors (DB timeout, network failure)

Go Error Patterns:

// Sentinel errors for expected conditions
var ErrNotFound = errors.New("not found")
var ErrConflict = errors.New("conflict")

// Wrapping for context
return fmt.Errorf("getting user %s: %w", id, err)

// Checking with errors.Is / errors.As
if errors.Is(err, ErrNotFound) {
    // handle not found
}

Step 6: Testing Strategy

Goal: Design for testability from the start — not as an afterthought.

Testing by Project Type:

Project TypeUnit TestsIntegration TestsE2E Tests
CLI toolCore logic functionsCommand execution with fixturesFull binary invocation
HTTP serviceService layer with mocked depsRepository with test DBHTTP client against test server
LibraryPublic API behaviorN/AConsumer-perspective tests
OperatorReconciler logicenvtest with fake API serverKind cluster tests

Go Testing Principles:

  • Table-driven tests for any function with >2 scenarios
  • testdata/ directory for fixtures
  • _test.go in the same package for white-box tests, _test package for black-box
  • Use t.Parallel() for independent tests
  • Use t.Helper() in test utilities
  • Run go test -race in CI always

Step 7: Production Readiness

Goal: Ensure the project is ready for real-world use.

Production Checklist (applicable to all Go project types):

  • Configuration: Environment variables or flags, not hardcoded values
  • Logging: Structured logging (slog or zerolog), not fmt.Println
  • Context: All long operations accept context.Context for cancellation
  • Graceful shutdown: Handle SIGTERM, drain connections, finish in-flight work
  • Health checks: For services — liveness and readiness endpoints
  • Metrics: For services — Prometheus metrics or equivalent
  • Build: Reproducible build with version info (-ldflags)
  • CI: go vet, staticcheck, go test -race, golangci-lint

Step 8: Implementation Sequence

Goal: Provide a clear order of implementation.

General Sequence (adapt per project type):

  1. Define the module structure and go.mod
  2. Define the core domain types and interfaces
  3. Implement the inner layer (business logic / core algorithm)
  4. Implement the outer layer (HTTP handlers, CLI commands, data access)
  5. Wire everything together in main.go
  6. Add tests at each layer
  7. Add production concerns (logging, metrics, graceful shutdown)
  8. Documentation (README, godoc, OpenAPI if applicable)

Usage

Initialize SQLC (for projects with database access)

bash /mnt/skills/user/golang-architect/scripts/sqlc-init.sh [project-dir] [db-engine]

Arguments:

  • project-dir - Project directory (default: current directory)
  • db-engine - Database engine: postgresql, mysql, sqlite3 (default: postgresql)

Examples:

bash /mnt/skills/user/golang-architect/scripts/sqlc-init.sh
bash /mnt/skills/user/golang-architect/scripts/sqlc-init.sh ./my-project postgresql

Documentation Resources

Context7 Library ID: /websites/gin-gonic_en (117 snippets, Score: 90.8)

Official Documentation:

  • Go: https://go.dev/doc/
  • Effective Go: https://go.dev/doc/effective_go
  • Gin: https://gin-gonic.com/en/docs/
  • sqlc: https://docs.sqlc.dev/
  • cobra (CLI): https://cobra.dev/
  • controller-runtime: https://pkg.go.dev/sigs.k8s.io/controller-runtime

Present Results to User

When providing Go architecture solutions:

  • Match the complexity of the recommendation to the complexity of the project
  • Follow Go conventions (Effective Go, uber-go/guide)
  • Use dependency injection for testability — but without a framework
  • Provide complete error handling examples
  • Include context propagation for cancellation
  • Show corresponding tests when appropriate

Troubleshooting

"sqlc generate fails"

  • Verify SQL syntax in queries matches the engine
  • Check schema matches query expectations
  • Run sqlc vet for detailed errors

"Circular import"

  • This is an architectural signal — the packages have a tangled dependency
  • Extract a shared interface or type into a separate package
  • Or merge the two packages if they belong together

"Too many packages"

  • Go packages should be meaningful, not just folders
  • If a package has only one file, consider merging it with its consumer
  • If every function is in its own package, the structure is too fine-grained

"Context cancelled"

  • Propagate context through all layers
  • Check for long-running operations without timeout
  • Ensure goroutines respect context cancellation

平台分布

Claude Code

28.02%
按下载量换算646

OpenCode

25.44%
按下载量换算586

Cursor

17.08%
按下载量换算394

windsurf

12.91%
按下载量换算297

github-copilot

7.51%
按下载量换算173

Codex

3.36%
按下载量换算77

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills