/harness-claude:ts-strict-modefrom harness-claude
Enables strict TypeScript checks (strictNullChecks, noImplicitAny, etc.) and guides incremental adoption or migration to stricter type safety.
Claude never picks this skill on its own
Its frontmatter has no description. Without a description, Claude Code leaves it out of the list Claude chooses from. Typing /harness-claude:ts-strict-mode still runs it.
What the skill costs in Claude's context, stage by stage
No description Claude Code can read, so Claude's list leaves it out: only you can start it.
SKILL.md joins the conversation and stays.
Enable and satisfy strict TypeScript checks including strictNullChecks and exactOptionalPropertyTypes
strict: true in tsconfig.json — this activates all strict flags at once:{
"compilerOptions": {
"strict": true
}
}
What strict: true enables:
strictNullChecks — null and undefined are not assignable to other typesstrictFunctionTypes — function parameter types are checked contravariantlystrictBindCallApply — bind, call, apply are fully typedstrictPropertyInitialization — class properties must be initializednoImplicitAny — untyped variables/parameters are errors, not anynoImplicitThis — this must have a type in function bodiesalwaysStrict — emits "use strict" in every fileuseUnknownInCatchVariables — catch variables are unknown, not anyHandle strictNullChecks — the most impactful flag. Check for null before accessing:
function getUser(id: string): User | null {
/* ... */
}
const user = getUser('123');
// user.name; // Error: Object is possibly 'null'
if (user) {
user.name; // OK — narrowed to User
}
noImplicitAny — add explicit types where inference fails:// Error: Parameter 'item' implicitly has an 'any' type
function process(item) {
/* ... */
}
// Fixed
function process(item: unknown) {
/* ... */
}
strictPropertyInitialization — initialize class properties:class Service {
// Error: Property 'db' has no initializer
private db: Database;
// Fix 1: Initialize in constructor
constructor(db: Database) {
this.db = db;
}
// Fix 2: Definite assignment assertion (use sparingly)
private db!: Database;
}
useUnknownInCatchVariables:try {
await fetchData();
} catch (error) {
// error is 'unknown', not 'any'
if (error instanceof Error) {
console.log(error.message);
}
}
strict: true:{
"compilerOptions": {
"strict": true,
"noUncheckedIndexedAccess": true,
"exactOptionalPropertyTypes": true,
"noPropertyAccessFromIndexSignature": true
}
}
noUncheckedIndexedAccess — index signatures include undefined:const map: Record<string, string> = { a: 'hello' };
// Without flag: map['b'] is string
// With flag: map['b'] is string | undefined
{
"compilerOptions": {
"strict": false,
"strictNullChecks": true,
"noImplicitAny": true
}
}
Fix errors per flag before enabling the next.
Strict mode catches entire categories of bugs at compile time: null dereferences, implicit any types, uninitialized properties, and unsafe function calls. The upfront cost of fixing strict errors pays back quickly in reduced runtime bugs.
noUncheckedIndexedAccess is not included in strict: true but is one of the most valuable additional flags. It forces you to handle the case where an array index or object key might not exist, preventing undefined is not a function errors.
exactOptionalPropertyTypes distinguishes between "property is missing" and "property is undefined". With this flag, { name?: string } means the property may be absent, but if present it must be a string (not undefined).
Strict migration strategy:
strict: true and count the errorsstrict and enable flags individually: noImplicitAny first (most errors), then strictNullChecks, then the rest// @ts-expect-error temporarily for errors you cannot fix immediately — track them with a lint ruleTrade-offs:
strictNullChecks causes the most migration pain — but prevents the most common runtime error (null dereference)noUncheckedIndexedAccess adds | undefined to every index access — use non-null assertion (!) or destructuring with defaults for known-safe accesseshttps://typescriptlang.org/tsconfig#strict
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub intense-visions/harness-engineering --plugin harness-claudeRead when SKILL.md points to them.
793 skills in this plugin
/a11y-aria-patternsARIA Patterns> Apply ARIA roles, states, and properties correctly to enhance assistive technology support for custom widgets/a11y-color-contrastColor Contrast and Color Independence> Ensure sufficient color contrast ratios and never use color as the sole means of conveying information/a11y-form-patternsAccessible Form Patterns> Build accessible forms with proper labeling, grouped controls, inline validation, and clear error communicationOther plugins' skills for the same job