Agent skill

Lsp Generate

by blackwell-systems in blackwell-systems/agent-lsp

Trigger language server code generation — implement interface stubs, generate test skeletons, add missing methods, generate mock types.

MITAuto-check passedTesting & QA

Install Lsp Generate

skills CLI
$ npx skills add blackwell-systems/agent-lsp --skill lsp-generate -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install blackwell-systems/agent-lsp lsp-generate --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/blackwell-systems/agent-lsp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/lsp-generate .claude/skills/lsp-generate && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
lsp-generate
GitHub stars
160
Token cost
~1.4k tokens
SKILL.md length
582 words
Files
2 (incl. references)
Skills in repo
24
Repo updated
First seen
Licence
MIT

At a glance

Trigger language server code generation — implement interface stubs, generate test skeletons, add missing methods, generate mock types.

  • Works in 5 steps: Open document and locate position → Get code actions at target position → Select and confirm action → …
  • Language server code generation — implement interface stubs
  • SKILL.md covers Input, Prerequisites, Workflow and Per-Language Generator Patterns, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Lsp Generate is an agent skill from blackwell-systems/agent-lsp. Trigger language server code generation — implement interface stubs, generate test skeletons, add missing methods, generate mock types. Uses suggestfixes to surface generator options and executecommand to run them.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/patterns.md`). Compatibility notes: Requires the agent-lsp MCP server (github.com/blackwell-systems/agent-lsp)

It sits in Testing & QA, covering Test generation. It works with Model Context Protocol. The repository describes itself as: MCP server that orchestrates language servers into agent-native workflows. 65 tools, 30 CI-verified languages. The licence is MIT.

When your agent uses it

  • Language server code generation — implement interface stubs
  • Generate test skeletons
  • Add missing methods
  • Generate mock types

Example prompts

  • “/lsp-generate”

Requirements

  • Python 3
  • Compatibility (from SKILL.md): Requires the agent-lsp MCP server (github.com/blackwell-systems/agent-lsp)
  • Pre-approved tools (allowed-tools): mcp__lsp__suggest_fixes, mcp__lsp__execute_command, mcp__lsp__apply_edit, mcp__lsp__format_document, mcp__lsp__get_diagnostics, mcp__lsp__open_document, mcp__lsp__get_server_capabilities, mcp__lsp__go_to_symbol

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Open document and locate position
  2. Get code actions at target position
  3. Select and confirm action
  4. Execute generator
  5. Format and verify

What it can do on your machine

Read from SKILL.md and the folder at commit 38ca488. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • mcp__lsp__suggest_fixes
    • mcp__lsp__execute_command
    • mcp__lsp__apply_edit
    • mcp__lsp__format_document
    • mcp__lsp__get_diagnostics
    • mcp__lsp__open_document
    • mcp__lsp__get_server_capabilities
    • mcp__lsp__go_to_symbol

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires the agent-lsp MCP server (github.com/blackwell-systems/agent-lsp)

    From compatibility in the SKILL.md frontmatter.

Context cost

Lsp Generate loads about 1.4k tokens when it runs, and up to ~1.9k if it reads all its reference files. Until then it costs about 57 tokens; SKILL.md has 582 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~57
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from blackwell-systems/agent-lsp at commit 38ca488, republished under its MIT licence (© blackwell-systems). 582 words, ~1,444 tokens.

Download SKILL.mdSave it as .claude/skills/lsp-generate/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
lsp-generate
description
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.
allowed-tools
mcp__lsp__suggest_fixes, mcp__lsp__execute_command, mcp__lsp__apply_edit, mcp__lsp__format_document, mcp__lsp__get_diagnostics, mcp__lsp__open_document, mcp__lsp__get_server_capabilities, mcp__lsp__go_to_symbol
compatibility
Requires the agent-lsp MCP server (github.com/blackwell-systems/agent-lsp)
argument-hint
[file-path:line:col] [generation-intent]
user-invocable
true
license
MIT
metadata.required-capabilities
codeActionProvider
metadata.optional-capabilities
workspaceSymbolProvider documentFormattingProvider

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:

"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 command field: run via mcp__lsp__execute_command
  • If the action has an edit field: apply via mcp__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.


Show full SKILL.md (225 more words)Show less

Per-Language Generator Patterns

LanguageGeneratorTrigger locationCode action kind
Go (gopls)Implement interfaceLine with var _ MyInterface = (*MyType)(nil) or type declarationquickfix — "Implement interface"
Go (gopls)Generate test fileAny .go file without _test.go counterpartsource — "Generate unit tests"
Go (gopls)Add missing methodLine with undefined: method errorquickfix
TypeScript (typescript-language-server)Implement interfaceClass declarationquickfix — "Implement interface members"
TypeScript (typescript-language-server)Add missing methodMethod call with no definitionquickfix — "Add missing function declaration"
Python (pyright)Add importName not definedquickfix — "Add import"
Rust (rust-analyzer)Implement traitimpl 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_symbol to discover all required methods, then implement them manually.
  • Test skeleton: Check mcp__lsp__get_server_capabilities to 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_diagnostics to enumerate the missing symbols by name, then implement them one at a time.

Constraints

  • Do NOT batch execute_command calls — run one generator at a time
  • Do NOT skip user confirmation when multiple generator actions are available

© blackwell-systems, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/lsp-generate of blackwell-systems/agent-lsp.

  • SKILL.md
  • references/patterns.md

Open the folder on GitHubat commit 38ca488

Compare with similar skills

Lsp Generate next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Lsp Generate compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Lsp Generate this skillblackwell-systems/agent-lsp160—~1.4kAutomated safety check: PassMIT
Chatgpt App Submissionnteract/semiotic2.7k—~2.8kAutomated safety check: PassApache-2.0
Test ScopeGlitterKill/sdl-mcp491—~586Automated safety check: PassCustom licence
Opik Verifycomet-ml/opik-mcp220—~2.8kAutomated safety check: NotesApache-2.0
Opik Testcomet-ml/opik-mcp220—~2.8kAutomated safety check: NotesApache-2.0
Mps Run ConfigurationsJetBrains/MPS1.7k—~1.5kAutomated safety check: PassApache-2.0

Similar skills

  • Chatgpt App Submission

    nteract/semiotic

    Inspect a ChatGPT Apps MCP server codebase and generate chatgpt-app-submission.json with app info suggestions, tool hint justifications, test cases, and negative test cases, then report review-check…

    2.7k GitHub stars~2.8k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Test Scope

    GlitterKill/sdl-mcp

    Determine which test suites are affected by recent code changes and run only the relevant ones.

    491 GitHub stars~586 tokensUpdated 18 days ago
    Testing & QAAuto-check passed
  • Opik Verify

    comet-ml/opik-mcp

    Decide ship or hold for a candidate from the compare skill's numbers, against an explicit release policy — regressions, pass rate, safety-tagged cases, subgroup consistency, latency and cost…

    220 GitHub stars~2.8k tokensUpdated yesterday
    Testing & QAAuto-check: notes
  • Opik Test

    comet-ml/opik-mcp

    Turn a failing Opik trace (or a described failure) into a repeatable regression check — a test-suite item with the trace's input and one or two binary assertions — so a fix can be verified by the…

    220 GitHub stars~2.8k tokensUpdated yesterday
    Testing & QAAuto-check: notes
  • Official

    Create and execute IDE run configurations for MPS root nodes via MPS MCP — Java Application for IMainClass / ClassConcept with main, JUnit Tests for ITestCase.

    1.7k GitHub stars~1.5k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Create Test Run

    jeremylongshore/tons-of-skills-marketplace

    Create a Kobiton test run from a test case or suite, then offer to monitor it.

    2.8k GitHub stars~3k tokensUpdated yesterday
    Testing & QAAuto-check passed

More from blackwell-systems/agent-lsp

All 24 skills in this repo
  • Lsp Dead Code

    blackwell-systems/agent-lsp

    Enumerate exported symbols in a file and surface those with zero references across the workspace.

    160 GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Lsp Edit Export

    blackwell-systems/agent-lsp

    Safe workflow for editing exported symbols or public APIs. An agent skill from blackwell-systems/agent-lsp.

    160 GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Lsp Fix All

    blackwell-systems/agent-lsp

    Apply available quick-fix code actions for all current diagnostics in a file, one at a time with re-collection between each fix.

    160 GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Lsp Impact

    blackwell-systems/agent-lsp

    Blast-radius analysis for a symbol or file — shows all callers, type supertypes/subtypes, and reference count before you change it.

    160 GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Lsp Rename

    blackwell-systems/agent-lsp

    Two-phase safe rename across the entire workspace. An agent skill from blackwell-systems/agent-lsp.

    160 GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Lsp Simulate

    blackwell-systems/agent-lsp

    Speculative code editing session — simulate changes in memory before touching disk.

    160 GitHub stars~1.8k tokensUpdated today
    Auto-check passed

Questions about Lsp Generate

What does Lsp Generate do?

Trigger language server code generation — implement interface stubs, generate test skeletons, add missing methods, generate mock types. Lsp Generate is an agent skill from blackwell-systems/agent-lsp. Trigger language server code generation — implement interface stubs, generate test skeletons, add missing methods, generate mock types.

When should I use Lsp Generate?

Lsp Generate fits situations like: language server code generation — implement interface stubs; generate test skeletons; add missing methods; generate mock types.

How do I install Lsp Generate in Claude Code?

Run `npx skills add blackwell-systems/agent-lsp --skill lsp-generate -a claude-code`. Or copy the skill folder (skills/lsp-generate in blackwell-systems/agent-lsp) into .claude/skills/lsp-generate in your project. Claude Code loads it when a task matches its description.

How do I install Lsp Generate in Codex?

Run `npx skills add blackwell-systems/agent-lsp --skill lsp-generate -a codex`. Or copy the skill folder (skills/lsp-generate in blackwell-systems/agent-lsp) into .agents/skills/lsp-generate in your project. Codex loads it when a task matches its description.

Can I use Lsp Generate in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add blackwell-systems/agent-lsp --skill lsp-generate -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/lsp-generate, .gemini/skills/lsp-generate, .github/skills/lsp-generate and .opencode/skills/lsp-generate in your project.

What does Lsp Generate need to run?

SKILL.md names no scripts, command-line tools or credentials: Lsp Generate is instructions for the agent only. Our summary lists: Python 3. Its frontmatter pre-approves these tools: mcp__lsp__suggest_fixes, mcp__lsp__execute_command, mcp__lsp__apply_edit, mcp__lsp__format_document, mcp__lsp__get_diagnostics, mcp__lsp__open_document, mcp__lsp__get_server_capabilities, mcp__lsp__go_to_symbol. Compatibility (from SKILL.md): Requires the agent-lsp MCP server (github.com/blackwell-systems/agent-lsp).

Does Lsp Generate access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Lsp Generate safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Lsp Generate use?

Lsp Generate is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Lsp Generate use?

About 1.4k tokens (SKILL.md is roughly 5.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 499 tokens, read only when the agent opens those files.

What are the alternatives to Lsp Generate?

Skills that share tags, products or a category with Lsp Generate: Chatgpt App Submission (nteract/semiotic, 2.7k stars), Test Scope (GlitterKill/sdl-mcp, 491 stars), Opik Verify (comet-ml/opik-mcp, 220 stars) and Opik Test (comet-ml/opik-mcp, 220 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Lsp Generate?

blackwell-systems (a GitHub user) maintains it in blackwell-systems/agent-lsp, which has 160 GitHub stars. The repository holds 24 skills in this directory. The repository was last updated on October 9, 2026.

Source: blackwell-systems/agent-lsp on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.