What problem does it solve? Single-shot LLM generation often produces outputs with quality issues that go undetected. This Skill provides patterns for building self-critique, evaluator-optimizer, and test-driven refinement loops so agent outputs are systematically evaluated and improved before delivery. ## Core Features & Use Cases - Reflection Loops: Generate output, self-critique against criteria with structured JSON feedback, and refine until all checks pass. - Evaluator-Optimizer Pipelines: Separate generation and evaluation components with score thresholds and dimension-based feedback. - Code-Specific Refinement: Test-driven loop that generates code and pytest tests, runs them, and fixes failures iteratively. - Evaluation Strategies: Outcome-based checks, LLM-as-judge comparisons, and weighted rubric scoring. - Use Case: When building a report-generation agent, wrap the generator in an evaluator-optimizer loop with a rubric covering accuracy, clarity, and completeness, stopping when the score exceeds 0.8 or after 3 iterations. ## Quick Start Add a reflection loop to my report generator that critiques the output against accuracy and clarity criteria and refines it up to three times.