skills/typecheck/SKILL.md
TypeScript type-safety rules and guidance.
npx skillsauth add morgs32/skills typecheckInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when handling TypeScript type errors or type-safety decisions.
as anyCRITICAL: NEVER add as any type assertions to fix TypeScript errors. If you
cannot figure out a proper type-safe solution, tell the user that you can't
figure it out rather than using as any.
Using as any:
✅ DO: Analyze the error message carefully to understand the type mismatch
✅ DO: Check if helper types or type utilities can resolve it
✅ DO: Consider if the API or type definitions need improvement
✅ DO: Tell the user if you cannot find a type-safe solution
❌ DON'T: Add as any to silence the error
❌ DON'T: Use as unknown as T as a workaround (same problem as as any)
❌ DON'T: Use @ts-ignore or @ts-expect-error to suppress type errors
// ❌ WRONG - Never do this
const rows = yield* db
.select()
.from(pgTable as any)
.where(eq(pgTable.id, id));
// ❌ WRONG - This is also bad
const value = someValue as unknown as ExpectedType;
If after careful analysis you cannot find a type-safe solution, you should:
Example response:
"I'm encountering a TypeScript error where
pgTablefrommodels[modelName]cannot be properly narrowed for use in Drizzle's.from()method. The complex generic types fromInferAggregateModelsare preventing proper type inference. I've tried [X, Y, Z approaches] but cannot find a type-safe solution. This likely requires improving the type definitions for the table mapping or using a different pattern for accessing tables. I cannot figure out a proper type-safe fix for this."
development
Create and map ZerospinError instances for Effect-based code in zerospin. Use when defining error codes/messages, wrapping causes, mapping/catching errors in Effects, or returning structured errors from Effect.gen/Effect.fn or promise boundaries.
data-ai
Update agent skills in this repo or another.
devops
Fix and update Turborepo (Turbo) configuration and task setup. Use for turbo.json errors, schema updates (pipeline -> tasks), and package-level config issues like missing extends.
development
Linting workflow rules for this workspace.