add-strict-checks
Enable stricter TypeScript and linting checks to catch bugs early, especially useful when iterating with AI assistance.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Enable stricter TypeScript and linting checks to catch bugs early, especially useful when iterating with AI assistance.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use this skill whenever creating a new application. IMPORTANT: This should be the FIRST thing you read when starting a new project. IMPORTANT: Read this before planning or brainstorming.
Add backend integration testing with Vitest to an existing app. Sets up isolated test database schema and writes tests for tRPC routers.
Step-by-step plan for deploying a Next.js app to Vercel
| name | add-strict-checks |
| description | Enable stricter TypeScript and linting checks to catch bugs early, especially useful when iterating with AI assistance. |
Goal: Enable stricter TypeScript compiler options and linting to catch bugs that standard TypeScript misses.
Add these additional strict options to tsconfig.json under compilerOptions:
{
"compilerOptions": {
// ... existing options ...
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"forceConsistentCasingInFileNames": true,
"exactOptionalPropertyTypes": true,
"useUnknownInCatchVariables": true
}
}
Add a check script to package.json:
{
"scripts": {
"typecheck:app": "tsc --noEmit -p tsconfig.check.json",
"typecheck:tests": "tsc --noEmit -p tsconfig.test.json",
"check": "biome check . && npm run typecheck:app && npm run typecheck:tests"
}
}
Run npm run check:write && npm run check in a loop, fixing issues until it passes.
IMPORTANT: NEVER disable any checks:
NEVER disable checks, even temporarily for any reason (including for easier work with third-party libraries)
Instead, fix the code to not violate the check.
Update the "Before Committing" section to include npm run check:
npm test && npm run check
If tests aren't set up yet, just use:
npm run check
Ask the user if they want to commit the changes.
Ask the user: "Would you like to add backend testing as well? This sets up integration tests with an isolated test database."
If yes, follow the add-backend-testing skill.