Use this skill whenever the user asks you to write, edit, review, refactor, debug, or design TypeScript or TSX code. It is especially relevant for application code, backend routes, React/UI work, schemas, runtime boundaries, persistence, async workflows, API contracts, tests, lint/typecheck fixes, and code review. Apply it even when the user does not explicitly mention "TypeScript" if the files or project are TypeScript-based.
89
85%
Does it follow best practices?
Impact
95%
1.26xAverage score across 5 eval scenarios
Passed
No known issues
{
"context": "Tests whether the agent makes external async work explicit, typed, bounded, and testable. The starter job has hidden effects, floating promises, global mutable state, broad error swallowing, and unbounded request work.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Visible effects",
"description": "Moves network, clock, and persistence effects into clearly named adapter or job functions rather than hiding them inside generic helpers.",
"max_score": 8
},
{
"name": "Explicit deps",
"description": "Passes dependencies such as fetch, clock, logger, and repository explicitly where doing so makes the workflow testable.",
"max_score": 8
},
{
"name": "No global state",
"description": "Avoids hidden module-level mutable state for job progress or request results unless it is a clearly managed cache.",
"max_score": 8
},
{
"name": "Handled promises",
"description": "Handles or returns all promises and does not leave floating promises in loops or callbacks.",
"max_score": 8
},
{
"name": "Abort timeout",
"description": "Uses cancellation, timeout, or abort signals for external calls that can hang or outlive the job.",
"max_score": 10
},
{
"name": "Retry policy",
"description": "Makes retry, backoff, and idempotency behavior explicit around external writes or API calls.",
"max_score": 10
},
{
"name": "Typed outcomes",
"description": "Represents expected recoverable outcomes with a local typed union that callers can branch on instead of vague null or undefined returns.",
"max_score": 8
},
{
"name": "Error context",
"description": "Does not silently swallow errors; either handles them with domain intent or propagates useful context while separating user-facing and diagnostic details where relevant.",
"max_score": 8
},
{
"name": "Safe concurrency",
"description": "Uses Promise.all only for independent work and avoids races around shared mutation, ordering, or dependent operations.",
"max_score": 8
},
{
"name": "Bounded work",
"description": "Bounds potentially large input or external work with batching, pagination, limits, streaming, or backpressure.",
"max_score": 8
},
{
"name": "Deterministic tests",
"description": "Adds tests that control time, network, retries, failures, and concurrency without making real external calls.",
"max_score": 10
},
{
"name": "No Result sprawl",
"description": "Does not add a general Result library or wrap every function in Result when a local outcome type is enough.",
"max_score": 6
}
]
}