一键导入
lsp-setup
Auto-discovers and configures Language Server Protocol (LSP) servers for your project's languages
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Auto-discovers and configures Language Server Protocol (LSP) servers for your project's languages
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Orchestrate large-scale changes across a codebase in parallel
Review changed code for reuse, quality, and efficiency, then fix any issues found
Consolidated Claude Code sync and parity tracking for RustyClawd. Fetches latest Claude Code features from official sources, compares against the local feature inventory, identifies gaps, and optionally creates GitHub issues. Also supports deep analysis by deminifying the installed Claude Code cli.js.
Track and report agent invocation metrics including usage counts, success/failure rates, and completion times. Use for understanding which agents are utilized, identifying underused agents, and optimizing agent delegation patterns.
Automated dependency conflict detection and resolution. Detects local vs CI environment mismatches, compares versions, and generates pinning recommendations. Run as pre-push check to catch issues early.
Multi-repository orchestration for coordinating atomic changes across dependent repositories. Tracks dependency graphs, coordinates cross-repo PRs, and detects breaking changes.
| name | lsp-setup |
| description | Auto-discovers and configures Language Server Protocol (LSP) servers for your project's languages |
| type | skill |
| activationStrategy | lazy-aggressive |
| activationKeywords | ["LSP","Language Server Protocol","LSP setup","LSP configuration","configure LSP","enable LSP","lsp-setup","language server","code intelligence","code completion","pyright","rust-analyzer","gopls"] |
| activationContextWindow | 3 |
| persistenceThreshold | 20 |
Manual control and troubleshooting for Language Server Protocol (LSP) configuration.
You probably don't need this skill! LSP is configured automatically when you run amplihack claude.
When amplihack launches Claude Code, it automatically:
ENABLE_LSP_TOOL=1 environment variable.envYou'll see: 📡 LSP: Detected 3 language(s): python, javascript... when amplihack starts Claude Code.
Use /lsp-setup only when you need to:
/lsp-setup --status-only)/lsp-setup --force)Don't use this skill if: LSP is already working! The automatic setup handles 99% of cases.
The LSP Setup skill provides manual control over the same LSP auto-configuration that happens automatically at launch. It supports 16 popular programming languages out of the box and gives you direct access to configuration, status checking, and troubleshooting.
When LSP is properly configured, Claude Code gains powerful code intelligence capabilities that enhance the AI's understanding of your codebase:
Type Information - Claude can see the exact types of variables, functions, and classes:
# Claude can hover over 'user' and see: Type: User (class from models.py)
user = get_current_user()
Go to Definition - Claude can jump to where symbols are defined:
# Claude can navigate from 'authenticate()' call to its definition in auth.py
result = authenticate(credentials)
Code Diagnostics - Claude receives real-time error detection from LSP servers:
# Pyright reports: "Set" is not accessed
from typing import List, Set # Claude sees this warning
Better Code Understanding - Instead of guessing types and behavior, Claude gets precise information from LSP servers about:
Smarter Suggestions - With LSP data, Claude provides:
Example Workflow:
You: "Fix the type error in user_service.py"
Without LSP: Claude reads the file, guesses at types, may miss subtle issues
With LSP: Claude receives diagnostic:
Line 42: Expected type 'User | None', got 'str'
→ Claude provides exact fix based on actual type information
After /lsp-setup configures your project:
LSP enhances Claude's capabilities behind the scenes. You don't interact with LSP directly - it makes Claude smarter about your code automatically.
Use /lsp-setup when you:
Claude Code's LSP system uses a three-layer architecture that must all be configured for LSP features to work:
Layer 1: System LSP Binaries (User-installed)
npm install -g pyright installs the Pyright LSP server binaryLayer 2: Claude Code LSP Plugins (Installed via cclsp)
npx cclsp install <server-name>cclsp tool uses the claude-code-lsps plugin marketplaceLayer 3: Project Configuration (.env file)
ENABLE_LSP_TOOL=1 to activate LSP features.env at project rootImportant: cclsp and claude-code-lsps work together. cclsp is the installation tool, claude-code-lsps is the plugin marketplace it uses. They are complementary, not alternatives.
The /lsp-setup skill automates the workflow from npx cclsp@latest setup:
Scans your project directory to identify programming languages based on file extensions and framework markers. Detects 16 languages including Python, TypeScript, JavaScript, Rust, Go, Java, and more.
Generates the appropriate LSP server configuration for each detected language. Checks if:
Provides installation guidance if either is missing. NEVER auto-installs - user has full control.
Creates or updates .env file with project-specific LSP settings (Layer 3):
Tests each LSP server connection and reports status. Provides actionable guidance for any configuration issues.
/lsp-setup
Detects all languages in your project and configures LSP servers automatically.
/lsp-setup --status-only
Reports current LSP configuration and server availability without making changes.
/lsp-setup --force
Regenerates LSP configuration even if valid configuration already exists.
/lsp-setup --languages python,typescript
Configures LSP servers only for specified languages.
If you need to manage Claude Code LSP plugins directly, use the cclsp command:
# Install a plugin (Layer 2)
npx cclsp install pyright
# List installed plugins
npx cclsp list
# Remove a plugin
npx cclsp remove pyright
# Full setup workflow (what /lsp-setup automates)
npx cclsp@latest setup
The /lsp-setup skill automates the npx cclsp@latest setup workflow, adding intelligent language detection and project-specific configuration.
| Language | LSP Server | System Binary Installation (Layer 1) | Claude Code Plugin (Layer 2) |
|---|---|---|---|
| Python | pyright | npm install -g pyright | npx cclsp install pyright |
| TypeScript | vtsls | npm install -g @vtsls/language-server | npx cclsp install vtsls |
| JavaScript | vtsls | npm install -g @vtsls/language-server | npx cclsp install vtsls |
| Rust | rust-analyzer | rustup component add rust-analyzer | npx cclsp install rust-analyzer |
| Go | gopls | go install golang.org/x/tools/gopls@latest | npx cclsp install gopls |
| Java | jdtls | Download from eclipse.org/jdtls | npx cclsp install jdtls |
| C/C++ | clangd | brew install llvm (macOS) / apt install clangd (Linux) | npx cclsp install clangd |
| C# | omnisharp | Download from omnisharp.net | npx cclsp install omnisharp |
| Ruby | ruby-lsp | gem install ruby-lsp | npx cclsp install ruby-lsp |
| PHP | phpactor | composer global require phpactor/phpactor | npx cclsp install phpactor |
| Bash | bash-language-server | npm install -g bash-language-server | npx cclsp install bash-language-server |
| YAML | yaml-language-server | npm install -g yaml-language-server | npx cclsp install yaml-language-server |
| JSON | vscode-json-languageserver | npm install -g vscode-json-languageserver | npx cclsp install vscode-json-languageserver |
| HTML | vscode-html-languageserver | npm install -g vscode-html-languageserver | npx cclsp install vscode-html-languageserver |
| CSS | vscode-css-languageserver | npm install -g vscode-css-languageserver | npx cclsp install vscode-css-languageserver |
| Markdown | marksman | brew install marksman (macOS) / Download from GitHub | npx cclsp install marksman |
Note: Both Layer 1 (system binary) and Layer 2 (Claude Code plugin) must be installed for LSP features to work.
$ cd my-python-project
$ /lsp-setup
[LSP Setup] Detecting languages...
✓ Found: Python (23 files)
✓ Found: YAML (2 files)
✓ Found: Markdown (1 file)
[LSP Setup] Configuring LSP servers...
✓ pyright: Installed at /usr/local/bin/pyright
✓ yaml-language-server: Installed at /usr/local/bin/yaml-language-server
✓ marksman: Installed at /usr/local/bin/marksman
[LSP Setup] Configuring project...
✓ Created .env with LSP configuration
✓ Detected Python virtual environment: .venv
✓ Configured pyright to use .venv/bin/python
[LSP Setup] Verifying connections...
✓ pyright: Connected (Python 3.11.5)
✓ yaml-language-server: Connected
✓ marksman: Connected
Configuration complete! LSP servers ready.
$ cd my-fullstack-app
$ /lsp-setup
[LSP Setup] Detecting languages...
✓ Found: TypeScript (45 files)
✓ Found: Python (12 files)
✓ Found: Rust (8 files)
✓ Found: JSON (6 files)
[LSP Setup] Configuring LSP servers...
✓ vtsls: Installed
✓ pyright: Installed
✗ rust-analyzer: Not found
[LSP Setup] Installation guidance:
To install rust-analyzer:
$ rustup component add rust-analyzer
Would you like to continue with available servers? [Y/n] y
[LSP Setup] Configuring project...
✓ Created .env with LSP configuration
✓ Detected Node.js project root: ./frontend
✓ Detected Python project root: ./backend
✓ Detected Rust workspace: ./services
[LSP Setup] Verifying connections...
✓ vtsls: Connected (TypeScript 5.3.3)
✓ pyright: Connected (Python 3.11.5)
⚠ rust-analyzer: Skipped (not installed)
Configuration complete! 2/3 LSP servers ready.
Run `rustup component add rust-analyzer` to enable Rust support.
After running /lsp-setup, here's how to confirm LSP is providing code intelligence to Claude:
Ask Claude to analyze a file with intentional errors:
You: "What issues do you see in src/main.py?"
If LSP is working: Claude will report specific diagnostics from Pyright
→ "Line 15: 'name' is not accessed"
→ "Line 23: Expected type 'int', got 'str'"
If LSP is NOT working: Claude only sees what's in the file content
→ Generic observations about code style
→ No specific type errors or warnings
Ask Claude about types in your code:
You: "What's the type of the 'user' variable in auth.py line 42?"
If LSP is working: Claude provides exact type from LSP
→ "Type: User | None (from models.User)"
If LSP is NOT working: Claude guesses based on context
→ "It appears to be a User object based on the code"
Ask Claude to find definitions:
You: "Where is the authenticate() function defined?"
If LSP is working: Claude uses LSP goToDefinition
→ "Defined in src/auth/service.py:156"
If LSP is NOT working: Claude searches file contents
→ "I found it by searching for 'def authenticate'"
Run the status check:
/lsp-setup --status-only
Expected Output (LSP Working):
[LSP Setup] Configuration Status:
✓ Python (pyright): Connected
- System Binary: /usr/local/bin/pyright-langserver
- Plugin: Installed and active
- Project Config: .env configured with ENABLE_LSP_TOOL=1
✓ TypeScript (vtsls): Connected
- System Binary: /usr/local/bin/vtsls
- Plugin: Installed and active
- Project Config: .env configured with ENABLE_LSP_TOOL=1
Overall Status: ✓ All LSP servers ready (2/2)
Problem Output (LSP NOT Working):
[LSP Setup] Configuration Status:
✗ Python (pyright): Not Connected
- System Binary: Not found
- Plugin: Not installed
- Project Config: Missing ENABLE_LSP_TOOL=1
Issue: Run 'npm install -g pyright' and 'npx cclsp install pyright'
When LSP is working properly, you'll notice:
When LSP is NOT working, you'll notice:
Symptom: "rust-analyzer: Not found" during configuration
Solution: Install the LSP server using the provided installation command
$ rustup component add rust-analyzer
$ /lsp-setup --force # Reconfigure after installation
Symptom: "pyright: Connection failed" during verification
Solution: Check LSP server logs and verify installation
# Check if server is properly installed
$ which pyright
/usr/local/bin/pyright
# Test server manually
$ pyright --version
pyright 1.1.332
# Check Claude Code LSP logs
$ cat ~/.claude-code/lsp-logs/pyright.log
Symptom: Import errors despite packages being installed in virtual environment
Solution: Verify .env configuration points to correct Python interpreter
# Check current configuration
$ cat .env | grep PYTHON
# Should show:
LSP_PYTHON_INTERPRETER=/path/to/.venv/bin/python
# If incorrect, update manually or run:
$ /lsp-setup --force
Symptom: No TypeScript LSP configuration despite .ts files present
Solution: Ensure tsconfig.json exists in project root
# Create minimal tsconfig.json
$ cat > tsconfig.json << EOF
{
"compilerOptions": {
"target": "ES2020",
"module": "commonjs",
"strict": true
}
}
EOF
$ /lsp-setup --force
Symptom: "Module not found" errors when LSP server uses wrong Python version
Solution: Explicitly set Python interpreter in .env
# Edit .env manually
LSP_PYTHON_INTERPRETER=/usr/bin/python3.11
# Or activate the correct virtual environment before running
$ source .venv/bin/activate
$ /lsp-setup --force
.env (Project Root)The skill creates or updates .env with LSP-specific configuration:
# LSP Configuration - Auto-generated by /lsp-setup
ENABLE_LSP_TOOL=1 # REQUIRED: Activates LSP features in Claude Code
# Project-specific settings (Layer 3)
LSP_PYTHON_INTERPRETER=/path/to/.venv/bin/python
LSP_NODE_PROJECT_ROOT=/path/to/frontend
LSP_RUST_WORKSPACE=/path/to/services
LSP_GO_MODULE=/path/to/go.mod
# Language Server Paths (auto-detected)
LSP_PYRIGHT_PATH=/usr/local/bin/pyright
LSP_VTSLS_PATH=/usr/local/bin/vtsls
LSP_RUST_ANALYZER_PATH=/usr/local/bin/rust-analyzer
Critical: ENABLE_LSP_TOOL=1 must be present for LSP features to work. Without it, LSP servers won't be activated.
The skill automatically updates Claude Code's LSP configuration. No manual editing required.
Once configured, Claude Code automatically:
/lsp-setup when adding new language files.env: Include LSP configuration in version control for team consistency--status-only to check server availabilitySkill Type: Interactive command-driven workflow
Dependencies: None (pure skill, no external packages)
Execution Time: 2-10 seconds depending on project size
Persistence: Configuration stored in .env and Claude Code settings
Supported Platforms: macOS, Linux, WSL
environment-setup - General development environment configurationdependency-manager - Package and dependency managementproject-init - New project initializationThe LSP Setup skill requires no manual maintenance. It automatically adapts to your project structure and detects language changes on each run.
To update LSP server definitions or add new languages, see the developer documentation in README.md.
When this skill is activated via /lsp-setup or activation keywords, execute the following workflow:
from pathlib import Path
from lsp_setup import LanguageDetector
# Detect languages in current project
detector = LanguageDetector()
project_root = Path.cwd()
languages = detector.detect_languages(project_root)
# Report findings
print(f"Detected {len(languages)} language(s):")
for lang in languages:
print(f" - {lang.language}: {lang.file_count} files")
from lsp_setup import StatusTracker
# Get current LSP setup status
language_names = [lang.language for lang in languages]
tracker = StatusTracker(project_root, language_names)
status = tracker.get_full_status()
# Show status
print(tracker.generate_user_guidance())
from lsp_setup import LSPConfigurator
# Configure .env file
configurator = LSPConfigurator(project_root)
# Enable LSP
if not configurator.is_lsp_enabled():
configurator.enable_lsp()
print("✓ Enabled LSP in .env")
from lsp_setup import PluginManager
# Install Claude Code plugins for detected languages
manager = PluginManager()
# Check prerequisites
if not manager.check_npx_available():
print("⚠ npx not found. Install Node.js first:")
print(" macOS: brew install node")
print(" Linux: sudo apt install nodejs")
exit(1)
# Install plugins for languages with missing Layer 2
for lang_name in language_names:
layer_2_status = status["layer_2"][lang_name]
if not layer_2_status["installed"]:
print(f"Installing {lang_name} plugin...")
success = manager.install_plugin(lang_name)
if success:
print(f"✓ {lang_name} plugin installed")
else:
print(f"✗ Failed to install {lang_name} plugin")
print(f" {layer_2_status.get('install_guide', 'See docs')}")
# Recheck status after installation
final_status = tracker.get_full_status()
if final_status["overall_ready"]:
print("\n✅ LSP setup complete! All layers configured.")
else:
print("\n⚠ LSP partially configured. Next steps:")
print(tracker.generate_user_guidance())
Support these arguments if provided by user:
--status-only: Skip installation, just report current status--force: Reinstall all plugins even if already installed--languages <lang1,lang2>: Configure only specific languages--dry-run: Show what would be done without making changes