typescript-lsp
Type-aware TypeScript/JavaScript codebase analysis. Provides hover info, references, definitions, symbols, exports, workspace symbol search, and workspace audit operations via a single unified CLI.
What this skill does
# TypeScript LSP Skill
## Purpose
Type-aware codebase analysis for TypeScript/JavaScript files. Use over Grep/Glob when you need semantic understanding of symbols, types, imports, exports, references, or a reusable workspace export audit.
## When to Use
| Task | Tool |
|------|------|
| Find all usages of a function/type | `typescript-lsp` with `references` |
| Get type signature + TSDoc | `typescript-lsp` with `hover` |
| Search for a symbol by name | `typescript-lsp` with `find` |
| List file exports | `typescript-lsp` with `exports` |
| Scan imports/exports across many files | `typescript-lsp` with `workspace_scan` |
| Inventory public exports across many files | `typescript-lsp` with `public_exports` |
| Audit candidate export consumers | `typescript-lsp` with `export_consumers` |
| Find verified candidate unused exports | `typescript-lsp` with `candidate_unused_exports` |
| Find files by pattern | Glob |
| Search text content | Grep |
## Usage
Single command with JSON input. All operations share one LSP session (one server start).
```bash
bun skills/typescript-lsp/scripts/run.ts '<json>'
echo '<json>' | bun skills/typescript-lsp/scripts/run.ts
bun skills/typescript-lsp/scripts/run.ts --schema input # JSON Schema for input
bun skills/typescript-lsp/scripts/run.ts --schema output # JSON Schema for output
```
## Input Format
```json
{
"file": "src/app.ts",
"targets": ["src/**/*.ts", "src/**/*.tsx"],
"operations": [
{ "type": "hover", "line": 5, "character": 10 },
{ "type": "references", "line": 20, "character": 3 },
{ "type": "definition", "line": 15, "character": 8 },
{ "type": "symbols" },
{ "type": "exports" },
{ "type": "find", "query": "parseConfig" },
{ "type": "workspace_scan", "includeTests": false },
{ "type": "public_exports", "includeTests": false },
{ "type": "export_consumers", "query": "parseConfig", "includeTests": true },
{ "type": "candidate_unused_exports", "includeTests": true }
]
}
```
**Fields:**
- `file` — path to TypeScript/JavaScript file (absolute or relative to cwd)
- `files` — explicit file list for workspace audit operations
- `targets` — glob patterns for workspace audit operations
- `operations` — array of operations to perform in a single session
**Operation types:**
| Type | Required fields | Description |
|------|----------------|-------------|
| `hover` | `line`, `character` | Type info + TSDoc at position |
| `references` | `line`, `character` | All references to symbol at position |
| `definition` | `line`, `character` | Go to definition |
| `symbols` | — | All symbols in the file |
| `exports` | — | Exported symbols only |
| `find` | `query` | Search workspace symbols by name |
| `scan` | — | Fast import/export extraction for one file using `Bun.Transpiler.scan()` |
| `workspace_scan` | `includeTests?` | Fast import/export extraction across `files` or `targets` |
| `public_exports` | `includeTests?` | Compiler-backed export inventory across `files` or `targets` |
| `export_consumers` | `query?`, `includeTests?` | Candidate consumer audit for exported symbols across `files` or `targets` |
| `candidate_unused_exports` | `query?`, `includeTests?` | TypeScript-verified unused export audit with `unused` vs `test_only` status |
Positions are 0-indexed.
## Output Format
JSON to stdout. Each result corresponds to the input operation at the same index.
```json
{
"file": "src/app.ts",
"results": [
{
"type": "hover",
"data": {
"contents": { "kind": "markdown", "value": "```typescript\nconst x: number\n```" },
"range": { "start": { "line": 5, "character": 6 }, "end": { "line": 5, "character": 7 } }
}
},
{
"type": "exports",
"data": [
{ "name": "parseConfig", "kind": "Function", "line": 10 },
{ "name": "Config", "kind": "Variable", "line": 3 }
]
},
{
"type": "hover",
"error": "hover requires line and character"
}
]
}
```
Failed operations include an `error` field instead of `data`. Other operations still run.
## Common Workflows
### Understand a file
```bash
bun skills/typescript-lsp/scripts/run.ts '{"file": "src/utils/parser.ts", "operations": [{"type": "exports"}]}'
```
### Check type before using an API
```bash
bun skills/typescript-lsp/scripts/run.ts '{"file": "src/utils/parser.ts", "operations": [{"type": "hover", "line": 42, "character": 10}]}'
```
### Find all references before refactoring
```bash
bun skills/typescript-lsp/scripts/run.ts '{"file": "src/utils/parser.ts", "operations": [{"type": "references", "line": 42, "character": 10}]}'
```
### Batch: exports + hover + references in one session
```bash
bun skills/typescript-lsp/scripts/run.ts '{"file": "src/utils/parser.ts", "operations": [{"type": "exports"}, {"type": "hover", "line": 10, "character": 13}, {"type": "references", "line": 10, "character": 13}]}'
```
### Search workspace for a symbol
```bash
bun skills/typescript-lsp/scripts/run.ts '{"file": "src/app.ts", "operations": [{"type": "find", "query": "parseConfig"}]}'
```
### Scan imports and runtime exports across many files
```bash
bun skills/typescript-lsp/scripts/run.ts '{"file": "src/main.ts", "targets": ["src/**/*.ts", "src/**/*.tsx"], "operations": [{"type": "workspace_scan", "includeTests": false}]}'
```
### Inventory public exports across many files
```bash
bun skills/typescript-lsp/scripts/run.ts '{"file": "src/main.ts", "targets": ["src/**/*.ts", "src/**/*.tsx"], "operations": [{"type": "public_exports", "includeTests": false}]}'
```
### Audit candidate export consumers
```bash
bun skills/typescript-lsp/scripts/run.ts '{"file": "src/main.ts", "targets": ["src/agent/**/*.ts"], "operations": [{"type": "export_consumers", "query": "Module", "includeTests": true}]}'
```
### Find verified candidate unused exports
```bash
bun skills/typescript-lsp/scripts/run.ts '{"file": "src/main.ts", "targets": ["src/agent/**/*.ts"], "operations": [{"type": "candidate_unused_exports", "includeTests": true}]}'
```
## Notes
- `workspace_scan` is fast and uses `Bun.Transpiler.scan()`. It is best for import/export indexing, not semantic reference truth.
- `public_exports` uses the TypeScript compiler API, so it includes type-only exports that `scan()` does not report.
- `export_consumers` is a candidate audit. It classifies matching symbol mentions into production and test files, but it is not a full LSP find-references replacement.
- `candidate_unused_exports` stays JSON-first for agent consumers. It verifies references over the provided `files` or `targets` set and does not add `summary` or `table` output modes.
## Exit Codes
- `0` — all operations succeeded
- `1` — one or more operations failed (partial results returned)
- `2` — bad input or tool error
## Related Skills
- **code-documentation** — TSDoc standards for documentation
Related in Security
mac-ops
IncludedComprehensive macOS workstation operations — diagnose kernel panics, identify failing drives, audit launchd startup items, decode wake reasons, triage TCC permission denials, manage APFS snapshots, recover from no-boot. Use for: Mac is slow, slow bootup, won't boot, kernel panic, kernel_task hot, mds_stores CPU, photoanalysisd, cloudd, login loop, gray screen, sleep wake failure, drive failing, IO errors, APFS snapshots eating space, Time Machine local snapshots, Spotlight indexing, launchd, LaunchAgent, LaunchDaemon, login items, TCC permissions, Full Disk Access, Screen Recording denied, Gatekeeper, quarantine, com.apple.quarantine, app is damaged, helper tool, /Library/PrivilegedHelperTools, pmset, wake reasons, dark wake, sysdiagnose, panic.ips, DiagnosticReports, configuration profile, MDM profile, remote diagnostics over SSH.
a11y-audit
IncludedRun accessibility audits on web projects combining automated scanning (axe-core, Lighthouse) with WCAG 2.1 AA compliance mapping, manual check guidance, and structured reporting. Output is configurable: markdown report only, markdown plus machine-readable JSON, or markdown plus issue tracker integration. Use this skill whenever the user mentions "accessibility audit", "a11y audit", "WCAG audit", "accessibility check", "compliance scan", or asks to check a web project for accessibility issues. Also trigger when the user wants to verify WCAG conformance or map findings to a specific standard (CAN-ASC-6.2, EN 301 549, ADA/AODA).
erpclaw
IncludedAI-native ERP system with self-extending OS. Full accounting, invoicing, inventory, purchasing, tax, billing, HR, payroll, advanced accounting (ASC 606/842, intercompany, consolidation), and financial reporting. 413 actions across 14 domains, 43 expansion modules. Constitutional guardrails, adversarial audit, schema migration. Double-entry GL, immutable audit trail, US GAAP.
assess
IncludedAssesses and rates quality 0-10 across multiple dimensions (correctness, maintainability, security, performance, testability, simplicity) with pros/cons analysis. Compares against project conventions and prior decisions from memory. Produces structured evaluation reports with actionable improvement suggestions. Use when evaluating code, designs, architectures, or comparing alternative approaches.
spring-boot-security-jwt
IncludedProvides JWT authentication and authorization patterns for Spring Boot 3.5.x covering token generation with JJWT, Bearer/cookie authentication, database/OAuth2 integration, and RBAC/permission-based access control using Spring Security 6.x. Use when implementing authentication or authorization in Spring Boot applications.
code-hardcode-audit
IncludedDetect hardcoded values, magic numbers, and leaked secrets. TRIGGERS - hardcode audit, magic numbers, PLR2004, secret scanning.