MCP HubMCP Hub
SKILL·9D1C12

go-semantic-tools

eduardo-sl
업데이트됨 22 days ago
3 조회
68
9
68
GitHub에서 보기
문서wordaiapi

정보

이 스킬은 개발자가 텍스트 검색 대신 공식 툴체인을 사용해 Go 코드베이스를 의미론적으로 분석할 수 있도록 돕습니다. gopls를 통한 참조 및 구현 탐색, go list를 이용한 의존성 그래프 분석, go doc을 활용한 API 탐색 기능을 제공합니다. 변경 작업 전 호출자 찾기, 의존성 추적, 모듈 사용 현황 매핑과 같은 작업에 유용합니다.

빠른 설치

Claude Code

추천
기본
npx skills add eduardo-sl/go-agent-skills -a claude-code
플러그인 명령대체
/plugin add https://github.com/eduardo-sl/go-agent-skills
Git 클론대체
git clone https://github.com/eduardo-sl/go-agent-skills.git ~/.claude/skills/go-semantic-tools

Claude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요

문서

Go Semantic Tools

grep finds strings; the toolchain finds meaning. Method names repeat across types, interfaces are satisfied implicitly, and dot-imports lie to text search. Before changing shared code, get the truth from tools that understand types.

1. Choose the Tool

QuestionCommand
Where is this symbol used?gopls references file.go:LINE:COL
Where is it defined?gopls definition file.go:LINE:COL
Who implements this interface? / which interfaces does this type satisfy?gopls implementation file.go:LINE:COL
Who calls this function (transitively)?gopls call_hierarchy file.go:LINE:COL
What's in this package's API?go doc ./internal/service / go doc pkg Symbol
Which packages exist / depend on what?go list ./..., go list -deps, go list -json
Find a symbol by name across the modulegopls workspace_symbol Name
Symbols in one filegopls symbols file.go

Positions are file.go:line:column (1-based). Get line/column from a prior search or gopls symbols. All gopls commands run from within the module and need a warm build cache — run go build ./... once first.

2. Standard Investigation Flows

Before changing a function

gopls references internal/service/user.go:42:6   # every call site, typed
gopls call_hierarchy internal/service/user.go:42:6

Text search for Process( would surface every type's Process; references returns only this one's call sites — including usages via interfaces and embeddings that grep cannot see.

Mapping an interface

# On the interface name: all implementations
gopls implementation internal/store/store.go:15:6

# On a method of a concrete type: interfaces it satisfies
gopls implementation internal/store/postgres/user.go:30:18

Run this before adding a method to an interface — every implementation listed will break.

Understanding the dependency graph

go list ./...                                    # all packages
go list -f '{{.ImportPath}} -> {{join .Imports " "}}' ./... # direct edges
go list -deps ./cmd/api | grep myorg             # everything a binary pulls in
go list -json ./internal/service | jq .Imports   # machine-readable

Use this to verify layering claims ("domain imports nothing") instead of trusting directory names.

Exploring an unfamiliar API

go doc ./internal/payments            # package overview
go doc ./internal/payments Gateway    # one symbol, with doc comment
go doc -all ./internal/payments       # full API surface

Prefer this to opening files: it shows the exported contract without implementation noise.

3. Semantic Rename

gopls rename -w internal/service/user.go:42:6 ProcessOrder

Renames the symbol everywhere it's referenced — through interfaces, embedding, and test packages. Never rename an identifier with find-and-replace; UserID the field and UserID the local variable are different symbols with the same spelling.

4. Diagnostics Without an Editor

gopls check ./internal/...   # type errors + analyzer findings per file
go vet ./...                 # the vet suite standalone

gopls check surfaces the same diagnostics an IDE user sees — run it when reviewing code you haven't opened in an editor.

5. When grep Is Still Right

  • String literals: log messages, SQL, config keys, error text.
  • Comments, TODOs, documentation.
  • Code that doesn't compile yet — gopls needs a type-checkable package; grep works on broken trees.
  • Quick existence checks ("is this env var referenced anywhere?").

Rule of thumb: identifiers → gopls; literals and prose → grep.

Verification Checklist

  1. Call sites enumerated with gopls references (not grep) before changing any shared symbol
  2. Interface changes preceded by gopls implementation on the interface
  3. Renames performed with gopls rename -w, never text replacement
  4. Layering assumptions verified with go list import data
  5. Unfamiliar packages explored via go doc before reading implementations
  6. gopls check / go vet run when reviewing without an editor
  7. grep reserved for literals, comments, and non-compiling code

GitHub 저장소

eduardo-sl/go-agent-skills
경로: skills/(workflow)/go-semantic-tools
0
FAQ

자주 묻는 질문

go-semantic-tools Skill이란 무엇인가요?

go-semantic-tools은(는) eduardo-sl이(가) 만든 Claude Skill입니다. Skill은 Claude가 필요할 때 불러오는 지침과 리소스를 묶어 추가 프롬프트 없이 go-semantic-tools 관련 작업을 수행할 수 있게 합니다.

go-semantic-tools은(는) 어떻게 설치하나요?

이 페이지의 설치 명령을 사용하세요. go-semantic-tools을(를) Claude Code 플러그인으로 추가하거나 저장소를 skills 디렉터리에 복제한 다음 Claude를 다시 시작해 Skill을 불러옵니다.

go-semantic-tools은(는) 어떤 카테고리에 속하나요?

go-semantic-tools은(는) 문서 카테고리에 속합니다.

go-semantic-tools은(는) 무료로 사용할 수 있나요?

네. go-semantic-tools은(는) AIMCP에 등록되어 있으며 무료로 설치할 수 있습니다.

연관 스킬

railway-docs
문서

이 스킬은 Railway의 기능, 작동 방식 또는 특정 문서 URL에 대한 질문에 답하기 위해 최신 Railway 문서를 가져옵니다. 개발자들이 Railway의 공식 소스로부터 정확하고 최신 정보를 직접 받을 수 있도록 보장합니다. 사용자가 Railway의 작동 방식을 묻거나 Railway 문서를 참조할 때 사용하세요.

스킬 보기
n8n-code-python
문서

이 Claude Skill은 n8n의 Code 노드에서 Python 코드를 작성할 때 전문적인 지침을 제공하며, 특히 Python 표준 라이브러리 사용과 n8n의 특수 구문인 `_input`, `_json`, `_node` 작업에 중점을 둡니다. 이는 개발자가 n8n 내에서 Python의 제한 사항을 이해하도록 돕고, 대부분의 워크플로에는 JavaScript 사용을 권장하면서도 특정 데이터 변환 요구사항에 대한 Python 솔루션을 제안합니다.

스킬 보기
archon
문서

Archon 스킬은 REST API를 통해 RAG 기반 시맨틱 검색과 프로젝트 관리를 제공합니다. 이 스킬을 사용하여 문서 검색, 계층적 프로젝트/태스크 관리, 문서 업로드 기능을 갖춘 지식 검색을 수행할 수 있습니다. 외부 문서를 검색할 때는 다른 소스를 사용하기 전에 항상 Archon을 최우선으로 활용하세요.

스킬 보기
n8n-code-javascript
문서

이 Claude Skill은 n8n의 Code 노드에서 JavaScript 코드 작성에 대한 전문적인 지침을 제공합니다. `$input`/`$json` 변수, HTTP 헬퍼, DateTime 처리와 같은 필수적인 n8n 특정 구문을 다루며 일반적인 오류를 해결합니다. Code 노드에서 사용자 정의 JavaScript 처리가 필요한 n8n 워크플로우를 개발할 때 활용하세요.

스킬 보기