xiaohongshu
xiaohongshu
lsp-integration
LSP (Language Server Protocol) expert for 100x faster semantic code understanding than text-based grep. Use when navigating large codebases, finding symbol definitions and references, or exploring type hierarchies. Supports TypeScript, Python, Go, Rust, and other LSP-enabled languages.
Full skill instructions
You are an expert in leveraging Language Server Protocol (LSP) for semantic code understanding. LSP provides 100x faster and more accurate code exploration than text-based grep searches.
LSP servers understand code semantically - they know about types, symbols, references, and relationships between code elements. This enables precise navigation and refactoring that text search cannot achieve.
| Language | LSP Server | Install |
|---|---|---|
| TypeScript/JavaScript | typescript-language-server | npm install -g typescript-language-server typescript |
| Python | python-lsp-server (pylsp) | pip install python-lsp-server |
| Go | gopls | go install golang.org/x/tools/gopls@latest |
| Rust | rust-analyzer | Via rustup or standalone |
| Java | jdtls | Eclipse JDT Language Server |
| C# | omnisharp | .NET SDK |
Navigate to where a symbol is defined.
# Using TypeScript language server
npx ts-node --eval "
const ts = require('typescript');
// Find definition of symbol at position
"
Use case: "Where is this function defined?" → Find exact location in codebase.
Find every place a symbol is used.
Critical for refactoring: Before renaming or changing a function, ALWAYS find all references to understand impact.
# Find all usages of a function/variable/class
# LSP tracks semantic references, not just text matches
Use case: "What will break if I change this interface?" → Find all implementations and usages.
Get structured view of all symbols in a file.
Use case: "What functions/classes are in this file?" → Get hierarchy without parsing.
Get type information and documentation for any symbol.
Use case: "What type does this variable have?" → Get inferred or declared type.
Get compilation errors and warnings.
Use case: "Are there any type errors?" → Real-time error checking.
| Task | Use LSP | Use Grep |
|---|---|---|
| Find function definition | ✅ Precise | ⚠️ May find wrong match |
| Find all references | ✅ Semantic | ⚠️ Misses renamed imports |
| Search for text pattern | ❌ Not designed for this | ✅ Fast text search |
| Understand type hierarchy | ✅ Full inheritance chain | ❌ Cannot determine |
| Check for type errors | ✅ Compiler-accurate | ❌ Impossible |
| Find files by name | ❌ Overkill | ✅ Use Glob |
❌ WRONG: Grep for function name → rename → hope nothing breaks
✅ RIGHT: LSP findReferences → understand all usages → safe rename
❌ WRONG: grep -r "function processOrder" .
✅ RIGHT: LSP goToDefinition → exact location, handles imports/exports
For complex exploration tasks, combine LSP operations with the Explore agent:
1. LSP: Find all references to deprecated function
2. Explore: Understand migration patterns in codebase
3. LSP: Navigate to each usage for refactoring
# Install globally
npm install -g typescript-language-server typescript
# Verify installation
typescript-language-server --version
Find where interface is implemented:
// LSP findReferences on interface → shows all implementing classes
Check type at position:
// LSP hover → shows inferred type, even for complex generics
Find unused exports:
// LSP diagnostics + findReferences → exports with 0 references
pip install python-lsp-server
# Optional: Add type checking
pip install pylsp-mypy
Find class hierarchy:
# LSP can show base classes and subclasses
Check import resolution:
# LSP resolves imports even with complex __init__.py structures
LSP operations are recommended in the SpecWeave workflow:
findReferences before any refactoringgoToDefinition for code navigationgetDiagnostics to check for errors# Check if server is installed
which typescript-language-server
which pylsp
which gopls
# Check for initialization errors
typescript-language-server --stdio 2>&1 | head -20
node_modules and build directoriestsconfig.json or equivalent is properly configuredNEVER exceed 2000 tokens per response!
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience