/typescript7-lsp-intelligence:ts-lifecyclefrom TypeScript 7 LSP Intelligence
Researches, writes, edits, reviews and verifies TypeScript and JavaScript code with official sources, LSP code intelligence and behavioral evidence. Use for every task that writes, edits, audits or answers questions about TypeScript or JavaScript code, including scripts, tsconfig and jsconfig, modules, declarations, migrations, type errors, editor and tsc disagreements, broken builds, failing checks and cross-tool behavior. Not for other languages, comment-only or formatting-only edits, or syntax explanations that depend on neither the project nor a version.
Ships in TypeScript 7 LSP Intelligence. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
One contract governs three facets: research establishes the supported approach, execution makes the scoped change, and verification demonstrates that the affected code and its checks behave as intended. Read procedures on demand. Apply this to TypeScript and materially connected tools, not every installed dependency.
.ts, .tsx, .mts, .cts, .js, .jsx, .mjs and .cjs files, tsconfig.json and jsconfig.json, and the tools that consume them (frameworks, bundlers, runtimes, test runners, editors, CI) when the task crosses into them.allowJs or checkJs; otherwise the project's own lint and tests are its gates.Set the mode at the start and state it in the report.
research: questions, reviews, audits and diagnoses without permission to edit. Read-only in the user's project: read files, use the LSP tool, and run commands that write nothing there (--version, --showConfig, --listFilesOnly, and tsc --noEmit --tsBuildInfoFile <file in a mktemp -d folder>, since an incremental or composite config otherwise writes its build-info file into the project). Temporary reproductions go in a mktemp -d folder outside the project. Deliver supported conclusions and proposed checks, never a claim that an implementation or test passed.implementation: the user asked for a change. Edit only the files the change needs.research: propose the fix, and ask before switching to implementation.The skill uses four things:
tsc, the project's scripts and scripts/run-fixtures.sh.tsc (the program's node_modules/.bin/tsc, or a tsc on PATH) and the package manager that runs its lint and test scripts.LSP tool, served by this plugin's language server.curl to the official domain (typescriptlang.org, the counterpart's docs site); gh on the official repository (gh release view, gh api repos/<owner>/<repo>/contents/<path> for its docs and CHANGELOG.md), such as microsoft/TypeScript.When one is missing, find the row, do what it says, and report it as it says:
| Missing | How you know | What to do | What to report |
|---|---|---|---|
LSP tool | ToolSearch with select:LSP finds nothing, or every LSP call errors and the retries in rule 3 do not fix it (the Claude app's chat and Cowork never run language servers) | Answer every LSP row of the governing contract with Grep and reading the files. Skip the references fixture and the fresh semantic check | Semantic evidence: unavailable |
| Web access | WebFetch, WebSearch, curl to the official domain and gh on the official repository all fail or are absent | Continue every decision that no official page decides. Block each decision that needs one | Each unread source: unavailable. Blocked decisions under Gaps |
| Type checking | No tsconfig.json covers the changed files, or only a jsconfig.json without checkJs does | Lint and tests are the gates. The type-check fixtures do not apply | Type-check layer: not present |
tsc | No node_modules/.bin/tsc above the program and no tsc on PATH | Run lint and tests | Type check: cannot run, under Gaps |
| Shell | No Bash tool (the Claude app's chat) | Read and reason only: no gate, fixture or probe can run | Implementation: not verified |
| Every gate | No type check, lint or test can run, for any of the reasons above | Stop at the proposed change. Never run the user's scripts or entry points on synthetic data instead | Implementation: not verified |
LSP owns questions about code structure; Grep owns questions about text. Route each question to its owner, and use both before deleting, renaming or changing a signature.
| Question | Owner | Operation |
|---|---|---|
| Where is X defined? | LSP | goToDefinition |
| Who uses or imports X? | LSP | findReferences |
| Type or signature of X? | LSP | hover |
| What does this file contain? | LSP | documentSymbol, before reading the whole file |
| Where is X, file unknown? | LSP | workspaceSymbol, always with query |
| Who calls X, what does X call? | LSP | incomingCalls / outgoingCalls on the function's position |
| Implementations of an interface | LSP | goToImplementation |
| Where does a word appear as text (docs, comments, strings, config, scripts)? | Grep | — |
| Is it safe to delete, rename or change a signature? | Both | LSP for code references, then Grep to confirm them and find the blind spots below |
When Grep finds several symbols with the same name, search for the name together with the module it is imported from, and read the import lines to tell them apart. Without hover, read the type's declaration (the .d.ts under node_modules for a library) or ask tsc.
Every operation takes filePath (absolute), line (1-based) and character (1-based, UTF-16 code units: an emoji before the symbol counts 2). Raw LSP data in logs is 0-based: add 1 to both.
If the LSP tool is not loaded, load it first with ToolSearch and the query select:LSP. Send LSP calls in their own message, never in parallel with another tool; several LSP calls may share a message. The session's first LSP call goes alone: its answer can come from a server still loading the project, so pass the warm-up check below before grouping calls.
findReferences result is never the full list. It misses callers in .svelte, .vue and .astro files when run from a .ts file, test mocks (vi.mock, jest.mock) and other string references, and files changed from the shell. Confirm it with Grep before deleting a symbol or changing a signature: compare call sites, not lines: each reference findReferences lists against each Grep hit that calls or imports the name, Grepping also the alias of every import { name as alias }, and explain each difference before acting on either.findReferences returns only a file, line and column. To see what each reference is, read its line in Grep's output instead of opening every file.LSP tool runs Claude Code's own language server, not the user's editor: its answers say nothing about what the editor shows. Label any conclusion about the editor as inference unless the user shares the editor's output. The editor's exact message and file are inputs only the user has: ask for them, and report inference until they arrive.tsc --lsp) pushes none after an edit: silence means unchecked, not clean. Run the type check after every change to a TypeScript or JavaScript file and before reporting done.findReferences and Grep agree, or after you explain each difference. Respect authorization, formatter ownership and existing user changes.package.json exports, main or types, or re-exported from the package entry), ask before renaming, because callers outside the repository break.Verify intended behavior and relevant negative cases:
Match the defect to the observer:
hover or findReferences on each changed symbol after the last edit. When no diagnostics arrive, the type check is the gate and semantic diagnostics are reported as unavailable.LSP operation or its fallback.bash ${CLAUDE_SKILL_DIR}/scripts/run-fixtures.sh <owning tsconfig.json>. In research mode, --outside runs only when a conclusion rests on the compiler's sensitivity; it never proves which files a program contains, which --listFilesOnly does.git diff or a hash that only the intended change remains.npm ci, pnpm install --frozen-lockfile, yarn install --immutable) only when the task allows network and time; otherwise, and when no installed dependencies can be reused, a copy cannot reproduce the check: use the in-project probe below in implementation mode, or report the probe as not possible in research mode. Keep its outputs and caches there.research mode, never probe inside the project.implementation mode, an in-project probe is allowed only when a copy cannot reproduce the check, for example a monorepo layout or a running editor service. It must be in a file the task already edits:
git diff or a hash that only the intended change remains.implementation mode they create and delete only lsp-fixture-* folders inside the project, because the fixture must extend the owning tsconfig from where it sees the project's environment.When a result is the session's first LSP result, is empty, shows only the definition, or will justify an edit or deletion, check all five before believing it:
hover at the same spot shows the intended symbol. "No hover information" means a wrong position or no server, never "no usages".LSP calls can be partial or wrong, goToDefinition included (it may point at the import line). Repeat until two consecutive results match, with at most three calls in total. If no two match, record the result as unstable and use Grep plus reading. This match check is separate from the readiness retries in semantic-execution.md.LSP sees static code references only. Grep the name in: strings and reflection (dynamic imports, eval, dispatch by name); test mocks and stubs (vi.mock, jest.mock and other module paths in strings); entry points and config (package scripts, YAML, JSON, TOML, and .env with Grep -l only, never quoting its values); framework injection (fixtures, decorators, registries, routes); .astro, .svelte, .vue and .mdx files; shell scripts, CI, Makefiles, Dockerfiles; docs, comments, templates.
End with this record in the reply, scaled to the task:
Mode: research | implementation
Categories: <selected source-map categories> (<count> of 10; 0 when the change needed no research)
Versions: <declared, locked, installed and invoked compiler and counterparts>
Change: <scoped diff, or the proposed change in research mode>
Evidence: <each claim as observation, inference, contradiction or unavailable, with its command or source>
Checks: <command, baseline result, final result>; fixtures <run | not run, why>; probes restored <yes | n/a>
Gaps: <blocked decisions, missing evidence, pre-existing failures>
assets/clean_control.ts.fixture (opens in a new tab)assets/implicit_any.ts.fixture (opens in a new tab)assets/missing_member.ts.fixture (opens in a new tab)assets/possibly_undefined.ts.fixture (opens in a new tab)assets/references.ts.fixture (opens in a new tab)assets/tsconfig.json.fixture (opens in a new tab)assets/type_mismatch.ts.fixture (opens in a new tab)references/fixtures.md (opens in a new tab)references/integration-and-releases.md (opens in a new tab)references/project-evidence.md (opens in a new tab)references/research-workflow.md (opens in a new tab)references/semantic-execution.md (opens in a new tab)references/source-map.md (opens in a new tab)references/verification.md (opens in a new tab)scripts/run-fixtures.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub nerymurillohnd/the-claude-factory --plugin typescript7-lsp-intelligence