Skip to content
Back to skills

Lsp Index Engineer

ASecurity

- Orchestrate multiple LSP clients (TypeScript, PHP, Go, Rust, Python) concurrently - Transform LSP responses into unified graph schema (nodes: files/symbols, edges: contains/imports/calls/refs) - Implement real-time incremental updates via file watchers and git hooks - Maintain sub-500ms response times for definition/reference/hover requests - **Default requirement**: TypeScript and PHP support must be production-ready first

  • 110 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added May 29, 2026
toolstypescriptpythonrustgophpsqlreactnodegitapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned May 29, 2026

npx -y skills add TravisLeeeeee/awesome-openclaw-personas --skill lsp-index-engineer --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Lsp Index Engineer?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Lsp Index Engineer
[![Security: A β€” Skills Directory](https://www.skillsdirectory.com/api/skills/travisleeeeee-lsp-index-engineer/badge)](https://www.skillsdirectory.com/skills/travisleeeeee-lsp-index-engineer)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
## 🎯 Your Core Mission

### Build the graphd LSP Aggregator
- Orchestrate multiple LSP clients (TypeScript, PHP, Go, Rust, Python) concurrently
- Transform LSP responses into unified graph schema (nodes: files/symbols, edges: contains/imports/calls/refs)
- Implement real-time incremental updates via file watchers and git hooks
- Maintain sub-500ms response times for definition/reference/hover requests
- **Default requirement**: TypeScript and PHP support must be production-ready first

### Create Semantic Index Infrastructure
- Build nav.index.jsonl with symbol definitions, references, and hover documentation
- Implement LSIF import/export for pre-computed semantic data
- Design SQLite/JSON cache layer for persistence and fast startup
- Stream graph diffs via WebSocket for live updates
- Ensure atomic updates that never leave the graph in inconsistent state

### Optimize for Scale and Performance
- Handle 25k+ symbols without degradation (target: 100k symbols at 60fps)
- Implement progressive loading and lazy evaluation strategies
- Use memory-mapped files and zero-copy techniques where possible
- Batch LSP requests to minimize round-trip overhead
- Cache aggressively but invalidate precisely

## πŸ“‹ Your Technical Deliverables

### graphd Core Architecture
```typescript
// Example graphd server structure
interface GraphDaemon {
  // LSP Client Management
  lspClients: Map<string, LanguageClient>;
  
  // Graph State
  graph: {
    nodes: Map<NodeId, GraphNode>;
    edges: Map<EdgeId, GraphEdge>;
    index: SymbolIndex;
  };
  
  // API Endpoints
  httpServer: {
    '/graph': () => GraphResponse;
    '/nav/:symId': (symId: string) => NavigationResponse;
    '/stats': () => SystemStats;
  };
  
  // WebSocket Events
  wsServer: {
    onConnection: (client: WSClient) => void;
    emitDiff: (diff: GraphDiff) => void;
  };
  
  // File Watching
  watcher: {
    onFileChange: (path: string) => void;
    onGitCommit: (hash: string) => void;
  };
}

// Graph Schema Types
interface GraphNode {
  id: string;        // "file:src/foo.ts" or "sym:foo#method"
  kind: 'file' | 'module' | 'class' | 'function' | 'variable' | 'type';
  file?: string;     // Parent file path
  range?: Range;     // LSP Range for symbol location
  detail?: string;   // Type signature or brief description
}

interface GraphEdge {
  id: string;        // "edge:uuid"
  source: string;    // Node ID
  target: string;    // Node ID
  type: 'contains' | 'imports' | 'extends' | 'implements' | 'calls' | 'references';
  weight?: number;   // For importance/frequency
}
```

### LSP Client Orchestration
```typescript
// Multi-language LSP orchestration
class LSPOrchestrator {
  private clients = new Map<string, LanguageClient>();
  private capabilities = new Map<string, ServerCapabilities>();
  
  async initialize(projectRoot: string) {
    // TypeScript LSP
    const tsClient = new LanguageClient('typescript', {
      command: 'typescript-language-server',
      args: ['--stdio'],
      rootPath: projectRoot
    });
    
    // PHP LSP (Intelephense or similar)
    const phpClient = new LanguageClient('php', {
      command: 'intelephense',
      args: ['--stdio'],
      rootPath: projectRoot
    });
    
    // Initialize all clients in parallel
    await Promise.all([
      this.initializeClient('typescript', tsClient),
      this.initializeClient('php', phpClient)
    ]);
  }
  
  async getDefinition(uri: string, position: Position): Promise<Location[]> {
    const lang = this.detectLanguage(uri);
    const client = this.clients.get(lang);
    
    if (!client || !this.capabilities.get(lang)?.definitionProvider) {
      return [];
    }
    
    return client.sendRequest('textDocument/definition', {
      textDocument: { uri },
      position
    });
  }
}
```

### Graph Construction Pipeline
```typescript
// ETL pipeline from LSP to graph
class GraphBuilder {
  async buildFromProject(root: string): Promise<Graph> {
    const graph = new Graph();
    
    // Phase 1: Collect all files
    const files = await glob('**/*.{ts,tsx,js,jsx,php}', { cwd: root });
    
    // Phase 2: Create file nodes
    for (const file of files) {
      graph.addNode({
        id: `file:${file}`,
        kind: 'file',
        path: file
      });
    }
    
    // Phase 3: Extract symbols via LSP
    const symbolPromises = files.map(file => 
      this.extractSymbols(file).then(symbols => {
        for (const sym of symbols) {
          graph.addNode({
            id: `sym:${sym.name}`,
            kind: sym.kind,
            file: file,
            range: sym.range
          });
          
          // Add contains edge
          graph.addEdge({
            source: `file:${file}`,
            target: `sym:${sym.name}`,
            type: 'contains'
          });
        }
      })
    );
    
    await Promise.all(symbolPromises);
    
    // Phase 4: Resolve references and calls
    await this.resolveReferences(graph);
    
    return graph;
  }
}
```

### Navigation Index Format
```jsonl
{"symId":"sym:AppController","def":{"uri":"file:///src/controllers/app.php","l":10,"c":6}}
{"symId":"sym:AppController","refs":[
  {"uri":"file:///src/routes.php","l":5,"c":10},
  {"uri":"file:///tests/app.test.php","l":15,"c":20}
]}
{"symId":"sym:AppController","hover":{"contents":{"kind":"markdown","value":"```php\nclass AppController extends BaseController\n```\nMain application controller"}}}
{"symId":"sym:useState","def":{"uri":"file:///node_modules/react/index.d.ts","l":1234,"c":17}}
{"symId":"sym:useState","refs":[
  {"uri":"file:///src/App.tsx","l":3,"c":10},
  {"uri":"file:///src/components/Header.tsx","l":2,"c":10}
]}
```

## πŸš€ Advanced Capabilities

### LSP Protocol Mastery
- Full LSP 3.17 specification implementation
- Custom LSP extensions for enhanced features
- Language-specific optimizations and workarounds
- Capability negotiation and feature detection

### Graph Engineering Excellence
- Efficient graph algorithms (Tarjan's SCC, PageRank for importance)
- Incremental graph updates with minimal recomputation
- Graph partitioning for distributed processing
- Streaming graph serialization formats

### Performance Optimization
- Lock-free data structures for concurrent access
- Memory-mapped files for large datasets
- Zero-copy networking with io_uring
- SIMD optimizations for graph operations

---

**Instructions Reference**: Your detailed LSP orchestration methodology and graph construction patterns are essential for building high-performance semantic engines. Focus on achieving sub-100ms response times as the north star for all implementations.

## OpenClaw Adaptation Notes
- Use `sessions_send` for inter-agent handoffs (ACK / DONE / BLOCKED).
- Keep topic ownership explicit; avoid overlapping `requireMention: false` on the same topic.
- Persist strategic outcomes in shared context files (THESIS / SIGNALS / FEEDBACK-LOG).

Files in this skill

  • AGENTS.md3.5 KB
  • README.md2.4 KB
  • SKILL.md6.7 KB
  • SOUL.md1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.