lsp-generate

Solid

Trigger language server code generation — implement interface stubs, generate test skeletons, add missing methods, generate mock types. Uses suggest_fixes to surface generator options and execute_command to run them.

AI & Automation 56 stars 2 forks Updated today MIT

Install

View on GitHub

Quality Score: 91/100

Stars 20%
58
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

> 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 file - **`line`, `column`** (or **`position_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:...

Details

Author
blackwell-systems
Repository
blackwell-systems/agent-lsp
Created
2 months ago
Last Updated
today
Language
Go
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category