Token导航 LogoToken导航TokenDH.com
运维和基础设施需要联网github未标认证来源可访问clear审计未展示

golang-senior-leadGo senior lead 命令行

Agent Skill

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

总安装

285

周安装

12

GitHub Stars

5

下载量

1
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/modra40/claude-codex-skills-directory --skill golang-senior-lead

简介

golang-senior-lead 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中整理相关事项。

  • 适用于围绕仓库状态、代码变更或协作事项进行信息整理和分析的场景。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装并使用该技能。
  • 安装前需确认权限范围、维护状态,以及是否会触发联网或文件读写操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Golang Senior/Lead Developer Expertise

Skill ini mengandung accumulated wisdom dari 20+ tahun production experience. Setiap recommendation sudah battle-tested di high-traffic systems.

Core Philosophy

KISS (Keep It Stupid Simple) - Kode terbaik adalah kode yang tidak perlu ditulis. Setiap line of code adalah liability.

Less is More - Jangan over-engineer. Solve today's problem, not imaginary future problems. YAGNI (You Ain't Gonna Need It).

Explicit over Implicit - Go menghargai explicitness. Jangan gunakan magic. Kode harus readable tanpa documentation.

Fail Fast, Fail Loud - Error harus di-handle segera, jangan di-ignore. Panic early jika state tidak valid.

Project Structure (Production-Grade)

project-name/
├── cmd/                    # Entry points (main packages)
│   ├── api/
│   │   └── main.go        # HTTP API server
│   └── worker/
│       └── main.go        # Background worker
├── internal/               # Private packages (tidak bisa di-import external)
│   ├── domain/            # Business entities & interfaces (CORE)
│   │   ├── user.go        # Entity + Repository interface
│   │   └── order.go
│   ├── usecase/           # Business logic (orchestration)
│   │   └── user/
│   │       ├── service.go
│   │       └── service_test.go
│   ├── repository/        # Data access implementations
│   │   └── postgres/
│   │       └── user.go
│   ├── handler/           # HTTP/gRPC handlers
│   │   └── http/
│   │       └── user.go
│   └── pkg/               # Internal shared utilities
│       ├── validator/
│       └── logger/
├── pkg/                    # Public packages (bisa di-import external)
├── config/                 # Configuration files
├── migrations/             # Database migrations
├── scripts/                # Build/deploy scripts
├── docker/
│   ├── Dockerfile
│   └── docker-compose.yml
├── go.mod
├── go.sum
├── Makefile
└── .golangci.yml          # Linter config

Critical Rules:

  • internal/ = private, tidak bisa di-import dari luar module
  • domain/ = ZERO dependencies ke infrastructure. Pure business logic.
  • Dependency flow: handler → usecase → repository. NEVER backwards.

Error Handling Golden Rules

// ❌ NEVER ignore errors
result, _ := someFunction()

// ✅ ALWAYS handle or propagate
result, err := someFunction()
if err != nil {
    return fmt.Errorf("someFunction failed: %w", err) // wrap with context
}

// ❌ NEVER use panic for expected errors
if user == nil {
    panic("user not found") // WRONG!
}

// ✅ Return error for expected failures
if user == nil {
    return nil, ErrUserNotFound
}

// Sentinel errors (define di package level)
var (
    ErrNotFound     = errors.New("not found")
    ErrUnauthorized = errors.New("unauthorized")
)

Concurrency Patterns (Race Condition Prevention)

Lihat references/concurrency.md untuk patterns lengkap.

Quick Rules:

  • Selalu gunakan sync.Mutex untuk shared state
  • Prefer channels untuk communication, mutex untuk state protection
  • SELALU run go test -race./... sebelum merge
  • Gunakan context.Context untuk cancellation propagation

Docker Best Practices

Lihat references/docker.md untuk Dockerfile dan docker-compose templates.

Quick Rules:

  • Multi-stage builds untuk minimal image size
  • Non-root user untuk security
  • .dockerignore wajib
  • Health checks wajib untuk orchestration
  • Pin specific versions, NEVER use latest

Recommended Libraries (Battle-Tested)

Lihat references/libraries.md untuk complete list dengan use cases.

Essential Stack:

CategoryLibraryReason
HTTP Routerchi atau ginChi lebih Go-idiomatic, Gin lebih feature-rich
Databasesqlx + pgxRaw SQL power + type safety
Validationvalidator/v10De-facto standard
Configviper atau envconfigViper untuk complex, envconfig untuk simple
Loggingzerolog atau zapStructured, fast, production-ready
Testingtestify + testcontainersAssertions + integration tests

Debugging Workflow

Lihat references/debugging.md untuk advanced techniques.

Quick Commands:

# Race detector
go test -race ./...

# CPU profiling
go test -cpuprofile cpu.prof -bench .

# Memory profiling
go test -memprofile mem.prof -bench .

# Deadlock detection
GODEBUG=schedtrace=1000 ./app

# Detailed stack traces
GOTRACEBACK=all ./app

Code Review Checklist

Sebelum approve PR, pastikan:

  1. Error Handling - Semua error di-handle, tidak ada _ untuk error
  2. Race Conditions - Shared state dilindungi, go test -race pass
  3. Resource Leaks - Semua defer Close() ada, context digunakan
  4. Tests - Unit tests ada, edge cases covered
  5. Naming - Clear, Go conventions (MixedCaps, not snake_case)
  6. Simplicity - Tidak over-engineered, KISS principle

Testing Strategy

// Table-driven tests (Go idiom)
func TestCalculatePrice(t *testing.T) {
    tests := []struct {
        name     string
        input    float64
        expected float64
        wantErr  bool
    }{
        {"normal price", 100, 110, false},
        {"zero price", 0, 0, false},
        {"negative price", -1, 0, true},
    }

    for _, tt := range tests {
        t.Run(tt.name, func(t *testing.T) {
            got, err := CalculatePrice(tt.input)
            if (err != nil) != tt.wantErr {
                t.Errorf("error = %v, wantErr %v", err, tt.wantErr)
            }
            if got != tt.expected {
                t.Errorf("got %v, want %v", got, tt.expected)
            }
        })
    }
}

Performance Quick Wins

  1. Preallocate slices - make([]T, 0, expectedSize)
  2. Avoid string concatenation in loops - Use strings.Builder
  3. Sync.Pool untuk frequent allocations
  4. Buffer channels - Prevent goroutine blocking
  5. Index database queries - Explain analyze sebelum deploy

Common Pitfalls to Avoid

PitfallConsequencePrevention
Nil pointer dereferencePanic crashAlways check nil before access
Goroutine leakMemory leakUse context for cancellation
Closing nil channelPanicCheck before close
Data raceUndefined behaviorgo test -race
Slice append gotchaData corruptionCopy when needed

Additional References

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

29.2%
按下载量换算0

Gemini CLI

25.51%
按下载量换算0

trae

18.11%
按下载量换算0

OpenCode

11.86%
按下载量换算0

Antigravity

8.24%
按下载量换算0

windsurf

3.22%
按下载量换算0

安全审计

暂无安全审计结果可展示。

权限和风险

需要联网

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills