lsp-generate
정보
lsp-generate 스킬은 인터페이스 스텁 구현, 테스트 스켈레톤 생성, 목 타입 생성과 같은 언어 서버 코드 생성 기능을 트리거합니다. 이 스킬은 suggest_fixes를 통해 사용 가능한 생성 옵션을 표시하고 execute_command를 통해 이를 실행합니다. 파일에 아직 존재하지 않는 새로운 코드를 빠르게 스캐폴딩해야 할 때 이 스킬을 사용하세요.
빠른 설치
Claude Code
추천npx skills add blackwell-systems/agent-lsp -a claude-code/plugin add https://github.com/blackwell-systems/agent-lspgit clone https://github.com/blackwell-systems/agent-lsp.git ~/.claude/skills/lsp-generateClaude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요
문서
Requires the agent-lsp MCP server.
lsp-generate
lsp-generate creates NEW code that does not yet exist in the file — stubs,
mocks, implementations of interfaces, test functions. It is distinct from
lsp-extract-function, which restructures code that already exists. Use
lsp-generate when you want the language server to write something new; use
lsp-extract-function when you want to reorganize existing code.
Input
file_path: absolute path to the target fileline,column(orposition_pattern): position in the file where generation is triggered (e.g., the line with the unimplemented interface, the missing method error, the type declaration)intent: description of what to generate (e.g., "implement io.Reader", "generate test skeleton", "add missing methods", "generate mock for Handler")
Prerequisites
LSP must be running for the target workspace. If not yet initialized, call
mcp__lsp__start_lsp with the workspace root before proceeding.
Auto-init note: agent-lsp supports workspace auto-inference from file paths.
Explicit start_lsp is only needed when switching workspace roots.
Workflow
Step 1 — Open document and locate position
Call mcp__lsp__open_document for the target file:
mcp__lsp__open_document(file_path: "/abs/path/to/file.go", language_id: "go")
If using position_pattern, use the @@ marker convention from
references/patterns.md to identify the exact cursor position. For example:
"position_pattern": "var _ io.Reade@@r = (*MyType)(nil)"
Step 2 — Get code actions at target position
mcp__lsp__suggest_fixes({
"file_path": "...",
"start_line": N,
"start_column": C,
"end_line": N,
"end_column": C
})
Filter for generator actions:
- Kind
"quickfix"with titles matching the intent (e.g., "Implement interface", "Generate", "Add stub", "Create test") - Kind
"source"for source-level generation
If no matching action is found, report "No generator action available at this position for the given intent" and proceed to the Fallback section below.
Step 3 — Select and confirm action
Display available generator actions to the user. If multiple actions match the intent, list all of them and ask which to apply. Confirm the selected action before executing — do NOT auto-select when multiple candidates exist.
Step 4 — Execute generator
Execute one generator at a time. Do NOT batch multiple execute_command calls.
- If the action has a
commandfield: run viamcp__lsp__execute_command - If the action has an
editfield: apply viamcp__lsp__apply_edit - If the action has both: apply the edit first, then run the command
Step 5 — Format and verify
mcp__lsp__format_document({ "file_path": "..." })
mcp__lsp__get_diagnostics({ "file_path": "..." })
Report remaining diagnostics. Stub methods typically leave TODO comments or
panic("not implemented") bodies — this is expected behavior from the language
server. Surface any unexpected errors.
Per-Language Generator Patterns
| Language | Generator | Trigger location | Code action kind |
|---|---|---|---|
| Go (gopls) | Implement interface | Line with var _ MyInterface = (*MyType)(nil) or type declaration | quickfix — "Implement interface" |
| Go (gopls) | Generate test file | Any .go file without _test.go counterpart | source — "Generate unit tests" |
| Go (gopls) | Add missing method | Line with undefined: method error | quickfix |
| TypeScript (typescript-language-server) | Implement interface | Class declaration | quickfix — "Implement interface members" |
| TypeScript (typescript-language-server) | Add missing method | Method call with no definition | quickfix — "Add missing function declaration" |
| Python (pyright) | Add import | Name not defined | quickfix — "Add import" |
| Rust (rust-analyzer) | Implement trait | impl Trait for Type {} | quickfix — "Add missing impl members" |
Fallback When No Code Action Is Available
If suggest_fixes returns no generator actions, the language server at this
workspace may not support server-side generation for this intent. Explain this
to the user and suggest a manual approach specific to the intent:
- Interface implementation: Look up the interface definition first using
mcp__lsp__go_to_symbolto discover all required methods, then implement them manually. - Test skeleton: Check
mcp__lsp__get_server_capabilitiesto confirm whether the server advertises code action support; if not, generate the test skeleton manually using standard testing package conventions. - Missing methods: Use
mcp__lsp__get_diagnosticsto enumerate the missing symbols by name, then implement them one at a time.
Constraints
- Do NOT batch
execute_commandcalls — run one generator at a time - Do NOT skip user confirmation when multiple generator actions are available
GitHub 저장소
연관 스킬
content-collections
메타이 스킬은 콘텐츠 콜렉션(Content Collections)을 위한 프로덕션 검증된 설정을 제공합니다. 콘텐츠 콜렉션은 Markdown/MDX 파일을 Zod 검증이 포함된 타입 안전한 데이터 콜렉션으로 변환해주는 TypeScript 최우선 도구입니다. 블로그, 문서 사이트 또는 콘텐츠 중심의 Vite + React 애플리케이션을 구축할 때 타입 안전성과 자동 콘텐츠 검증을 보장하기 위해 사용하세요. Vite 플러그인 구성과 MDX 컴파일부터 배포 최적화 및 스키마 검증에 이르기까지 모든 것을 다룹니다.
polymarket
메타이 스킬은 개발자들이 Polymarket 예측 시장 플랫폼을 활용한 애플리케이션을 구축할 수 있도록 지원하며, 거래 및 시장 데이터를 위한 API 통합 기능을 포함합니다. 또한 WebSocket을 통한 실시간 데이터 스트리밍을 제공하여 실시간 거래와 시장 활동을 모니터링할 수 있습니다. 이를 통해 거래 전략을 구현하거나 실시간 시장 업데이트를 처리하는 도구를 생성하는 데 활용할 수 있습니다.
creating-opencode-plugins
메타이 스킬은 개발자들이 명령어, 파일, LSP 작업 등 25개 이상의 이벤트 유형에 연결되는 OpenCode 플러그인을 만들 수 있도록 돕습니다. JavaScript/TypeScript 모듈을 위한 플러그인 구조, 이벤트 API 명세, 구현 패턴을 제공합니다. OpenCode AI 어시스턴트의 라이프사이클을 사용자 정의 이벤트 기반 로직으로 가로채거나, 모니터링하거나, 확장해야 할 때 사용하세요.
sglang
메타SGLang은 RadixAttention 프리픽스 캐싱을 활용하여 JSON, 정규식, 에이전트 워크플로우를 위한 고속 구조화 생성에 특화된 고성능 LLM 서빙 프레임워크입니다. 특히 반복되는 프리픽스가 있는 작업에서 상당히 빠른 추론 속도를 제공하여 복잡한 구조화 출력 및 다중 턴 대화에 이상적입니다. 제약 디코딩이 필요하거나 광범위한 프리픽스 공유가 있는 애플리케이션을 구축할 때는 vLLM과 같은 대안보다 SGLang을 선택하십시오.
