Extract a selected code block into a named function. Primary path uses the language server's extract-function code action; falls back to manual extraction when no code action is available. Validates captured variables, scope shadowing, and compilation after extraction.
安装
npx skills add blackwell-systems/agent-lsp --skill lsp-extract-functionnpx skills add blackwell-systems/agent-lsp --skill lsp-extract-function -a claude-code -gnpx skills add blackwell-systems/agent-lsp --skill lsp-extract-function -a codex -ggemini skills install https://github.com/blackwell-systems/agent-lsp.git --path skills/lsp-extract-functiongh skill install blackwell-systems/agent-lsp lsp-extract-functiongit clone --depth 1 https://github.com/blackwell-systems/agent-lsp /tmp/blackwell-systems__agent-lsp
mkdir -p ~/.claude/skills ~/.agents/skills
cp -R /tmp/blackwell-systems__agent-lsp/skills/lsp-extract-function ~/.claude/skills/lsp-extract-function # Claude Code
cp -R /tmp/blackwell-systems__agent-lsp/skills/lsp-extract-function ~/.agents/skills/lsp-extract-function # Codex, Cursor, Gemini CLI, Copilot, OpenCode