| name | llm-review |
| description | Reference for local-LLM scripts. Calling skills run the bash commands inline in the main conversation — no dedicated agents. Covers the availability check, model loading, script execution, and unloading lifecycle. |
LLM Review
Full lifecycle wrapper for local LLM operations. Other skills run LLM bash commands directly in the main conversation — no dedicated agents.
How Other Skills Use This
Calling skills run the bash commands directly using the Bash tool. The typical pattern:
- Check availability:
CRAFT_SCRIPTS=$(find ...) && curl -s --max-time 2 http://127.0.0.1:1234 ... && echo "LLM_AVAILABLE:$CRAFT_SCRIPTS" || echo "LLM_UNAVAILABLE"
- Run task in background:
bash "$CRAFT_SCRIPTS/llm-agent.sh" "<task>" <working-dir> (with run_in_background: true)
- Unload when done:
bash "$CRAFT_SCRIPTS/llm-unload.sh"
Each calling skill has the exact commands inline. This skill serves as the detailed reference.
Task types:
explore "<task>" <working-directory> — Autonomous investigation (LLM reads files itself, saves the most tokens)
review <file> "<focus>" — Single-file review (focus positional)
review <file1> <file2> ... --focus "<focus>" — Multi-file review (use --analyze "<task>" <files...> for task-framed analysis; absorbs the old analyze)
Input
The user input is: $ARGUMENTS
- Task type + arguments: As described above
- File path(s) + focus:
/llm-review src/domain/auth/feature/LoginPage.tsx "security"
- Empty: Ask the caller what to review
Process
Step 1: Locate Scripts
The scripts directory is provided at session start (bootstrap context) as craft-skills scripts directory: <path>. Use that path if available. Otherwise fall back to:
CRAFT_SCRIPTS=$(find ~/.claude/plugins -name "llm-agent.sh" -path "*/craft-skills/*" -exec dirname {} \; 2>/dev/null | head -1)
If neither is available, return: "LLM scripts not found — craft-skills plugin may not be installed."
Step 2: Check Availability
curl -s --max-time 2 ${LLM_URL:-http://127.0.0.1:1234} > /dev/null 2>&1 && echo "LLM_AVAILABLE" || echo "LLM_UNAVAILABLE"
If LLM_UNAVAILABLE, return: "LLM_UNAVAILABLE: LM Studio server not running."
Step 3: Run the Task
Note: Scripts auto-detect and fix context length (reload with 64K if loaded with less). No manual check needed.
Choose the script based on task type:
review — file content(s) passed to LLM with thinking mode:
bash "$CRAFT_SCRIPTS/llm-review.sh" <file-path> "<focus>"
bash "$CRAFT_SCRIPTS/llm-review.sh" <file1> <file2> ... --focus "<focus>"
explore — autonomous agent with file access tools (saves the most tokens):
bash "$CRAFT_SCRIPTS/llm-agent.sh" "<task description>" <working-directory>
If the script returns LLM_ERROR or exits non-zero, report the error — do not retry.
If the script returns LLM_THINKING_OVERFLOW, report: "Model used all tokens on reasoning. File may be too large for review mode — try explore mode instead."
Step 4: Triage Findings
Before returning findings, filter out known false positives:
- The local model doesn't understand Claude Code plugins, skills, or agent dispatch
- Findings about "missing files" may be false if files exist in the plugin directory
- Focus on: structural issues, logic bugs, type mismatches, architecture violations, consistency
Step 5: Unload Model
bash "$CRAFT_SCRIPTS/llm-unload.sh"
Skip unloading if the caller passes Keep loaded: true — this means another LLM step is expected soon.
Step 6: Return
Return the triaged findings to the caller. Be concise — the caller will triage further against their conversation context.
Configuration
| Variable | Default | Description |
|---|
LLM_URL | http://127.0.0.1:1234 | LM Studio server URL |
LLM_MODEL | qwen3.6-35b-a3b | Model identifier |
Notes
- Thinking mode is enabled by default — fewer false positives
- Context window is set to 64K tokens automatically on load (scripts handle this)
- Typical time: 30-90 seconds for review, 1-3 minutes for explore
- Model uses ~22GB RAM when loaded — always unload when done unless told otherwise