build-evals
Build LLM eval tests for MCP tool collections. Reads .discover.json and creates eval setup and scenario test files per collection. Use after running '/build-tools'.
What this skill does
# Build Evals
Generate LLM eval tests for MCP tool collections created by `/build-tools`. This skill reads `.discover.json` and the existing tool files, then builds eval test files in `tests/evals/` one collection at a time.
**IMPORTANT: This skill ONLY creates files inside `tests/evals/` — the setup file and eval test files. Do NOT create or modify tool files, collection indexes, integration tests, mock handlers, or any other files.**
**Key difference from integration tests (`/build-tools-tests`):**
- Integration tests: one file per tool, test handlers directly against real API, deterministic
- Eval tests: group related tools by workflow, test via Claude Agent SDK, probabilistic, require `npm run build` first (run against `dist/`)
## Prerequisites
Before running, ensure:
1. You have run `/build-tools` (tool collections exist in `src/umbraco-api/tools/`)
2. The project builds: `npm run build`
3. An LLM API key is available (eval tests use Claude Agent SDK — works with a Claude Code subscription or `ANTHROPIC_API_KEY`)
## Arguments
- No arguments: build evals for all collections from `.discover.json`
- Single collection name: build evals only for that collection (e.g. `/build-evals form`)
## Agents
This skill orchestrates the following agent — use it for the relevant step:
| Agent | When to use |
|-------|-------------|
| `eval-test-creator` | Creating eval test files (Step 5) |
## Critical Rules
**BUILD BEFORE RUNNING.** Eval tests run against `dist/index.js`. Always `npm run build` first.
**ONE COLLECTION AT A TIME.** Complete each collection before starting the next.
**GROUP TOOLS BY WORKFLOW.** Unlike integration tests (one file per tool), eval tests group related tools into workflow scenarios. A collection with 5 tools might have just 1-2 eval test files.
**ITERATE ON PROMPTS.** Eval tests are probabilistic. If a test fails, the fix is usually in the prompt — make instructions more explicit, add search steps for IDs, use unique identifiers.
**VERBOSE DURING DEVELOPMENT.** Always set `verbose: true` when creating/debugging. Disable after tests pass reliably.
**RUN COMMANDS SEPARATELY.** Always run build and test as separate Bash calls. Never chain them with `&&`.
## Workflow
Process **one collection at a time**. Complete each collection fully before starting the next.
### Step 0: Read Discovery Manifest
Read `.discover.json` from the project root:
```json
{
"apiName": "Umbraco Forms Management API",
"swaggerUrl": "https://localhost:44324/umbraco/swagger/forms-management/swagger.json",
"baseUrl": "https://localhost:44324",
"collections": ["form", "form-template", "field-type", "folder"]
}
```
If an argument was provided, filter to only that collection. If `.discover.json` doesn't exist, tell the user to run `npx @umbraco-cms/create-umbraco-mcp-server discover` first.
### Step 1: Check Prerequisites
For each collection, verify:
- `src/umbraco-api/tools/{collection}/index.ts` exists — if not, skip and tell the user to run `/build-tools` first
Check if eval tests already exist for this collection by looking for `tests/evals/{collection}-*.test.ts` files. **Skip if eval test files already exist** — evals have already been created for this collection.
Then ensure the eval setup exists and the project builds:
- If `tests/evals/helpers/e2e-setup.ts` doesn't exist, create it (Step 3)
- If `tests/evals/jest.config.ts` doesn't exist, create it (Step 3)
```bash
npm run build
```
Fix any build errors before continuing. Evals run against `dist/index.js` — if it doesn't build, evals can't run.
### Step 2: Read Tool Files
For each collection, read:
- `src/umbraco-api/tools/{collection}/index.ts` — to get the list of tools and collection metadata
- Each tool file — to understand:
- Tool names
- Input schemas (what parameters each tool accepts)
- Descriptions (what each tool does)
- Slices (read, list, create, update, delete, search, etc.)
Build a mental inventory of which operations are available. This determines what workflow scenarios to create.
### Step 3: Create Eval Setup (if not exists)
Eval tests use a centralized setup at `tests/evals/`. Only create these files if they don't already exist.
#### `tests/evals/jest.config.ts`
```typescript
import type { Config } from "jest";
const config: Config = {
preset: "ts-jest/presets/js-with-ts-esm",
testEnvironment: "node",
extensionsToTreatAsEsm: [".ts"],
rootDir: "../..",
moduleNameMapper: {
"^(\\.{1,2}/.*)\\.js$": "$1",
"^@/(.*)$": "<rootDir>/src/$1",
},
transform: {
"^.+\\.tsx?$": [
"ts-jest",
{
useESM: true,
},
],
},
testMatch: ["<rootDir>/tests/evals/**/*.test.ts"],
setupFilesAfterEnv: ["<rootDir>/tests/evals/helpers/e2e-setup.ts"],
setupFiles: ["<rootDir>/jest.setup.ts"],
testPathIgnorePatterns: ["/node_modules/"],
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
maxConcurrency: 1,
maxWorkers: 1,
testTimeout: 120000,
slowTestThreshold: 300,
};
export default config;
```
#### `tests/evals/helpers/e2e-setup.ts`
**Detect API mode:** Check if `src/mocks/` exists with handler files. If mocks exist, use `USE_MOCK_API: "true"`. Otherwise, configure for real API using `.env` credentials.
**Mock API setup** (if `src/mocks/` exists):
```typescript
import path from "path";
import { configureEvals, ClaudeModels } from "@umbraco-cms/mcp-server-sdk/evals";
configureEvals({
mcpServerPath: path.resolve(process.cwd(), "dist/index.js"),
mcpServerName: "{mcp-server-name}",
serverEnv: {
USE_MOCK_API: "true",
DISABLE_MCP_CHAINING: "true",
UMBRACO_CLIENT_ID: "test-client",
UMBRACO_CLIENT_SECRET: "test-secret",
UMBRACO_BASE_URL: "http://localhost:9999",
},
defaultModel: ClaudeModels.Haiku,
defaultMaxTurns: 10,
defaultMaxBudgetUsd: 0.25,
defaultTimeoutMs: 60000,
});
```
**Real API setup** (no mocks):
```typescript
import path from "path";
import { configureEvals, ClaudeModels } from "@umbraco-cms/mcp-server-sdk/evals";
configureEvals({
mcpServerPath: path.resolve(process.cwd(), "dist/index.js"),
mcpServerName: "{mcp-server-name}",
serverEnv: {
UMBRACO_CLIENT_ID: process.env.UMBRACO_CLIENT_ID || "",
UMBRACO_CLIENT_SECRET: process.env.UMBRACO_CLIENT_SECRET || "",
UMBRACO_BASE_URL: process.env.UMBRACO_BASE_URL || "",
DISABLE_MCP_CHAINING: "true",
},
defaultModel: ClaudeModels.Haiku,
defaultMaxTurns: 10,
defaultMaxBudgetUsd: 0.25,
defaultTimeoutMs: 60000,
});
```
**Key rules:**
- Uses `process.cwd()` to resolve `dist/index.js` — setup runs from project root via Jest
- Get `mcpServerName` from `package.json` `name` field or `src/index.ts`
- Set `DISABLE_MCP_CHAINING: "true"` to avoid connecting to chained servers during tests
- Use conservative defaults: Haiku model, 10 turns, $0.25 budget, 60s timeout
- This file is loaded automatically via `setupFilesAfterEnv` — test files do NOT need to import it
Also ensure the `test:evals` script in `package.json` uses the dedicated config:
```json
"test:evals": "npm run build && node --experimental-vm-modules $(npm root)/jest/bin/jest.js --config tests/evals/jest.config.ts --runInBand --forceExit"
```
### Step 4: Design Eval Scenarios
Based on the tools available in the collection (from Step 2), design 1-2 workflow scenarios:
#### CRUD Lifecycle (if create + list/get + update + delete tools exist)
Test the full create-read-update-delete cycle:
1. Create an item with a unique name (use timestamp)
2. List items to confirm it was created
3. Get the specific item by ID
4. Update the item
5. Delete the item
#### Read-Only Workflow (if only get/list/search tools exist)
Test read operations:
1. List items
2. Get details for a specific item from the list
#### Search Workflow (if search + get tools exist)
Test search and retrieval:
1. Search for items matching a criteria
2. Get details for a result
#### Hierarchical Workflow (if folder/tree tools exist)
Test hierarchy operaRelated in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.