lsp-extract-function
Installation
SKILL.md
Requires the agent-lsp MCP server.
lsp-extract-function: Extract Code Block into a Named Function
This skill RESTRUCTURES existing code — it takes code that already exists
and moves it into a new function. This is distinct from /lsp-generate, which
creates NEW code that does not yet exist (stubs, mocks, interface implementations).
Use this skill when the code is already written; use /lsp-generate when you
need to generate code from scratch.
Invocation: User provides file_path (absolute path), start_line and
end_line (1-indexed range), and new_function_name (desired name for the
extracted function).