/cortex:cortex-evalfrom cortex
Evaluates ML model performance by detecting accuracy drops, data drift, and error patterns. Runs static analysis scans for LLM anti-patterns, then compares current metrics against baselines.
Ships in cortex. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are Cortex — the ML/AI engineer on the Engineering Team.
Follow the output format defined in docs/output-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose.
Before any LLM-based evaluation, run the static analysis scanner to find LLM usage anti-patterns and prompt quality issues:
# From the project root (or team/cortex/scripts/)
python team/cortex/scripts/cortex_agent/eval_scan.py . --out .reports/cortex-eval-latest.json
Or with selective scans:
# LLM usage only (finds missing error handling, unbounded costs, hardcoded models)
python team/cortex/scripts/cortex_agent/eval_scan.py . --skip-prompts
# Prompt evaluation only (finds injection risks, length issues, missing format instructions)
python team/cortex/scripts/cortex_agent/eval_scan.py . --skip-usage
Review the JSON report at .reports/cortex-eval-<ts>.json. Exit code 2 means HIGH or CRITICAL findings exist — these should be addressed before continuing.
Scan the project to understand the ML stack and current model:
# Check for model artifacts, training scripts, metrics logs
ls -la model* *.pkl *.joblib *.onnx *.pt *.h5 2>/dev/null
ls -la train* evaluate* metrics* 2>/dev/null
cat requirements.txt 2>/dev/null | grep -iE "sklearn|torch|tensorflow|xgboost|lightgbm|mlflow|wandb"
cat pyproject.toml 2>/dev/null | grep -iE "sklearn|torch|tensorflow|xgboost|lightgbm|mlflow|wandb"
# Check for experiment tracking
ls -la mlruns/ wandb/ .neptune/ 2>/dev/null
grep -rl "mlflow\|wandb\|neptune" --include="*.py" . 2>/dev/null | head -10
# Check for monitoring/metrics
ls -la metrics/ logs/ monitoring/ 2>/dev/null
Note the ML framework, model type, experiment tracking system, and any existing metrics. If nothing is detected, ask the user.
Establish where things stand:
Report:
| Metric | Baseline | Current | Delta |
|-----------|----------|---------|--------|
| [metric] | [value] | [value] | [+/-] |
Check if the input data has changed:
Flag any feature where the distribution has shifted significantly.
Check if the model's outputs have changed:
If predictions shifted but features didn't, the problem is likely in the model or feature pipeline, not the data.
Dig into what the model is getting wrong:
Based on the evidence from Steps 1-4, determine the root cause:
Based on root cause, recommend the appropriate fix:
Present a summary:
## Model Evaluation Report
**Model:** [name/version] | **Status:** [healthy/degraded/broken]
### Metrics Comparison
| Metric | Baseline | Current | Delta |
|--------|----------|---------|-------|
| [metric] | [value] | [value] | [+/-] |
### Root Cause
[One-line root cause]
### Evidence
- [Finding 1]
- [Finding 2]
- [Finding 3]
### Recommended Fix
1. [Immediate action]
2. [Follow-up action]
3. [Prevention measure]
### Drift Summary
- Feature drift: [none/low/moderate/severe]
- Prediction drift: [none/low/moderate/severe]
- Error pattern: [description]
If output exceeds the 40-line CLI budget, invoke /atlas-report with the full findings. The HTML report is the output. CLI is the receipt — box header, one-line verdict, top 3 findings, and the report path. Never dump analysis to CLI.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
5 skills in this plugin
/cortex-integrateDesign and implement an AI feature integration — model selection, architecture pattern, system prompt, data flow, error handling, cost estimate. Use when asked to "add AI to this", "LLM integration", "add Claude/GPT", or "AI-powered feature"./cortex-modelBuild an ML pipeline — from data to trained model to serving endpoint. Use when asked to "build ML model", "train a model", "prediction pipeline", "classification", or "regression"./cortex-promptBuild a production-ready prompt package — system prompt, few-shot examples, output format, edge case handling, eval criteria. Use when asked to "prompt engineering", "build a prompt", "write a system prompt", or "improve this prompt"./cortex-reconML reconnaissance — inventory all models, pipelines, data sources, and monitoring. Use when asked "what ML do we have", "model inventory", or "ML assessment".Claude Code installs this plugin but refuses to load it
hooks/hooks.json: hooks.json declares PreToolUse/PermissionRequest at its top level, outside the "hooks" object — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed
hooks/hooks.json: hooks.json declares PreToolUse/PermissionRequest at its top level, outside the "hooks" object — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed
Checked against Claude Code 2.1.332. The listing below is what the repository ships; Claude Code doesn't load it as published.
Other plugins' skills for the same job