用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/notque/vexjoy-agent --skill typescript-check命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | typescript-check |
| description | TypeScript type checking via tsc --noEmit with actionable error output. |
| user-invocable | false |
| allowed-tools | ["Read","Bash","Grep","Glob"] |
| agent | typescript-frontend-engineer |
| routing | {"triggers":["TypeScript check","tsc noEmit","type check TypeScript","tsc errors","TypeScript type validation"],"category":"code-quality","pairs_with":["vitest-runner","code-linting"]} |
This skill validates TypeScript code by running tsc --noEmit and parsing errors into structured, actionable reports organized by file. It is a read-only validation step (does not modify code) that implements a linear workflow: locate config → execute compiler → parse output → present results.
Use this skill when validating TypeScript code before commits, after refactors, or checking for type regressions. Do not use for linting, test execution, runtime errors, or projects without tsconfig.json.
Locate tsconfig.json in the project. This step is mandatory—never skip it. tsc without a tsconfig.json falls back to default settings, missing project-specific configuration like paths, strict mode, and compiler targets.
ls tsconfig.json 2>/dev/null || ls */tsconfig.json 2>/dev/null
If no tsconfig.json exists, stop and inform the user. Do not proceed without configuration.
Why: Running without tsconfig.json produces unreliable results that don't match the project's actual settings.
Execute the TypeScript compiler in type-check-only mode using --noEmit:
npx tsc --noEmit 2>&1
Capture the exit code:
Do not install TypeScript or dependencies. If TypeScript is not installed, inform the user and suggest npm install typescript --save-dev. This is a read-only skill—never modify package.json or run installation commands.
Why: --noEmit prevents generating .js files and gives you a clean type-only report. The exit code tells you definitively whether compilation succeeded.
For each error line in the tsc output, extract:
Group errors by source file and sort by line number. This helps users fix issues systematically rather than jumping randomly through the codebase.
Why: Users need actual file paths, line numbers, and error codes to fix issues. Suppressing or summarizing this information (e.g., "5 errors found") makes errors unsolvable.
Format output using this structure. Always show the full exit code and complete error details:
=== TypeScript Type Check ===
Status: PASS / FAIL (N errors)
Errors by File:
---------------
src/components/Button.tsx
Line 15:3 TS2322 Type 'string' is not assignable to type 'number'
Line 28:10 TS2339 Property 'foo' does not exist on type 'Props'
src/utils/helpers.ts
Line 5:1 TS7006 Parameter 'x' implicitly has an 'any' type
Summary: N files, M errors
Never present type errors as context for auto-fixing without explicit user request. Type check is a validation step—the user may want to review errors, may disagree with a fix approach, or may have a different solution in mind.
Why: Including the exit code and full output gives users all the context they need to make informed decisions about fixes.
Cause: No TypeScript configuration in the project root or specified path.
Solution:
--project path/to/tsconfig.jsonCause: TypeScript is not installed as a project dependency.
Solution:
npm install typescript --save-devCause: Node.js toolchain is not installed or not in PATH.
Solution:
node --versionnpm exec tsc -- --noEmitCause: Project has nested or monorepo structure with multiple TypeScript configurations.
Solution:
--project path/to/specific/tsconfig.jsonWhy explicit error handling matters: tsc may fail silently, produce incomplete output, or exit unexpectedly. Capturing and reporting the actual error lets the user understand what went wrong and how to fix it.
| Flag | Purpose |
|---|---|
--noEmit | Type check only, do not generate .js files |
--project path | Use specific tsconfig.json |
--skipLibCheck | Skip type checking .d.ts files (faster on large projects) |
--incremental | Use incremental compilation (faster for repeat runs) |
--strict | Enable all strict type checks |