better-typescript — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited better-typescript (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
This skill extends the main foundations of how Claude Code approaches TypeScript, providing a more detailed and specific approach for writing high-quality TS code.
says string, it must always be string — not accidentally string | undefined.
any is technical debt. If used, the reason must be commented.Unless the user indicates otherwise, assume:
// tsconfig.json (strict mode)
{
"compilerOptions": {
"strict": true,
"noUncheckedIndexedAccess": true,
"exactOptionalPropertyTypes": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"moduleResolution": "bundler",
"target": "ES2024",
"module": "ESNext"
}
}// .prettierrc (for consistent formatting)
{
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 100
}If the project has a tsconfig.json and/or .prettierrc visible in context, read it first and adjust all suggestions to that real configuration.
See Type Preferences for details.
See Code Patterns for details.
See Runtime Validation for details.
See Module Organization for details.
Always:
index.ts only what is public API of the module.See Programming Paradigms for details.
See Metaprogramming for details.
See Comments for details.
| Element | Convention | Example |
|---|---|---|
| Variables / functions | camelCase | getUserById |
| Types / Interfaces | PascalCase | UserRepository |
| Global constants | SCREAMING_SNAKE_CASE | MAX_RETRIES |
| Files | kebab-case | user-repository.ts |
| Booleans | prefix is/has/can | isActive, hasPermission |
| Simple generics | T, U, K, V | Array<T> |
| Descriptive generics | PascalCase | Result<TValue, TError> |
Files can be named with an optional suffix indicating their purpose, like .service.ts, .controller.ts, .types.ts, etc., for example user-identity.service.ts for a service related to user identity.
// ✅ Constrain when the generic has real requirements
function getProperty<TTarget, TKey extends keyof TTarget>(obj: TTarget, key: TKey): TTarget[TKey] {
return obj[key];
}
// ✅ Default types for APIs with good DX
type Paginated<T = unknown> = { items: T[]; total: number; page: number };
// ❌ Do not use generics just to look flexible — if it is always string, it is string
function logMessage<T>(message: T): void {
console.log(message);
}strict: true?any?Read the relevant section based on the detected stack in the project:
fetch (Node 18+), AsyncLocalStorage for context,consider tRPC or Hono for end-to-end type-safety.
FC only if explicit children is needed,prefer JSX.Element or ReactNode returns depending on the case.
@types/nodeunnecessarily.
tsconfig.json and package.json filesto understand the target, runtime, and available dependencies.
.eslintrc, biome.json, etc.), respect its rules.a new addition to the project.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.