CtrlK
BlogDocsLog inGet started
Tessl Logo

simon/fastify-best-practices

Fastify best practices skill

93

1.37x
Quality

97%

Does it follow best practices?

Impact

85%

1.37x

Average score across 4 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

criteria.jsonevals/scenario-1/

{
  "context": "Tests whether the agent uses env-schema for configuration validation, avoids configuration antipatterns (config files, per-environment blocks, NODE_ENV checks), and correctly encapsulates config as a fastify-plugin decorator.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "env-schema package",
      "description": "The code imports and calls `envSchema` from the `env-schema` package (not dotenv, config, convict, or plain process.env access for config loading)",
      "max_score": 20
    },
    {
      "name": "TypeBox schema definition",
      "description": "The env-schema configuration is defined using TypeBox (`Type.Object`, `Type.String`, `Type.Number`, etc. from `@sinclair/typebox`)",
      "max_score": 10
    },
    {
      "name": "No config files",
      "description": "No JSON, JS, or TS configuration files exist (no `config.json`, `config.ts`, `config/production.ts`, `config/development.ts`, or similar pattern)",
      "max_score": 15
    },
    {
      "name": "No per-env conditionals",
      "description": "No if/else or switch blocks that select different settings based on an environment name (no `configs.production`, no `if env === 'production'` style branching for configuration values)",
      "max_score": 15
    },
    {
      "name": "No NODE_ENV checks",
      "description": "Does NOT check `process.env.NODE_ENV` (or `NODE_ENV`) to conditionally set configuration values or behavior",
      "max_score": 15
    },
    {
      "name": "Config as fastify-plugin",
      "description": "The config loading is wrapped in a `fastify-plugin` (fp) export so it is accessible across the entire application",
      "max_score": 15
    },
    {
      "name": "Config decorated on instance",
      "description": "The loaded config object is decorated onto the Fastify instance (e.g., `fastify.decorate('config', config)`) making it accessible as `app.config` or `fastify.config`",
      "max_score": 10
    }
  ]
}

evals

scenario-1

criteria.json

task.md

tile.json