---
name: review-config-files
description: Runs the applicable review battery after changes to CLAUDE.md or skills. Triggers on "revisa config", "review config files", "check my CLAUDE.md", "valida as regras", or /review-config-files.
user-invocable: true
---

# Review Battery

Run the applicable review agents in parallel after changes to CLAUDE.md files or skills.

## Detection

Identify what changed based on conversation context:

- **CLAUDE.md changed** (global or project-level) → run `instructions-audit` + `rule-reviewer`
- **Skill created or modified** → run `skill-validator` + `skill-reviewer` + `instructions-audit`
- **Both changed** → run all four
- **Unclear** → ask the user what to review

## Agents to spawn

| Agent | When | What it checks |
|-------|------|----------------|
| `instructions-audit` | Always | Redundancies, contradictions, verbosity, misplaced content across CLAUDE.md + memory files |
| `rule-reviewer` | CLAUDE.md rule added/changed | Conflicts, ambiguity, scope issues for the specific rule |
| `skill-validator` | Skill created/modified | Frontmatter compliance, naming, description quality, structural best practices |
| `skill-reviewer` | Skill created/modified | Content quality, progressive disclosure, trigger effectiveness, organization |

## Execution

1. Determine which agents to run based on what changed
2. Spawn all applicable agents **in parallel** using the Agent tool
3. Wait for all results
4. Present a consolidated summary with categorized findings:
   - **Critical** - issues that will cause problems
   - **Important** - improvements worth making now
   - **Suggestion** - optional enhancements
5. If "critical" items exist, offer to fix them immediately

## Gotchas

- **`user-invocable: true` is a false positive**: the `skill-validator` agent flags this frontmatter field as undocumented. It is used by the Claude Code runtime to expose skills as slash commands. Do not report it as an issue - suppress it when consolidating findings.

## Guidelines

- Always run agents in parallel, never sequentially
- Present findings concisely - no need to repeat full agent output if the summary covers it
- If all agents return clean, say so briefly and move on
- Do not auto-fix without presenting findings first - the user may disagree with a suggestion
