{
  "skill_name": "common-best-practices",
  "evals": [
    {
      "id": 1,
      "prompt": "Refactor this function — it's 80 lines long with 5 levels of if/else nesting.",
      "expected_output": "Apply guard clauses to eliminate nesting (early returns for error conditions). Split into smaller functions <30 lines each. Use intention-revealing names. Result: flat, readable code with clear control flow.",
      "assertions": [
        { "type": "contains", "value": "guard" },
        { "type": "contains", "value": "return" }
      ]
    },
    {
      "id": 2,
      "prompt": "I have a constant API_URL = 'https://api.example.com' hardcoded in 12 different files.",
      "expected_output": "Violation: hardcoded constant. Fix: extract to a named config/env var (e.g., process.env.API_URL or a central config.ts). Update all 12 callsites to reference the single source of truth.",
      "assertions": [
        { "type": "contains", "value": "env" },
        { "type": "contains", "value": "hardcoded" }
      ]
    },
    {
      "id": 3,
      "prompt": "Review my naming conventions — I have functions like doStuff(), handleIt(), and process().",
      "expected_output": "Violation: vague names. Apply intention-revealing naming: doStuff() → submitOrderPayment(), handleIt() → handleUserLoginError(), process() → processInvoiceBatch(). Names should express what and why, making the code self-documenting.",
      "assertions": [
        { "type": "contains", "value": "naming" },
        { "type": "contains", "value": "intention" }
      ]
    }
  ],
  "should_not_trigger": [
    "Deploy my Docker container to Kubernetes",
    "Write a SQL query to find duplicate rows",
    "Configure Nginx as a reverse proxy"
  ]
}
