/loop

Repeats a task until defined quality condition is satisfied or max iterations reached.

Updated Apr 26, 2026
One-click install
npx skills add https://github.com/kinnerkarmanish/mak --skill loop-kinnerkarmanish
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: /loop
Source: https://github.com/kinnerkarmanish/mak/tree/main/library/skills/workflow/loop
Command: npx skills add https://github.com/kinnerkarmanish/mak --skill loop-kinnerkarmanish

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Repeats a task and progressively improves the result until a defined quality condition is satisfied, reducing manual retry work.

Core Features & Use Cases

  • Iterative execution: Run a task multiple times, using the prior output as a base for the next iteration.
  • Quality-aware termination: Stop when a quality criterion is met or the maximum iterations are reached.
  • Use Case: Improve generated content, refine code changes, or optimize designs by incrementally addressing issues in successive iterations.

Quick Start

Provide a task and a stopping condition, and the loop will run until the condition is met.

Frequently Asked Questions about /loop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate iterative refinement for generated content or code?▼

The skill executes an iterative refinement loop by running a task, evaluating the output against a defined quality condition, and repeating until the condition is satisfied or max iterations are reached.

How does quality-aware termination work during task processing?▼

Quality-aware termination stops the task processing loop when a defined quality criterion is met. If the condition is not satisfied, the loop continues using the prior output as a base until the maximum iteration limit is reached.

What is the best way to progressively improve designs across multiple iterations?▼

Progressive improvement is achieved using an end-to-end refinement loop that evaluates each output against a quality condition and incrementally addresses issues across successive iterations to achieve the desired result.

How many iterations does the loop run by default for code or content refinement?▼

The loop runs a default of 5 iterations for code or content refinement if a specific maximum is not provided. It stops earlier if the defined quality condition is satisfied during the task processing.

Can I observe iteration logs during the refinement process?▼

Yes, you can observe iteration logs during the refinement process. The loop implements end-to-end refinement with observable iteration logs and a final output, allowing you to track progressive improvements across each cycle.

When should I not use an iterative refinement loop for task processing?▼

You should not use an iterative refinement loop when a task requires only a single execution or lacks a clear quality condition to evaluate against. Without a defined stopping criterion, the loop will run until the default maximum iterations are reached.