analyze-candidateslisted
Install: claude install-skill produtoramaxvision/maxvision
# Analyze candidates (Sonnet-as-judge)
Argument: `$ARGUMENTS` — JSON `{"task": "<user task>", "candidates": [{"name": "...", "kind": "skill|agent", "source": "cheatsheet|fts5|both", ...}, ...]}`
## Workflow (v0.5.0 — Sonnet-as-judge)
### 1. Preflight
```bash
set -euo pipefail
INDEX_DB="${MAXVISION_INDEX_DB:-$HOME/.claude/cache/maxvision/index.db}"
test -f "$INDEX_DB" || {
echo '{"matrix":[],"error":"index missing","suggestion":"Run /maxvision:index-catalog first"}'
exit 1
}
```
### 2. Parse input
Extract from `$ARGUMENTS`:
- `task` — the user's task string (verbatim).
- `candidates` — array of `{name, kind, source, source_id?, bm25_score?, priority_hint?}` from route-task's parallel merge.
### 3. Hydrate candidate metadata
For each candidate, hydrate the body+metadata fields needed by the Sonnet prompt. Helper handles SQL escape + JOIN with source table for license:
```bash
set -euo pipefail
python "${CLAUDE_PLUGIN_ROOT}/scripts/analyze_candidates_sonnet.py" hydrate \
--task "$TASK" --candidates "$CANDIDATES_JSON" > /tmp/hydrated.$$
```
Output: same candidates array but each entry now also has `description`, `when_to_use`, `capabilities[]` (top 5), `license`, `recency_days`, `complexity` from index.db. (Implementation arrives in Task 16; for now the skill assumes route-task already enriched the entries with sufficient metadata.)
### 4. Check classify-cache
```bash
set -euo pipefail
python "${CLAUDE_PLUGIN_ROOT}/scripts/analyze_candidates_sonnet.py" cac