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/agents-scaffold --skill dok3-gogit clone --depth 1 https://github.com/LeeYudok/agents-scaffoldWrote 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/agents-scaffold/dok3-go)<a href="https://agentmods.dev/skills/leeyudok/agents-scaffold/dok3-go"><img src="https://agentmods.dev/badge/skills/leeyudok/agents-scaffold/dok3-go/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/agents-scaffold/dok3-go"><img src="https://agentmods.dev/badge/skills/leeyudok/agents-scaffold/dok3-go.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.03193 |
| Opus 5.5 | $0.00020 | $0.01277 |
| Sonnet 5.5 | $0.00010 | $0.00639 |
| Haiku 4.5 | $0.00005 | $0.00319 |
Grade C, and why
dok3-go scanned grade C with 1 finding 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 today.
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.
Cloud metadata endpointhighServer-side request forgery
One request to 169.254.169.254 can return temporary IAM credentials.
(`169.254.169.254` 같은 메타데이터 주소)을 거절한다. 리다이렉트도 같은 검사를 거친다 How it starts
The opening of the file, as written. The whole thing — 176 lines — stays where its author put it; the contents beside it link to each section on GitHub.
dok3-go
Go 코드가 대상이다. SQL·스키마는 dok3-db 와 엔진별 스킬(dok3-pg·dok3-oracle·dok3-sqlite),
프론트 산출물 내장의 빌드 순서는 dok3-frontend-build 가 맡는다.
이 문서는 일반론을 적지 않는다. 판단이 갈리는 지점, 자주 틀리는 곳, 최근 버전에서 바뀐 것만 담는다.
1. 에러
- 감싸서 올린다.
fmt.Errorf("%s 열기 실패: %w", path, err)—%w여야errors.Is/errors.As가 통한다.%v로 감싸면 사슬이 끊긴다. - 호출부가 분기해야 하는 실패는 센티널로 노출한다.
var ErrNotFound = errors.New(...). 문자열 비교로 분기하지 않는다. - 메시지는 소문자로 시작하고 마침표를 붙이지 않는다. 한국어 메시지도 문장부호 없이 짧게.
- 로그와 반환을 동시에 하지 않는다. 둘 다 하면 같은 실패가 여러 번 기록된다. 최상위(핸들러·main)에서 한 번만 기록한다.
panic은 프로그래머 오류에만. 입력이 잘못된 것은 에러다.- error 자리에 nil 포인터를 돌려주지 않는다(typed nil).
var e *MyErr; return e는 호출부에서err != nil이 참이다. 인터페이스 값에 타입 정보가 남기 때문이다. 실패가 없으면 리터럴nil을 반환한다.
if errors.Is(err, chatdb.ErrNotFound) { ... } // 분기
var perr *fs.PathError
if errors.As(err, &perr) { ... } // 타입 정보가 필요할 때
Go 1.26+ 는 errors.AsType 으로 변수 선언 없이 꺼낸다. go.mod 의 go 버전이 1.26 미만이면 errors.As 를 쓴다.
go vet 는 go.mod 보다 새로운 표준 라이브러리 API 를 쓰면 requires go1.26 or later 로 잡는다. 완료 조건의 go vet 가 그 확인을 겸한다.
if perr, ok := errors.AsType[*fs.PathError](err); ok { ... }
2. 동시성 — 필요할 때만
goroutine 을 띄우기 전에 답한다: 누가 이걸 멈추는가? 결과는 누가 받는가? 답이 없으면 만들지 않는다.
- goroutine 의 수명은 호출부가 통제한다.
context.Context를 첫 인자로 받고, 종료 신호를 존중한다. 구조체 필드에 context 를 넣지 않는다. - 채널은 작업이나 결과를 전달할 때, 뮤텍스는 여러 goroutine 이 읽고 쓰는 상태를 보호할 때 쓴다. 둘을 함께 쓸 수 있다. 각 상태를 누가 소유하고 어떤 방식으로 보호하는지 분명히 한다.
- 취소 신호가 작업을 끝내는지 확인한다. 채널 송수신이나 외부 호출이 취소 뒤에도 막혀 있지
않은지 살핀다. 테스트는 취소 후 완료 채널이나
WaitGroup으로 제한 시간 안에 goroutine 이 끝났는지 확인한다. sync.WaitGroup은Add를 goroutine 밖에서 부른다. 안에서 부르면 경합이다. Go 1.25+ 는wg.Go(func() { ... })가Add·Done을 대신해 이 실수가 생기지 않는다.- 하나가 실패하면 나머지를 멈춰야 하면
golang.org/x/sync/errgroup의errgroup.WithContext를 쓴다.WaitGroup은 에러를 모으지도, 취소하지도 않는다. - 루프 안의
defer는 함수가 끝날 때까지 실행되지 않는다. 파일을 수백 개 여는 루프에서 쓰면 핸들이 쌓인다. 반복마다 닫아야 하면 본문을 함수로 빼고 그 안에서defer한다. - 루프 변수 캡처는 Go 1.22부터 반복마다 새 변수라 안전하다. 그 이전 버전 코드를 손볼 때는 여전히 확인한다.
- 테스트는
-race로 돌린다. 동시성 코드를 추가·수정했으면 필수다.
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.
- today First seen · 176 lines · 50 tokens per session scan C 678d8f371538
dok3-go is a skill published in the GitHub repository LeeYudok/agents-scaffold (40 stars, last pushed today), licensed MIT. It adds 50 tokens to every session and 3,193 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 1 finding (cloud metadata endpoint). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-30.
dok3-go compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| dok3-goLeeYudok/agents-scaffold | Skill | 40 | today | MIT | C | 50 | Claude Code |
| go-backend-microservicesMindrally/skills | Skill | 322 | 1mo ago | Apache-2.0 | A | 26 | Claude Code |
| agent-go-experttravisjneuman/.claude | Skill | 115 | yesterday | MIT | A | 75 | Claude Code |
| api-developmentMindrally/skills | Skill | 322 | 1mo ago | Apache-2.0 | A | 30 | Claude Code |
| go-api-developmentMindrally/skills | Skill | 322 | 1mo ago | Apache-2.0 | A | 31 | Claude Code |
| goMindrally/skills | Skill | 322 | 1mo ago | Apache-2.0 | A | 19 | Claude Code |
| aio-golang-masteryaiocean/claude-plugins | Skill | 4 | 4d ago | MIT | A | 111 | Claude Code |