go-expert skillA
go-expert is agent-read markdown (skill) from leeyudok/doksam-skills: Go 코드를 작성·리뷰·리팩터링하거나 에러 처리, 동시성, 테스트, net/http 서버, go:embed 를 다룰 때 사용한다. Go 1.22+ 기준..
Indexed from public GitHub and served as immutable, content-addressed versions. Install it pinned to an exact SHA-256 with the mdr CLI, and every file is verified against the hash recorded here before it reaches your agent. The deterministic audit below grades the latest version, and the same file always earns the same grade.
What the file says
# 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` 은 프로그래머 오류에만. 입력이 잘못된 것은 에러다.
```go
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
…Read the whole file at its exact version.
How to install
mdr add leeyudok/doksam-skills/go-expert@git:20260803.36bddecmdr add leeyudok/doksam-skills/go-expert@sha256:cfa22075709855fcPin to a label to follow the author's releases, or to a sha256 to freeze the exact bytes forever. Either way the resolved hash is written to mdr.lock, and mdr install reproduces it on any machine.
[](https://markdownregistry.com/a/art_rtmprgf5lzkvrbtj)
1 badge views in 30 days
Versions
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (6593 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
leeyudok/doksam-skills · 12 stars · license MIT · pushed 2026-09-23 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_rtmprgf5lzkvrbtj GET https://markdownregistry.com/api/v1/resolve?ref=leeyudok/doksam-skills/go-expert GET https://markdownregistry.com/api/v1/blob/cfa22075709855fcc032f25ebdc0873de59dc6f459557c549da29df1377e479c
Your agent does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.