- Home
- Skills
- Agents & Orchestration
- loop selector
loop selector
A task router that selects the optimal iterative pattern and generates the required loop configuration.
Free
Works with the AI Agents you already use
loop selector
Example session with this skill installed
I have a prompt for classifying support tickets that currently hits 82% accuracy. I want to improve it until it reaches at least 95% accuracy. How should I structure the loop?
- Read your context and instructions
- Compiled the loop selector
The task involves tuning a reusable artifact (a prompt template) against a specific, achievable numeric metric. This is a system optimization task that fits the Prompt Optimization pattern.
Loop Configuration
{
"category": "system-optimization-loops",
"pattern": "Prompt Optimization",
"loop_start": {
"exit_mode": "target",
"target_value": 0.95,
"direction": "increase",
"max_iterations": 8
},
"feedback_loop": {
"metric": "classification_accuracy",
"companion_tool": "prompt-evolve"
}
}
Next steps
- Review the
system-optimization-loopsskill for specific details on wiring theprompt-evolvetool. - Define your held-out evaluation dataset to ensure the
target_valueis calculated consistently across iterations. - Initialize the loop using the provided
loop_startconfiguration.
Connects securely to your tools. The creator never sees your data.
About this skill
Stop wasting tokens on loops that never converge or tasks that shouldn't be loops at all. This agent skill acts as a high-level router for iterative tasks, ensuring you select the right architectural pattern before writing a single line of logic. It evaluates tasks against a strict "loop-shaped" gate and then maps them to a specialized category—Quality, Memory, Planning, Exploration, or System Optimization.
What it does
- Pre-loop validation ensures a task has a clear progress signal, requires multiple passes, and possesses a natural stopping point before proceeding.
- Pattern routing maps ambiguous user requests like "optimize this" or "fix this" to one of twenty specific iterative patterns.
- Config generation produces immediate
loop_startparameters includingexit_mode,target_value, andmax_iterationstailored to the specific pattern. - Composite detection identifies when a task requires a sequence of different loop types rather than forcing a single, ill-fitting pattern.
- Budget enforcement recommends appropriate iteration limits to prevent infinite loops and manage compute costs.
How it works
- Validation: Run the Step 0 check to confirm the task is actually loop-shaped based on signal availability and necessity.
- Classification: Use the decision tree to match the task against five core categories: quality, memory, planning, exploration, or system optimization.
- Pattern Selection: Identify the specific sub-pattern (e.g., Adversarial Critique vs. Judge Ensemble) within the chosen category.
- Configuration: Generate the concrete
loop_startJSON config with the correct exit modes and progress directions.
Frameworks & tools
This skill is designed for agents using iterative ledger patterns or loop-based architectures. It integrates with bantamkit for memory-related workflows and utilizes standard iteration controllers like critique-gate and prompt-evolve.
Why this beats prompting it yourself
Prompting an agent to "loop until finished" often leads to hallucinated stopping conditions or inefficient iteration. This skill provides a structured decision framework that enforces architectural best practices, ensuring you use the most efficient pattern for the specific problem domain.
Use cases
- Quality Control: Routing a content generation task to a Multi-Critic or Adversarial loop.
- Bug Fixing: Mapping a failing test suite to a Plan-Execute-Replan planning loop.
- Prompt Engineering: Configuring a System Optimization loop to tune templates against a metric.
- Design Research: Setting up an Exploration loop to branch and compare multiple UI candidates.
Known limitations
This skill is a router and does not contain the full implementation logic for every pattern. Users must refer to the specific category skills for deep wiring rationale and failure-mode notes.
How to use
Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scanned
Verified clean today
- Free to download with an account
Requires