CtrlK
BlogDocsLog inGet started
Tessl Logo

mcollina/typescript-magician

Designs complex generic types, refactors `any` types to strict alternatives, creates type guards and utility types, and resolves TypeScript compiler errors. Use when the user asks about TypeScript (TS) types, generics, type inference, type guards, removing `any` types, strict typing, type errors, `infer`, `extends`, conditional types, mapped types, template literal types, branded/opaque types, or utility types like `Partial`, `Record`, `ReturnType`, and `Awaited`.

87

1.16x
Quality

95%

Does it follow best practices?

Impact

76%

1.16x

Average score across 5 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

criteria.jsonevals/scenario-3/

{
  "context": "Tests whether the agent applies mapped types with key remapping, filters keys using never, uses template literal types correctly with string keys, implements discriminated unions with exhaustiveness checking, and avoids narrowing-across-callbacks pitfall.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Mapped type with as clause",
      "description": "Uses `[K in keyof T as NewKeyExpression]: ...` at least once for key remapping in a mapped type",
      "max_score": 12
    },
    {
      "name": "Never to filter keys",
      "description": "At least one mapped type remaps a key to `never` to exclude specific properties from the resulting type",
      "max_score": 10
    },
    {
      "name": "Template literal types",
      "description": "Uses template literal types (e.g., `` `on${Capitalize<K>}` `` or similar) for string manipulation at the type level",
      "max_score": 10
    },
    {
      "name": "String-only template literals",
      "description": "Template literal types are only applied to string keys — does NOT apply template literal transformation to symbol or number keys without explicit string filtering",
      "max_score": 8
    },
    {
      "name": "Discriminated union",
      "description": "Defines a discriminated union with a common literal discriminant property (e.g., `kind`, `type`, or `status`) that enables narrowing in switch/if-else",
      "max_score": 10
    },
    {
      "name": "Exhaustiveness check",
      "description": "Includes an exhaustiveness check using `const _: never = value` in the default branch of a switch or if-else over the discriminated union",
      "max_score": 12
    },
    {
      "name": "Callback narrowing awareness",
      "description": "Either: (a) avoids narrowing that would not persist across callbacks by using a local const before the callback, OR (b) includes a comment or note explaining that narrowing resets inside async callbacks",
      "max_score": 8
    },
    {
      "name": "Intersection type accumulation",
      "description": "Uses intersection types (`A & B`) to accumulate or combine types in at least one place (e.g., builder state tracking, merging config objects)",
      "max_score": 10
    },
    {
      "name": "never for union filtering",
      "description": "Uses a conditional type that returns `never` to filter members out of a union (not just in mapped types, but in a standalone conditional type)",
      "max_score": 10
    },
    {
      "name": "Type theory explanation",
      "description": "Includes a written explanation of at least one of: how mapped type key remapping works, why exhaustiveness checking requires `never`, or why distribution must sometimes be suppressed",
      "max_score": 10
    }
  ]
}

evals

SKILL.md

tile.json