TypeScript and ESLint Check & Fix

VerifiedSafe

Run TypeScript type-check and ESLint, then fix any errors found. Use when you need to validate code quality or fix linting issues.

Sby Skills Guide Bot
DevelopmentIntermediate
6/2/2026
Claude CodeCursorWindsurfCopilotCodex
#typescript#eslint#code-quality#linting#type-check

Recommended for

Automated summary

Runs TypeScript type-check and ESLint, then automatically fixes any errors found, following strict guidelines to delete unused code.

Strengths

  • Automates fixing type and lint errors
  • Enforces deletion of unused code (no underscore prefixing)
  • Fix-and-check cycle until clean pass
  • Respects project architecture and type safety

Limitations

  • Requires a preconfigured npm run check command
  • May introduce unwanted changes if error analysis is misinterpreted
  • Does not handle business logic or test failures
When to use it

When you need to validate and clean TypeScript code quality before a commit, PR, or deployment.

When not to use it

When the project lacks a check script or you intentionally want to keep unused code.

Security analysis

Safe
Quality score90/100

The skill instructs running 'npm run check' (a local development script) and using the Edit tool to fix found errors. No destructive or exfiltrating actions are involved, and no network requests or external scripts are executed. It is a standard code-quality maintenance task.

No concerns found

How this analysis is made

Examples

Fix all TS and ESLint errors
Run the check command to find and fix all TypeScript and ESLint errors in the project. Make sure to delete any unused imports, variables, or parameters instead of prefixing them with underscores.
Check and fix a specific file
Run TypeScript type-check and ESLint on src/components/Button.tsx, then fix any errors found.

name: check description: Run TypeScript type-check and ESLint, then fix any errors found. Use when you need to validate code quality or fix linting issues.

TypeScript and ESLint Check & Fix

Run TypeScript type-check and ESLint, then fix any errors found.

Instructions

  1. Run the check command:

    • Execute npm run check to run both TypeScript type-check and ESLint
    • Capture and analyze all errors and warnings
  2. If errors are found:

    • Analyze each error carefully before making changes
    • Fix TypeScript errors:
      • Resolve type mismatches
      • Add missing type annotations
      • Fix import/export issues
      • Ensure proper null/undefined handling
    • Fix ESLint errors:
      • CRITICAL: For no-unused-vars errors, DELETE unused code completely
      • DO NOT prefix variables with underscores - remove them instead
      • Fix import order and formatting issues
      • Resolve any other ESLint rule violations
    • Use appropriate tools:
      • Use Edit tool for file changes (not bash sed/awk)
      • Use Read tool to examine files before editing
      • Make targeted, precise fixes
  3. Re-run the check:

    • After fixing errors, run npm run check again
    • Verify all errors are resolved
  4. Repeat until clean:

    • Continue the fix-and-check cycle until npm run check passes without errors
    • Report the final status

Project-Specific Guidelines

  • Unused Code Policy: DELETE unused imports, variables, and parameters - don't prefix with underscores
  • Architecture: Follow /src/ directory structure with features, components, lib separation
  • Type Safety: Maintain proper TypeScript types throughout
  • Code Quality: Ensure all fixes improve code quality, don't just silence errors

Success Criteria

  • ✅ npm run check completes with exit code 0
  • ✅ No TypeScript errors
  • ✅ No ESLint errors or warnings
  • ✅ All unused code removed (not just prefixed)
  • ✅ Code remains functional after fixes

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/typescript-and-eslint-check-fix-mma3js1k/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/typescript-and-eslint-check-fix-mma3js1k' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/typescript-and-eslint-check-fix-mma3js1k/download' --output '.skill-downloads/typescript-and-eslint-check-fix-mma3js1k/SKILL.md.part' && mv '.skill-downloads/typescript-and-eslint-check-fix-mma3js1k/SKILL.md.part' '.skill-downloads/typescript-and-eslint-check-fix-mma3js1k/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/typescript-and-eslint-check-fix-mma3js1k/SKILL.md' && test -s '.skill-downloads/typescript-and-eslint-check-fix-mma3js1k/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/check' && cp -R '.skill-downloads/typescript-and-eslint-check-fix-mma3js1k' '.claude/skills/check'

Cursor
test -f '.skill-downloads/typescript-and-eslint-check-fix-mma3js1k/SKILL.md' && test -s '.skill-downloads/typescript-and-eslint-check-fix-mma3js1k/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/check' && cp -R '.skill-downloads/typescript-and-eslint-check-fix-mma3js1k' '.cursor/skills/check'

Codex
test -f '.skill-downloads/typescript-and-eslint-check-fix-mma3js1k/SKILL.md' && test -s '.skill-downloads/typescript-and-eslint-check-fix-mma3js1k/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/check' && cp -R '.skill-downloads/typescript-and-eslint-check-fix-mma3js1k' '.agents/skills/check'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/typescript-and-eslint-check-fix-mma3js1k'

openskills read 'typescript-and-eslint-check-fix-mma3js1k'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/typescript-and-eslint-check-fix-mma3js1k/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills