정보
이 Claude Skill은 개발자가 godoc 주석, 패키지 문서, 테스트 가능한 예시와 같은 표준 규약을 따라 Go 문서를 작성하도록 도와줍니다. 패키지나 함수에 문서를 추가하거나 사용 중단 알림을 생성하는 작업에 사용할 수 있습니다. 이 기능은 커밋 메시지나 README 파일이 아닌 코드 수준의 문서 작성에 특화되어 있습니다.
빠른 설치
Claude Code
추천npx skills add eduardo-sl/go-agent-skills -a claude-code/plugin add https://github.com/eduardo-sl/go-agent-skillsgit clone https://github.com/eduardo-sl/go-agent-skills.git ~/.claude/skills/go-documentationClaude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요
문서
Go Documentation
Godoc is not free-form prose — it's a convention the toolchain renders. Comments that follow the convention become browsable documentation on pkg.go.dev; comments that don't become noise.
1. Doc Comment Form
Every exported identifier gets a doc comment. It starts with the identifier's name and is a complete sentence:
// ✅ Good
// ParseDuration parses a duration string such as "300ms" or "2h45m".
// It returns an error if the string is not a valid duration.
func ParseDuration(s string) (Duration, error) { ... }
// ❌ Bad — doesn't start with the name, fragment, restates signature
// this function parses durations
func ParseDuration(s string) (Duration, error) { ... }
- Groups of related constants/variables may share one comment on the
block:
// Common HTTP methods.above theconst (...)group. - Unexported identifiers: comment when the purpose isn't obvious from the name — same form, no obligation.
- Say what the caller needs: behavior, error conditions, nil/zero-value handling, concurrency safety. Not the implementation.
2. Package Documentation
One package comment per package, on the package clause. For more than
a few sentences, put it in a dedicated doc.go:
// Package retry implements backoff strategies for retrying failed
// operations.
//
// The zero value of Policy retries three times with exponential
// backoff. Use functional options to customize:
//
// p := retry.NewPolicy(retry.WithMaxAttempts(5))
// err := p.Do(ctx, fetchUser)
package retry
- Begins with "Package <name> ...".
- Indented lines (one tab) render as code blocks.
mainpackages: the comment describes the command and its flags — it becomes the command's documentation.
3. Doc Links and Formatting (Go 1.19+)
// Fetch retrieves the resource. It honors the deadline of ctx and
// returns [ErrNotFound] if the resource does not exist.
//
// For batch retrieval use [Client.FetchAll]. See the [net/http]
// package for transport configuration.
func (c *Client) Fetch(ctx context.Context, id string) (*Resource, error)
[Name],[Type.Method],[pkg/path]become hyperlinks on pkg.go.dev.- A line starting with
#is a heading (rare; only in long package docs). - Lists: lines starting with a space and a bullet. Keep them shallow.
4. Testable Examples
Example functions are documentation the compiler checks. Put them in
example_test.go in the <pkg>_test package:
func ExampleParseDuration() {
d, _ := ParseDuration("1h30m")
fmt.Println(d.Minutes())
// Output: 90
}
// Method example: ExampleType_Method
func ExamplePolicy_Do() { ... }
// Second example for the same symbol: suffix
func ExampleParseDuration_negative() { ... }
- The
// Output:comment makes it a test —go testfails if the printed output differs. Examples without it compile but don't run. - Write an example for every non-trivial exported API. It renders directly under the symbol on pkg.go.dev.
5. Deprecation
// Fetch retrieves the resource.
//
// Deprecated: Use [Client.FetchContext] instead, which honors
// context cancellation.
func (c *Client) Fetch(id string) (*Resource, error)
- The paragraph must start exactly with
Deprecated:. - Always name the replacement.
- Tools (gopls, staticcheck, pkg.go.dev) surface these automatically.
6. What NOT to Write
// ❌ Noise — restates the code
// GetName returns the name.
func (u *User) GetName() string { return u.name }
// ❌ Maintenance history — belongs in git
// Changed 2024-03-01 by alice: added caching.
// ❌ Commented-out code kept "for reference"
If a doc comment can only restate the signature, improve the name until the comment says something the signature can't — or accept a minimal comment for symmetry in a fully documented API.
Executable Verification
go vet ./... # flags some malformed doc comments
gofmt -l . # Go 1.19+ gofmt normalizes doc comments
go test ./... # runs Example functions with Output
go doc ./mypkg Symbol # render what users will actually see
For a browsable preview, run a local pkgsite if available:
go run golang.org/x/pkgsite/cmd/pkgsite@latest and open the module.
Verification Checklist
- Every exported identifier has a doc comment starting with its name
- Package has a package comment ("Package <name> ..."), in doc.go if long
- Error conditions and nil/zero-value behavior documented for exported APIs
- Concurrency safety stated where callers could guess wrong
[Symbol]doc links used instead of bare names in running text- Non-trivial exported APIs have Example functions with
// Output: - Deprecations use the exact
Deprecated:form and name a replacement - No comments restating signatures, tracking history, or holding dead code
go test ./...passes with examples enabled
GitHub 저장소
자주 묻는 질문
go-documentation Skill이란 무엇인가요?
go-documentation은(는) eduardo-sl이(가) 만든 Claude Skill입니다. Skill은 Claude가 필요할 때 불러오는 지침과 리소스를 묶어 추가 프롬프트 없이 go-documentation 관련 작업을 수행할 수 있게 합니다.
go-documentation은(는) 어떻게 설치하나요?
이 페이지의 설치 명령을 사용하세요. go-documentation을(를) Claude Code 플러그인으로 추가하거나 저장소를 skills 디렉터리에 복제한 다음 Claude를 다시 시작해 Skill을 불러옵니다.
go-documentation은(는) 어떤 카테고리에 속하나요?
go-documentation은(는) 테스팅 카테고리에 속합니다.
go-documentation은(는) 무료로 사용할 수 있나요?
네. go-documentation은(는) AIMCP에 등록되어 있으며 무료로 설치할 수 있습니다.
연관 스킬
이 Claude Skill은 MMLU, GSM8K를 포함한 60개 이상의 표준화된 학술 과제에서 LLM 성능을 벤치마크하기 위해 lm-evaluation-harness를 실행합니다. 개발자들이 모델 품질을 비교하고, 학습 진행 상황을 추적하거나 학술 결과를 보고할 수 있도록 설계되었습니다. 이 도구는 HuggingFace와 vLLM 모델을 포함한 다양한 백엔드를 지원합니다.
이 스킬은 cron 표현식을 사용하여 Worker를 스케줄링하기 위한 Cloudflare Cron Triggers 구현에 관한 포괄적인 지식을 제공합니다. 주기적 작업, 유지보수 작업, 자동화된 워크플로우 설정 방법을 다루며, 잘못된 cron 표현식이나 시간대 문제 같은 일반적인 이슈들을 해결하는 방법을 포함합니다. 개발자들은 이를 통해 스케줄된 핸들러 구성, cron 트리거 테스트, Workflows 및 Green Compute와의 연동 작업을 수행할 수 있습니다.
이 Claude Skill은 Python 스크립트를 통해 로컬 웹 애플리케이션을 테스트하기 위한 Playwright 기반 툴킷을 제공합니다. 프론트엔드 검증, UI 디버깅, 스크린샷 캡처, 로그 확인 기능을 지원하며 서버 라이프사이클을 관리합니다. 브라우저 자동화 작업에 사용하되 컨텍스트 오염을 방지하기 위해 소스 코드를 읽지 않고 스크립트를 직접 실행하세요.
이 스킬은 테스트 통과를 확인한 후 체계적인 통합 옵션을 제시하여 개발자가 완성된 작업을 마무리하도록 돕습니다. 구현이 완료된 후 머지, PR 생성, 브랜치 정리와 같은 워크플로우를 안내합니다. 코드가 준비되고 테스트가 완료되었을 때 개발 프로세스를 체계적으로 마무리하기 위해 사용하세요.
