What problem does it solve? Single-shot LLM generation often produces outputs with quality issues, and there is no built-in mechanism for an agent to assess and improve its own work. This Skill provides proven patterns for building self-critique, evaluation, and refinement loops into agent workflows. ## Core Features & Use Cases - Reflection Loops: Generate output, self-critique against criteria, and refine iteratively until all checks pass. - Evaluator-Optimizer Pipelines: Separate generation and evaluation into distinct components with score thresholds and structured JSON feedback. - Test-Driven Code Refinement: Generate code and tests, run them, and automatically fix failures in a loop. - Evaluation Strategies: Outcome-based checks, LLM-as-judge comparisons, and weighted rubric scoring. - Use Case: You are building an agent that generates compliance reports. Use the evaluator-optimizer pattern to score each draft against accuracy, clarity, and completeness dimensions, refining until the score exceeds 0.8. ## Quick Start Ask the agent to implement a reflection loop that generates a report, critiques it against your criteria, and refines it up to three times.