Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add LeeYudok/doksam-skills --skill go-expertgit clone --depth 1 https://github.com/LeeYudok/doksam-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/leeyudok/doksam-skills/go-expert)<a href="https://agentmods.dev/skills/leeyudok/doksam-skills/go-expert"><img src="https://agentmods.dev/badge/skills/leeyudok/doksam-skills/go-expert/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/leeyudok/doksam-skills/go-expert"><img src="https://agentmods.dev/badge/skills/leeyudok/doksam-skills/go-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00050 | $0.01898 |
| Opus 5 | $0.00025 | $0.00949 |
| Sonnet 5 | $0.00010 | $0.00380 |
| Haiku 4.5 | $0.00005 | $0.00190 |
Grade A, and why
go-expert scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.
go-expert
Go 코드가 대상이다. SQL·스키마는 sqlite-expert/db-expert,
프론트 산출물 내장의 빌드 순서는 frontend-build 가 맡는다.
이 문서는 일반론을 적지 않는다. 판단이 갈리는 지점, 자주 틀리는 곳, 최근 버전에서 바뀐 것만 담는다.
1. 에러
- 감싸서 올린다.
fmt.Errorf("%s 열기 실패: %w", path, err)—%w여야errors.Is/errors.As가 통한다.%v로 감싸면 사슬이 끊긴다. - 호출부가 분기해야 하는 실패는 센티널로 노출한다.
var ErrNotFound = errors.New(...). 문자열 비교로 분기하지 않는다. - 메시지는 소문자로 시작하고 마침표를 붙이지 않는다. 한국어 메시지도 문장부호 없이 짧게.
- 로그와 반환을 동시에 하지 않는다. 둘 다 하면 같은 실패가 여러 번 기록된다. 최상위(핸들러·main)에서 한 번만 기록한다.
panic은 프로그래머 오류에만. 입력이 잘못된 것은 에러다.
if errors.Is(err, chatdb.ErrNotFound) { ... } // 분기
var perr *fs.PathError
if errors.As(err, &perr) { ... } // 타입 정보가 필요할 때
2. 동시성 — 필요할 때만
goroutine 을 띄우기 전에 답한다: 누가 이걸 멈추는가? 결과는 누가 받는가? 답이 없으면 만들지 않는다.
- goroutine 의 수명은 호출부가 통제한다.
context.Context를 첫 인자로 받고, 종료 신호를 존중한다. 구조체 필드에 context 를 넣지 않는다. - 채널로 소유권을 옮기거나, 뮤텍스로 공유를 보호하거나 — 둘을 섞지 않는다.
sync.WaitGroup은Add를 goroutine 밖에서 부른다. 안에서 부르면 경합이다.- 루프 변수 캡처는 Go 1.22부터 반복마다 새 변수라 안전하다. 그 이전 버전 코드를 손볼 때는 여전히 확인한다.
- 테스트는
-race로 돌린다. 동시성 코드를 추가·수정했으면 필수다.
3. net/http — Go 1.22+ ServeMux
메서드와 경로 변수를 표준 mux 가 지원한다. 서드파티 라우터를 새로 들이기 전에 이걸로 충분한지 본다.
mux.HandleFunc("GET /api/chat/refs/{ref}/rooms", h)
mux.HandleFunc("DELETE /api/chat/dbs/{db}", h)
// 핸들러에서
ref := r.PathValue("ref")
- 더 구체적인 패턴이 우선한다 —
/api/...를 등록해두면/폴백이 삼키지 않는다. - 경로 변수는 디코딩된 값이다. 파일명·경로로 쓸 거면 반드시 검증한다(§5).
- 서버에는 최소한
ReadHeaderTimeout을 준다. 없으면 느린 헤더 공격에 매달린다. - 미들웨어는 핸들러를 감싸는 함수로. 인가처럼 빠뜨리면 안 되는 것은 라우팅 등록 지점에서 한 번에 걸리게 만든다 — 핸들러 안에서 각자 검사하면 언젠가 빠진다.
mux.HandleFunc("GET /api/x", requireAdmin(cfg, "X", handleX))
4. go:embed
//go:embed는 같은 디렉터리 이하만 가리킨다.../로 못 올라간다. 상위 폴더의 산출물을 넣으려면 그 폴더 안에 embed 하는 패키지를 둔다.- 기본 패턴은
.·_로 시작하는 파일을 건너뛴다. 포함하려면all:접두사. - 패턴이 하나도 안 맞으면 컴파일 에러다. 산출물을 커밋하지 않는 구조라면
자리표시자를 하나 커밋하고
//go:embed all:dist로 받는다. - 내장 여부를 런타임에 확인해 안내를 띄운다. 빈 화면보다 원인 추적이 훨씬 빠르다.
What ships with it
4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 11d ago First seen · 127 lines · 50 tokens per session scan A cfa220757098
go-expert is a skill published in the GitHub repository LeeYudok/doksam-skills (10 stars, last pushed 19d ago), licensed MIT. It adds 50 tokens to every session and 1,898 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
golang-testing
Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI…
golang-benchmark
Golang benchmarking, profiling, and performance measurement. Use when writing, running, or comparing Go benchmarks, profiling hot paths with pprof, interpreting CPU/memory/trace profiles, analyzing results with benchstat, setting up CI benchmark regression detection, or investigating production performance with…
golang-continuous-integration
GitHub Actions CI/CD pipeline configuration for Golang projects — workflow files for test, lint, SAST, coverage and vulnerability-scan jobs, Dependabot and Renovate config files, GoReleaser release pipelines, Docker build/push, repository security settings, and AI-driven PR review. Use when setting up or improving Go…
golang-dependency-injection
Comprehensive guide for dependency injection (DI) in Golang. Covers why DI matters (testability, loose coupling, separation of concerns, lifecycle management), manual constructor injection, and DI library comparison (google/wire, uber-go/dig, uber-go/fx, samber/do). Use this skill when designing service architecture…
golang-design-patterns
Idiomatic Golang design patterns — functional options, constructor APIs, init() and global-state avoidance, enums, panic vs error decisions, resource management and lifecycle, graceful shutdown, timeouts and retries, streaming and iterators, and architecture styles (clean, hexagonal, DDD, flat). Apply when choosing…
golang-documentation
Comprehensive documentation guide for Golang projects, covering godoc comments, README, CONTRIBUTING, CHANGELOG, Go Playground, Example tests, API docs, and llms.txt. Use when writing or reviewing doc comments, documentation, adding code examples, setting up doc sites, or discussing documentation best practices.…