lsp-extract-function
CommunityTurn code blocks into named functions with LSP.
Software Engineering#automation#refactor#lsp#software-engineering#extract-function#code-edit#code-action
Authorblackwell-systems
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Extract a selected code block into a named function using the language server's extract-function code action or a manual fallback.
Core Features & Use Cases
- Primary path uses the language server's extract-function code action to create a new function from a selected block, preserving variables and scope.
- Manual fallback extracts the block when code actions are unavailable, validating captured variables, shadowing, and return values to ensure correctness.
- Supports validating and applying edits via the MCP LSP tools, enabling safe refactoring during code editing workflows.
Quick Start
Provide the file_path, start_line, end_line, and new_function_name to extract the selected block.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: lsp-extract-function Download link: https://github.com/blackwell-systems/agent-lsp/archive/main.zip#lsp-extract-function Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.