MCP HubMCP Hub
SKILL·38935D

lsp-architecture

blackwell-systems
업데이트됨 21 days ago
3 조회
162
19
162
GitHub에서 보기
메타general

정보

이 Claude Skill은 LSP 분석을 사용하여 코드베이스의 포괄적인 아키텍처 개요를 생성합니다. 단일 호출로 언어, 패키지 구조, 진입점, 의존성 그래프 및 핫스팟을 식별하여 전체적인 구조를 제공합니다. 파일을 수정하지 않고도 새롭거나 복잡한 프로젝트의 구조를 빠르게 이해해야 하는 개발자에게 이상적입니다.

빠른 설치

Claude Code

추천
기본
npx skills add blackwell-systems/agent-lsp -a claude-code
플러그인 명령대체
/plugin add https://github.com/blackwell-systems/agent-lsp
Git 클론대체
git clone https://github.com/blackwell-systems/agent-lsp.git ~/.claude/skills/lsp-architecture

Claude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요

문서

Requires the agent-lsp MCP server.

lsp-architecture

Generate a structural architecture overview of any codebase: language distribution, package hierarchy, entry points, dependency flow, and hotspot files. One invocation for the big picture.

Read-only; does not modify any files.

Invocation: User provides the workspace root path (e.g. "/home/user/myproject"). If omitted, use the current working directory.


Depth Controls (hard limits)

These limits are strict constraints. Never exceed them:

  • Package enumeration: cap at 30 packages
  • Hotspot analysis: cap at 10 files
  • Workspace symbol queries: cap at 5 queries
  • Do NOT recurse into vendor/, node_modules/, .git/, or other dependency directories

Step 0 — Initialize

If LSP is not yet running, start it with the workspace root:

mcp__lsp__start_lsp({
  "workspace_root": "<workspace-root>"
})

Then detect which language servers are available:

mcp__lsp__detect_lsp_servers({
  "workspace_root": "<workspace-root>"
})
→ returns: list of detected servers with language names and file patterns

Record the available languages and their file globs. This determines which queries to run in later steps.


Step 1 — Language Detection

Scan the workspace to determine language distribution. Use file extension counts from the detected servers and supplement with a filesystem scan (via Glob tool) to count files per language.

For each detected language, report:

  • Language name
  • File count
  • Estimated lines of code (sample 3-5 representative files and extrapolate)

Skip files in vendor/, node_modules/, .git/, dist/, build/, and other common dependency or output directories.


Step 2 — Package Structure

Use find_symbol with broad queries to discover the package and module hierarchy. Tailor queries by language:

Go:

mcp__lsp__find_symbol({
  "query": "",
  "symbol_kind_filter": "Package"
})

Also query for top-level types and functions to fill in package-level detail:

mcp__lsp__find_symbol({
  "query": "",
  "symbol_kind_filter": "Function"
})

Python:

mcp__lsp__find_symbol({
  "query": "",
  "symbol_kind_filter": "Class"
})

TypeScript/JavaScript:

mcp__lsp__find_symbol({
  "query": "",
  "symbol_kind_filter": "Function"
})

From the returned symbols, extract the directory paths and build a tree of the package hierarchy. Group symbols by their containing directory. For each package/directory, note:

  • Path relative to workspace root
  • Brief description (inferred from symbol names and directory name)
  • Approximate symbol count

Cap at 30 packages. If more than 30 directories contain symbols, keep only the top 30 by symbol count and note that others were omitted.

Cap workspace symbol queries at 5 total across all of Step 2.


Step 3 — Entry Points

Use find_symbol to search for common entry point patterns:

mcp__lsp__find_symbol({
  "query": "main"
})

Also search for other common entry point names (use a single additional query if needed): "Run", "Serve", "Handler", "App", "Main".

Identify and categorize:

  • CLI entrypoints: main functions, Run or Execute commands
  • HTTP handlers: Handler, Serve, ListenAndServe patterns
  • Test suites: top-level test files (note count only, do not list individually)

List each entry point with file:line.


Step 4 — Hotspot Analysis

Identify the files with the highest symbol density (most exports), then measure their blast radius.

4a — Find candidate files

From the symbols discovered in Step 2, count exported symbols per file. Select the top 10 files by exported symbol count.

4b — Measure blast radius

For each candidate file, call blast_radius:

mcp__lsp__blast_radius({
  "changed_files": ["<absolute-path-to-file>"],
  "include_transitive": false
})
→ returns: affected_symbols, test_callers, non_test_callers

This tool uses a persistent cache, so repeated calls on the same file are instant.

4c — Rank hotspots

Rank files by total non_test_callers count (descending). Files with the most non-test callers are the architectural hotspots: changing them has the widest blast radius.


Step 5 — Output

Produce the architecture report in this format:

## Architecture Overview: <project-name>

### Languages
- Go: 150 files (~15K lines)
- TypeScript: 30 files (~3K lines)

### Package Map
cmd/agent-lsp/     (entrypoint, CLI routing)
internal/lsp/      (LSP client, process management)
internal/tools/    (MCP tool handlers)
internal/session/  (speculative execution sessions)
...

### Entry Points
- cmd/agent-lsp/main.go:55 (main)
- cmd/agent-lsp/server.go:276 (Run)

### Hotspots (most referenced files)
1. internal/lsp/client.go: 150+ callers across 30 files
2. internal/tools/helpers.go: 80 callers across 20 files
...

### Dependency Flow
cmd/ -> internal/tools/ -> internal/lsp/ -> (gopls subprocess)
         |-> internal/session/ -> internal/lsp/

Report sections

Languages: One line per language with file count and estimated LOC.

Package Map: Directory tree with a parenthetical description of each package's role. Cap at 30 entries.

Entry Points: Each with file:line and a parenthetical label (e.g. (main), (HTTP handler), (CLI command)).

Hotspots: Ranked list of the most-referenced files. For each, show the total non-test caller count and the number of distinct files containing callers.

Dependency Flow: A simple ASCII arrow diagram showing how the top-level packages depend on each other. Infer this from the hotspot caller data and package structure. Keep it concise: show the primary flow paths, not every edge.


Example

Goal: architecture overview of /home/user/agent-lsp

Step 0 — Initialize
  start_lsp: workspace_root="/home/user/agent-lsp"
  detect_lsp_servers:
  → Go (gopls): *.go
  → detected 1 language server

Step 1 — Language Detection
  Glob: **/*.go (excluding vendor/) → 85 files
  Sample 5 files, average 180 lines → estimate ~15K total lines
  → Go: 85 files (~15K lines)

Step 2 — Package Structure
  find_symbol: query="", symbol_kind_filter="Package"
  → 12 packages found

  find_symbol: query="", symbol_kind_filter="Function"
  → 240 functions across 12 packages

  Package map:
    cmd/agent-lsp/       (entrypoint, CLI routing, 15 symbols)
    internal/lsp/        (LSP client lifecycle, 45 symbols)
    internal/tools/      (MCP tool handlers, 60 symbols)
    internal/session/    (speculative execution, 25 symbols)
    internal/protocol/   (LSP protocol types, 30 symbols)
    skills/              (embedded skill definitions, 5 symbols)

Step 3 — Entry Points
  find_symbol: query="main"
  → cmd/agent-lsp/main.go:55 main()

  find_symbol: query="Run"
  → cmd/agent-lsp/server.go:276 Run()
  → cmd/agent-lsp/daemon.go:40 RunDaemon()

  Entry points:
  - cmd/agent-lsp/main.go:55 (main)
  - cmd/agent-lsp/server.go:276 (Run, server lifecycle)
  - cmd/agent-lsp/daemon.go:40 (RunDaemon, background mode)

Step 4 — Hotspot Analysis
  Top files by symbol count:
    1. internal/lsp/client.go (22 exported symbols)
    2. internal/tools/helpers.go (18 exported symbols)
    3. internal/protocol/types.go (15 exported symbols)

  blast_radius on each:
    internal/lsp/client.go → 150 non-test callers across 30 files
    internal/tools/helpers.go → 80 non-test callers across 20 files
    internal/protocol/types.go → 60 non-test callers across 15 files

Step 5 — Output

## Architecture Overview: agent-lsp

### Languages
- Go: 85 files (~15K lines)

### Package Map
cmd/agent-lsp/       (entrypoint, CLI routing)
internal/lsp/        (LSP client, process management)
internal/tools/      (MCP tool handlers)
internal/session/    (speculative execution sessions)
internal/protocol/   (LSP protocol types)
skills/              (embedded skill definitions)

### Entry Points
- cmd/agent-lsp/main.go:55 (main)
- cmd/agent-lsp/server.go:276 (Run)
- cmd/agent-lsp/daemon.go:40 (RunDaemon)

### Hotspots (most referenced files)
1. internal/lsp/client.go: 150 callers across 30 files
2. internal/tools/helpers.go: 80 callers across 20 files
3. internal/protocol/types.go: 60 callers across 15 files

### Dependency Flow
cmd/agent-lsp/ -> internal/tools/ -> internal/lsp/ -> (gopls subprocess)
                    |-> internal/session/ -> internal/lsp/
                    |-> internal/protocol/

GitHub 저장소

blackwell-systems/agent-lsp
경로: skills/lsp-architecture
0
agentskillsai-agentsai-toolingclaudeclaude-codecode-intelligence
FAQ

자주 묻는 질문

lsp-architecture Skill이란 무엇인가요?

lsp-architecture은(는) blackwell-systems이(가) 만든 Claude Skill입니다. Skill은 Claude가 필요할 때 불러오는 지침과 리소스를 묶어 추가 프롬프트 없이 lsp-architecture 관련 작업을 수행할 수 있게 합니다.

lsp-architecture은(는) 어떻게 설치하나요?

이 페이지의 설치 명령을 사용하세요. lsp-architecture을(를) Claude Code 플러그인으로 추가하거나 저장소를 skills 디렉터리에 복제한 다음 Claude를 다시 시작해 Skill을 불러옵니다.

lsp-architecture은(는) 어떤 카테고리에 속하나요?

lsp-architecture은(는) 메타 카테고리에 속합니다.

lsp-architecture은(는) 무료로 사용할 수 있나요?

네. lsp-architecture은(는) AIMCP에 등록되어 있으며 무료로 설치할 수 있습니다.

연관 스킬

content-collections
메타

이 스킬은 콘텐츠 콜렉션(Content Collections)을 위한 프로덕션 검증된 설정을 제공합니다. 콘텐츠 콜렉션은 Markdown/MDX 파일을 Zod 검증이 포함된 타입 안전한 데이터 콜렉션으로 변환해주는 TypeScript 최우선 도구입니다. 블로그, 문서 사이트 또는 콘텐츠 중심의 Vite + React 애플리케이션을 구축할 때 타입 안전성과 자동 콘텐츠 검증을 보장하기 위해 사용하세요. Vite 플러그인 구성과 MDX 컴파일부터 배포 최적화 및 스키마 검증에 이르기까지 모든 것을 다룹니다.

스킬 보기
polymarket
메타

이 스킬은 개발자들이 Polymarket 예측 시장 플랫폼을 활용한 애플리케이션을 구축할 수 있도록 지원하며, 거래 및 시장 데이터를 위한 API 통합 기능을 포함합니다. 또한 WebSocket을 통한 실시간 데이터 스트리밍을 제공하여 실시간 거래와 시장 활동을 모니터링할 수 있습니다. 이를 통해 거래 전략을 구현하거나 실시간 시장 업데이트를 처리하는 도구를 생성하는 데 활용할 수 있습니다.

스킬 보기
creating-opencode-plugins
메타

이 스킬은 개발자들이 명령어, 파일, LSP 작업 등 25개 이상의 이벤트 유형에 연결되는 OpenCode 플러그인을 만들 수 있도록 돕습니다. JavaScript/TypeScript 모듈을 위한 플러그인 구조, 이벤트 API 명세, 구현 패턴을 제공합니다. OpenCode AI 어시스턴트의 라이프사이클을 사용자 정의 이벤트 기반 로직으로 가로채거나, 모니터링하거나, 확장해야 할 때 사용하세요.

스킬 보기
sglang
메타

SGLang은 RadixAttention 프리픽스 캐싱을 활용하여 JSON, 정규식, 에이전트 워크플로우를 위한 고속 구조화 생성에 특화된 고성능 LLM 서빙 프레임워크입니다. 특히 반복되는 프리픽스가 있는 작업에서 상당히 빠른 추론 속도를 제공하여 복잡한 구조화 출력 및 다중 턴 대화에 이상적입니다. 제약 디코딩이 필요하거나 광범위한 프리픽스 공유가 있는 애플리케이션을 구축할 때는 vLLM과 같은 대안보다 SGLang을 선택하십시오.

스킬 보기