tsc

tsc is a command for Claude Code from Insight-Services-APAC/ingenious. It costs 0 tokens per session (447 once invoked), scanned A, original, MIT.

A command for running the TypeScript compiler, the tool that checks TypeScript code for type mistakes, without producing build files.

In plain words
What is it for?
Use it to check a TypeScript project, inspect compiler errors, fix common type problems, and rerun the check after each change.
Why use it?
It finds incorrect or missing types before they cause problems at runtime and guides you to the files and lines that need changes.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/insight-services-apac/ingenious/tsc
Clone the repo
git clone --depth 1 https://github.com/Insight-Services-APAC/ingenious

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tsc

README.md
[![agentmods](https://agentmods.dev/badge/commands/insight-services-apac/ingenious/tsc.svg)](https://agentmods.dev/commands/insight-services-apac/ingenious/tsc)
Your own site
<a href="https://agentmods.dev/commands/insight-services-apac/ingenious/tsc"><img src="https://agentmods.dev/badge/commands/insight-services-apac/ingenious/tsc.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 447 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00447
Opus 5 $0.00000 $0.00224
Sonnet 5 $0.00000 $0.00089
Haiku 4.5 $0.00000 $0.00045

Measured today against content hash e36874f70905, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

tsc scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/quality/js-quality/tsc.md · 72 lines

What it actually says

Find and Fix TypeScript Errors

Use the TypeScript compiler to check for type errors in your codebase.

1. Run Type Check

npx tsc --noEmit

Or using the project's build script:

npm run build:check

2. Review Output

For each error, note:

  • File path and line number
  • Error code (e.g., TS2339, TS7006)
  • Error description

3. Common Type Errors and Fixes

  • TS2339 (Property does not exist) -> Add to interface or use type assertion
  • TS7006 (Parameter has implicit any) -> Add explicit type annotation
  • TS2345 (Argument type mismatch) -> Fix the type or use type guard
  • TS2322 (Type not assignable) -> Ensure types are compatible
  • TS2531 (Object possibly null) -> Add null check or use optional chaining
  • TS2532 (Object possibly undefined) -> Add undefined check
  • TS18046 (Unknown type) -> Add type narrowing

4. Fix Iteratively

For each error:

  1. Update code to fix the type issue
  2. Re-run type check to verify:
    npx tsc --noEmit
    
  3. Commit when a file is clean:
    git add <file>
    git commit -m "fix(types): resolve TS<code> in <file>"
    

5. Strict Mode Settings

For stricter checking, ensure tsconfig.json includes:

{
  "compilerOptions": {
    "strict": true,
    "noImplicitAny": true,
    "strictNullChecks": true,
    "noImplicitReturns": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true
  }
}

6. Final Validation

npx tsc --noEmit
npm run build
npm test

Goal: Zero TypeScript errors with strict mode enabled.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 72 lines · 0 tokens per session scan A e36874f70905

Subscribe to this mod's changes

tsc is a command published in the GitHub repository Insight-Services-APAC/ingenious (24 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 447 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.