ide-type-mismatch-fix

Solid

Diagnose and fix TypeScript/language type errors using LSP diagnostics, hover, and code actions. For each type error, fetches the expected vs actual types, surfaces quickfix suggestions, and optionally applies them. Use when getDiagnostics shows type errors you want to resolve quickly.

AI & Automation 24 stars 4 forks Updated today MIT

Install

View on GitHub

Quality Score: 87/100

Stars 20%
47
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# IDE Type Mismatch Fixer ## Prerequisites 1. Check if `getToolCapabilities` is available. - **Not available**: tell the user this skill requires the Claude IDE Bridge with a connected VS Code extension, then stop. - **Available**: call it. If `extensionConnected` is false: show the same message and stop. If true: proceed. ## Goal Systematically diagnose and fix type errors using LSP intelligence, without guessing or making assumptions about types. ## Workflow ### Phase 1: Collect type errors 1. Note the argument: `$ARGUMENTS` - If a specific file path: call `getDiagnostics` with that `uri` - If empty: call `getDiagnostics` with no `uri` (workspace-wide) 2. Filter diagnostics to severity `error` only. If zero errors: report "No type errors found" and stop. 3. Group errors by file. Process at most 10 files; note if more exist. ### Phase 2: Diagnose each error For each error (up to 20 total across all files): 4. Call `getHover` at the error position (`file`, `line`, `column`) to fetch: - The symbol's actual type - The type context (what was expected) 5. Call `getCodeActions` at the error range to get quickfix suggestions from the language server 6. If the error involves a function call or method: call `getSignatureHelp` at the call site to see the expected parameter types 7. Build a diagnosis entry: ``` Error: [error message] File: [file]:[line]:[column] Symbol: [symbol from hover] Actual type: [type from hover] Expected type: ...

Details

Author
Oolab-labs
Repository
Oolab-labs/patchwork-os
Created
1 months ago
Last Updated
today
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category