## Claude Code Integration

UIdetox is designed to work seamlessly with Claude Code (CLI) and Claude Desktop via MCP or direct skill injection.

### 1. Installation

Install the UIdetox skill specifically for Claude:
```bash
uidetox update-skill claude
```
This command copies `SKILL.md` into your project's `.claude/skills/uidetox/` directory. Claude Code automatically detects and loads skills from `.claude/`.

### 2. Autonomous Loop (Single Agent)

To dispatch Claude Code into the UIdetox autonomous loop, paste this prompt:

> I want you to eliminate AI slop from this codebase. You are now in FULL AUTONOMOUS LOOP MODE.
> 1. Run `uidetox scan`
> 2. Run `uidetox autofix` and apply all T1 safe fixes, resolving each with `uidetox resolve <ID> --note "..."`
> 3. Run `uidetox next`, batch fix the highest priority file, and resolve with mandatory notes.
> 4. Repeat until `uidetox status` shows a Design Score >= 95 and the queue is empty.
> Do NOT stop to ask for my permission. Just fix and move on.

### 3. Orchestrator Mode (Subagents)

For massive codebases, use the Orchestrator. Claude excels at context-isolated reasoning.
Run:
```bash
uidetox loop --orchestrator
```
This splits the work into five distinct stages (Observe → Diagnose → Prioritize → Fix → Verify). Launch a new, blank Claude session for each stage using the prompts generated by `uidetox subagent --stage-prompt <stage>`, preventing context pollution.
