Token导航 LogoToken导航

Agent Skill · 研究检索

golang(Go 搜索)

golang 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

golang 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 65,896。

总安装 272周安装 11GitHub Stars 公开资料未说明下载 85核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/monkescience/skills --skill golang

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

golang 用于查找、检索和筛选相关信息。适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词或任务场景快速定位候选结果。通过 npx skills add 命令从指定 GitHub 仓库安装并使用。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

golang 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/golang

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

golang 怎么安装?

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

golang 支持哪些 AI 工具?

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

golang 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

golang 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

golang 用的人多吗?

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

golang 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

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

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

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

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
golang

Go 搜索 · 本页

272—调用外部服务未明确通过

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

SKILL.md 原文

Go — Opinionated Coding Standards

Execution Order

When implementing or changing Go code, run this sequence unless project tooling defines a different workflow:

  1. Detect project commands in this order:

- make targets (if Makefile exists) - mage targets (if magefile.go exists) - raw Go commands

  1. Run checks in this order: fmt -> lint -> test -> build

Default fallback commands when project tooling is missing:

  • Format: golangci-lint fmt
  • Lint: golangci-lint run
  • Test: go test./...
  • Build: go build./...

Project Structure

Choose structure based on project type:

Libraries / small tools — flat structure:

mylib/
  mylib.go
  mylib_test.go
  helpers.go

Services / microservices — standard layout:

cmd/
  server/main.go
  worker/main.go
internal/
  handler/
  service/
  repository/
  model/
go.mod

Rules:

  • Use internal/ for private packages.
  • cmd/ contains only main.go entrypoints. Keep them thin — parse config, wire dependencies, call run().
  • Group by domain, not by technical layer, when the service grows beyond a few packages.
  • One package = one responsibility. If a package name needs "and" to describe it, split it.

Code Style & Naming

  • Format code with golangci-lint fmt (runs gofumpt + goimports via config).
  • Prefer descriptive names over short names, especially for exported symbols and function parameters.

- Acceptable short names: ctx, err, t, i, n for well-established Go idioms. - Bad: func Process(d []byte, f string) — Good: func Process(data []byte, filename string)

  • Exported names must be self-documenting. Comment every exported type, function, and constant.
  • Unexported helpers can be terser but must still be clear in context.
  • Avoid stuttering: user.User is fine, user.UserService is not — use user.Service.
  • Acronyms are all-caps: HTTPClient, ID, URL. Not HttpClient, Id, Url.
  • Struct tags use snake_case for JSON, YAML, XML, and BSON.

Constants — No iota

Never use iota. It is implicit, fragile to reordering, and produces opaque values that are hard to grep, log, and debug. Always use explicit string-typed constants.

// Bad — iota: implicit values, break on reorder, meaningless in logs
const (
    assertJSON assertType = iota
    assertYAML
    assertHTML
    assertFile
)

// Good — explicit string constants
const (
    assertJSON assertType = "json"
    assertYAML assertType = "yaml"
    assertHTML assertType = "html"
    assertFile assertType = "file"
)

Do not use iota for new code in this skill.

Interfaces

  • Keep interfaces small: 1-2 methods. Compose larger interfaces from small ones.
  • Accept interfaces, return concrete structs.
  • Define interfaces at the consumer side, not the implementation side.
  • Name single-method interfaces with the -er suffix: Reader, Writer, Closer, Validator.
// Defined where it's used, not where it's implemented
type OrderStore interface {
    GetOrder(ctx context.Context, id string) (*Order, error)
}

type OrderService struct {
    store OrderStore // depends on interface
}

Error Handling

Use sentinel errors + wrapping with fmt.Errorf and %w.

var (
    ErrNotFound  = errors.New("not found")
    ErrConflict  = errors.New("conflict")
    ErrForbidden = errors.New("forbidden")
)

func (s *Service) GetUser(ctx context.Context, id string) (*User, error) {
    user, err := s.repo.Find(ctx, id)
    if err != nil {
        return nil, fmt.Errorf("get user %s: %w", id, err)
    }
    return user, nil
}
  • Always wrap errors with context about what operation failed.
  • Never discard errors silently. If intentionally ignoring, assign to _ with a comment.
  • No pkg/errors or third-party error packages. Stdlib is sufficient.
  • Return errors; do not panic. Reserve panic for truly unrecoverable programmer errors.
  • Error messages are lowercase, no punctuation: "get user: not found".

Testing

Use stdlib testing + testastic. Test the public API through external _test packages. Use same-package tests only for complex internals that are not meaningfully reachable through the public surface. Use // given: / // when: / // then: comments in every test case. Hand-roll mocks, no additional mocking frameworks.

Choose the right testing approach based on project type:

Test Data Isolation

  • Each test/subtest must own its test data (actual, expected, fixtures).
  • Do not share package-level test payload constants/variables across tests.
  • Do not reuse the same testdata/... fixture path across multiple tests.
  • Fixture content must be unique per test case; avoid copy-paste fixtures with identical bytes.
  • If two tests need similar data, create separate fixtures and change at least one scenario-relevant field so intent stays explicit.
  • Repetition is acceptable only in non-executable documentation comments/examples.

Linting

Use golangci-lint v2. Run golangci-lint run for linting and golangci-lint fmt for formatting.

For the full reference config, enabled/disabled linter rationale, and rules, see references/linting.md.

Key rules:

  • All code must pass golangci-lint run before committing.
  • No //nolint without a comment explaining why.
  • Test files have relaxed rules (funlen, dupl, mnd, wrapcheck, err113, gocognit, gosec excluded).

Context

  • ctx context.Context is always the first parameter. No exceptions.
  • Never store context.Context in a struct. Pass it through function calls.
  • Use context.WithTimeout or context.WithCancel to scope work.
  • Respect context cancellation: check ctx.Err() or select on ctx.Done() in long operations.

Concurrency

  • Do not start goroutines without a clear ownership and shutdown strategy.
  • Use errgroup.Group for concurrent operations that can fail.
  • Channels for communication, mutexes for state protection. Do not mix unnecessarily.
  • Always handle goroutine lifecycle: context.Context for cancellation, sync.WaitGroup or errgroup for joining.
  • Prefer sync.Once over init() for lazy initialization.
  • Never fire-and-forget goroutines in production code.
  • Buffer channels only with a clear reason and known capacity.
g, ctx := errgroup.WithContext(ctx)
for _, item := range items {
    g.Go(func() error {
        return process(ctx, item)
    })
}
if err := g.Wait(); err != nil {
    return fmt.Errorf("process items: %w", err)
}

Dependency Injection

  • Constructor-based injection. No global mutable state. No DI frameworks.
  • Constructors return concrete types, accept interfaces.
  • Wire dependencies in main() or a dedicated run() function in cmd/.
func NewOrderService(store OrderStore) *OrderService {
    return &OrderService{store: store}
}

Options Pattern

Use the functional options pattern for configurable constructors or functions with optional parameters. Do not use config structs with zero-value ambiguity.

// Option type is an unexported function that modifies config.
type Option func(*serverConfig)

// serverConfig holds all configurable fields with sensible defaults.
type serverConfig struct {
    port         int
    readTimeout  time.Duration
    writeTimeout time.Duration
}

// Exported option constructors — one per configurable field.
func WithPort(port int) Option {
    return func(c *serverConfig) {
        c.port = port
    }
}

func WithReadTimeout(timeout time.Duration) Option {
    return func(c *serverConfig) {
        c.readTimeout = timeout
    }
}

// Constructor applies defaults, then options.
func NewServer(opts ...Option) *Server {
    cfg := serverConfig{
        port:         8080,
        readTimeout:  5 * time.Second,
        writeTimeout: 10 * time.Second,
    }
    for _, opt := range opts {
        opt(&cfg)
    }

    return &Server{cfg: cfg}
}

// Usage: clean, readable, self-documenting.
srv := NewServer(
    WithPort(9090),
    WithReadTimeout(10 * time.Second),
)

Rules:

  • Config struct is unexported. Options are the public API.
  • Set sensible defaults in the constructor, not in each option.
  • Each option constructor is a With* function returning Option.
  • Option constructors return the Option type (not the concrete closure) — this is a valid exception to "return concrete types".
  • Use this pattern when a function has more than 2-3 optional parameters. Do not use it for required parameters — those stay as regular arguments.

Logging

Use log/slog with context-aware logging. Configure the default logger once in main() via slog.SetDefault(). Always log with context using slog.InfoContext(ctx,...), slog.ErrorContext(ctx,...), etc. Do not pass *slog.Logger as a parameter — ctx already carries correlation IDs, trace IDs, and other request-scoped data.

For setup patterns, handler configuration, and context attribute extraction, see references/logging.md.

No init(), No Globals

  • No init() functions. They make testing hard and hide side effects.
  • No mutable global state. Pass dependencies explicitly.
  • Package-level var is acceptable only for sentinel errors, constants, and sync.Once.

Dependency Management

  • Use Go modules (go.mod). Run go mod tidy before committing.
  • Pin direct dependency versions. Do not use latest.
  • Review go.sum changes in PRs.
  • Avoid vendoring unless required by build environment constraints.
  • Minimize external dependencies. Prefer stdlib when reasonable.

Ask Before Proceeding

Ask the user before:

  • Adding a new third-party dependency.
  • Introducing or switching framework-level choices (router, ORM, logging stack, queue client).
  • Using same-package tests for internals as the primary strategy in a package.
  • Choosing integration test runtime strategy (containers, docker-compose, external shared services).

Done Criteria

A Go change is done when all are true:

  • Formatting passes (golangci-lint fmt or project equivalent).
  • Lint passes (golangci-lint run or project equivalent).
  • Relevant tests pass (go test./... or project equivalent).
  • Build passes (go build./... or project equivalent for changed binaries/packages).
  • No unresolved placeholders, partial implementations, or undocumented exceptions to rules.

平台分布

Codex

35.95%
按下载量换算31

Claude

29.8%
按下载量换算25

Cursor

19.62%
按下载量换算17

Gemini CLI

9.21%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills