agentleFS
PradnyeshpPradnyeshp/Claude-Skills/.claude/skills/typecheck/SKILL.md

typecheck

Skill2 starsChanged 4 months agoMITView on GitHub

Run the project's type checker (tsc, mypy, pyright, etc.) and fix the reported type errors at the source, without weakening types or suppressing. Use when the user says "run the type checker", "fix type errors", "make tsc pass", "fix the mypy errors", "typecheck this", or "why won't this compile".

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run the project's type checker and fix the errors it reports (scoped to $ARGUMENTS if given).

    line 19
  2. Distinctive:

    If the checker isn't installed, report that and the install command instead of guessing errors.

    line 26
  3. Very specific:

    A type error can be a real bug: When the checker is right that a value can be null, an access is unsafe, or a branch is unreachable, fix …

    line 29
  4. Very specific:

    No silencing to force a pass: Don't use any/as any/@ts-ignore/# type: ignore/cast to make errors disappear.

    line 34
  5. Distinctive:

    Don't loosen the project's config (strict flags, etc.) to reduce errors.

    line 35
  6. Distinctive:

    Prefer precise fixes (real types, narrowing, generics) over broadening to a supertype that hides the problem.

    line 37

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Type checker config

!ls tsconfig.json jsconfig.json mypy.ini pyrightconfig.json pyproject.toml setup.cfg 2>/dev/null

!grep -hiE "strict|noImplicitAny|noUncheckedIndexedAccess|disallow_untyped|warn_return_any" tsconfig.json mypy.ini pyproject.toml 2>/dev/null | head -10

!cat package.json 2>/dev/null | grep -A30 '"scripts"' | grep -iE 'typecheck|tsc|type-check' | head

Instructions

Run the project's type checker and fix the errors it reports (scoped to $ARGUMENTS if given). Use the project's configured checker and strictness — don't impose your own.

Method

  1. Identify the checker and command from the config above, preferring an existing script:
    • TS/JS: tsc --noEmit (or the typecheck script); respect the existing tsconfig strictness.
    • Python: mypy <pkg> or pyright, per the project's config.
    • If the checker isn't installed, report that and the install command instead of guessing errors.
  2. Run it first to get the full, real error list and counts. Read the actual diagnostics — don't anticipate errors that aren't reported.
  3. Fix at the root, not the symptom. Group errors by underlying cause (one wrong type often cascades). For each: read the code and types to understand what's actually true, then correct the type or the code so it's sound — add a missing annotation, narrow a union, fix an incorrect signature, handle a null/undefined case, import the right type.
  4. A type error can be a real bug. When the checker is right that a value can be null, an access is unsafe, or a branch is unreachable, fix the logic — don't just satisfy the checker. Flag these explicitly.
  5. Re-run until clean (or until only genuinely-unfixable third-party cases remain), and show the before/after error counts.

Rules

  1. No silencing to force a pass. Don't use any/as any/@ts-ignore/# type: ignore/cast to make errors disappear. A suppression is a last resort only for a real tooling/library gap — narrowly scoped, with a comment explaining why, and called out in the summary.
  2. Don't loosen the project's config (strict flags, etc.) to reduce errors. If a setting seems wrong, raise it with the user rather than editing it.
  3. Preserve runtime behavior unless a type error reveals a genuine bug — in which case fix the bug and say so. Don't change logic just to dodge a type.
  4. Prefer precise fixes (real types, narrowing, generics) over broadening to a supertype that hides the problem.
  5. Summarize: the checker run, errors fixed grouped by cause, any real bugs uncovered, the remaining count, and anything suppressed and why.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.