CtrlK
BlogDocsLog inGet started
Tessl Logo

simon/skills

Auto-generated tile from GitHub (10 skills)

92

1.16x
Quality

94%

Does it follow best practices?

Impact

92%

1.16x

Average score across 44 eval scenarios

SecuritybySnyk

Advisory

Suggest reviewing before use

Overview
Quality
Evals
Security
Files

criteria.jsonevals/scenario-23/

{
  "context": "Tests whether the agent uses opaque/branded types to enforce nominal typing for domain identifiers, writes assertion functions with the correct `function` keyword syntax (not arrow functions), uses type predicates for conditional narrowing, avoids raw casts to branded types, and models a discriminated union with exhaustiveness checking.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Opaque/branded type definition",
      "description": "Defines at least two distinct branded types using the pattern `TValue & { __brand: TBrand }` or a unique-symbol-based brand — NOT just type aliases like `type AccountId = string`",
      "max_score": 15
    },
    {
      "name": "Assertion function keyword",
      "description": "Assertion functions (those whose return type is `asserts value is T`) are declared using the `function` keyword, NOT as arrow functions or `const` assignments",
      "max_score": 15
    },
    {
      "name": "Type predicate function",
      "description": "At least one type predicate function is present, returning `boolean` with the explicit annotation `value is BrandedType` (or equivalent), enabling conditional narrowing without throwing",
      "max_score": 10
    },
    {
      "name": "No raw cast without validation",
      "description": "Branded types are NOT created by direct cast (`rawString as AccountId`) without first passing through a validator or assertion — every creation of a branded value is guarded by a runtime check",
      "max_score": 15
    },
    {
      "name": "unknown for unvalidated input",
      "description": "Functions that accept unvalidated external input use `unknown` as the parameter type, not `any`",
      "max_score": 10
    },
    {
      "name": "Discriminated union",
      "description": "At least one discriminated union type is defined, using a literal-typed discriminant property (e.g., `kind: 'deposit'`, `type: 'withdrawal'`) to distinguish between union members",
      "max_score": 10
    },
    {
      "name": "Exhaustiveness check",
      "description": "The switch or if-else that handles the discriminated union includes a `default` branch (or equivalent) that assigns `shape` to a variable typed `never`, so adding a new union member without handling it produces a compile error",
      "max_score": 10
    },
    {
      "name": "Before/after illustration",
      "description": "Includes a comment block or documentation showing an example of WHY plain type aliases (`type AccountId = string`) are insufficient — i.e., demonstrating that without branding, `AccountId` and `PaymentId` (or equivalents) are structurally interchangeable",
      "max_score": 10
    },
    {
      "name": "No any in validators",
      "description": "The validator and domain-type files do NOT use `any` — only `unknown`, concrete types, or branded types",
      "max_score": 5
    }
  ]
}

evals

README.md

tile.json