Analyze a TypeScript file structure, exports, and symbols
/plugin marketplace add plaited/development-skills/plugin install development-skills@plaited-marketplacecommands/Batch analysis of a TypeScript/JavaScript file. Get an overview of exports, symbols, and optionally type info at specific positions.
Arguments: $ARGUMENTS
/lsp-analyze <file> [options]
Options:
--symbols or -s: List all symbols--exports or -e: List only exported symbols (default if no options)--hover <line:char>: Get type info at position (repeatable)--refs <line:char>: Find references at position (repeatable)--all: Run symbols + exports analysisExtract file path and options from $ARGUMENTS.
If file is missing, show usage:
Usage: /lsp-analyze <file> [options]
Examples:
/lsp-analyze src/utils/parser.ts --exports
/lsp-analyze src/lib/config.ts --all
/lsp-analyze src/index.ts --hover 50:10 --refs 60:5
Default to --exports if no options provided.
Find the typescript-lsp skill directory. Use Glob to locate it:
**/typescript-lsp/SKILL.md
The skill directory is the parent of SKILL.md.
From the skill directory, run:
bun <skill-dir>/scripts/lsp-analyze.ts <file> [options]
Parse the JSON output and present in a structured format:
File: <file>
Exports:
| Name | Kind | Line |
|---|---|---|
| ... | ... | ... |
Symbols: (if requested)
| Name | Kind | Line |
|---|---|---|
| ... | ... | ... |
For hover/refs results, format as described in the individual commands.