From tsconfig-hardening
Tighten and rationalize TypeScript configuration safely, especially when enabling stricter compiler checks incrementally.
How this skill is triggered — by the user, by Claude, or both
Slash command
/tsconfig-hardening:tsconfig-hardeningThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- The user wants to enable stricter TypeScript settings safely.
tsconfig chain that needs cleanup or consolidation.tsconfig change.Required before editing
tsconfig files and their extends chain.strict, noImplicitAny, or noUncheckedIndexedAccess.Helpful if present
tsconfig chain and run tsc --showConfig or the nearest equivalent when available.Base config before:
{
"compilerOptions": {
"strict": false,
"noImplicitAny": false
}
}
Base config after:
{
"compilerOptions": {
"strict": false,
"noImplicitAny": true
}
}
Use a single-flag step like this before considering strict: true; the umbrella switch is only safe when the blast radius is already understood.
Package override before:
{
"extends": "../../tsconfig.base.json"
}
Package override after:
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"noImplicitOverride": false
}
}
Use a per-package override like this only to defer a base flag temporarily when one package is not ready yet.
extends chain.skills/tsc-error-triage/SKILL.md to work the failures in root-cause order.strict is the umbrella switch; do not expect it to be a no-op if package configs were already overriding pieces of it.noUncheckedIndexedAccess often exposes index-signature and collection usage at once, so land it separately from optional-property changes.exactOptionalPropertyTypes tends to ripple through object defaults and partial-update helpers, so keep the diff small enough to explain the actual API impact.noImplicitOverride usually stays local to inheritance hierarchies and is a good follow-up batch after the broader nullability work.module, moduleResolution, or outDir changes to stay buildable, pause and re-evaluate the root cause before widening the config patch.Stop broadening the config work when any of these happen:
project-references-migration when the main goal is incremental tsc -b project-references adoption across a layered workspace.tsc-error-triage once config changes have landed and the task becomes source-level compiler error remediation.Run the repository's typecheck command after each config batch.
Run the build if tsconfig affects emit or declaration generation.
Confirm the final config still matches the intended runtime and package layout.
Use references/hardening-scenarios.md to keep strictness sequencing, stop thresholds, and do-not-widen cases aligned with the maintenance loop.
Smoke test:
tsc-error-triage)tsconfig hierarchy and make module resolution predictable."noUncheckedIndexedAccess and exactOptionalPropertyTypes safely."references/strictness-path.md - a safe order for tightening common TypeScript compiler settings and related checks.references/hardening-scenarios.md - scenario checklist for sequencing strictness work without widening scope.Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub matt-riley/lucky-hat --plugin tsconfig-hardening