fix-unused-imports

Remove unused TypeScript imports and variables causing TS6133 errors.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/MiDouTech/myTapd --skill fix-unused-imports-midoutech
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fix-unused-imports
Source: https://github.com/MiDouTech/myTapd/tree/main/.claude/skills/fix-unused-imports
Command: npx skills add https://github.com/MiDouTech/myTapd --skill fix-unused-imports-midoutech

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill detects and fixes TypeScript/JavaScript unused import and variable errors (TS6133) that cause tsc, builds, or CI checks to fail by locating declared-but-unused identifiers and updating source files to remove or neutralize them.

Core Features & Use Cases

  • Parse compiler output to extract file paths, line numbers, and unused identifier names from TS6133 error messages.
  • Edit source files to delete entire import lines, remove specific named imports, or rename unused variables with a leading underscore where appropriate.
  • Batch processing and verification by grouping fixes per file, applying edits, and re-running type checks to confirm resolution.
  • Use case: Run after a CI failure showing multiple TS6133 errors to automatically clean imports across affected modules and restore a clean type check.

Quick Start

Scan the TypeScript build output for TS6133 errors, remove or adjust the unused imports and variables reported, and re-run the type checker to verify fixes.

Frequently Asked Questions about fix-unused-imports

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically fix TS6133 unused imports errors in TypeScript?

To fix TS6133 unused imports errors, parse the TypeScript compiler output to extract file paths and identifiers, then remove the unused imports or rename variables with a leading underscore to restore a clean type check.

What is the best way to remove unused variables causing tsc build failures?

The best way to remove unused variables causing tsc build failures is to batch process the compiler errors, edit the source files to delete specific named imports, and re-run tsc --noEmit to verify resolution.

Can I automatically clean TypeScript imports after a CI check failure?

Yes, you can automatically clean TypeScript imports after a CI check failure by grouping TS6133 fixes per file, applying the edits to delete entire import lines, and re-running type checks to confirm resolution.

Does this unused imports fix work with JavaScript projects or only TypeScript?

This unused imports fix works with both TypeScript and JavaScript projects, applying declared-but-unused identifier removal during local builds and tsc --noEmit runs when TS6133 errors are reported.

What are the limitations when auto-removing unused TypeScript imports and variables?

A limitation when auto-removing unused TypeScript imports is that it relies strictly on parsing TS6133 compiler output, meaning it only targets declared-but-unused identifiers and requires re-running type checks to confirm resolution.