@0xtiby/looper
An independent AI loop orchestration engine that automatically retries AI coding CLI commands until task completion.
Install & Use
Copy this prompt and send it to your AI assistant (Claude / Cursor / TRAE / Codex / WorkBuddy etc.) to auto-install:
Help me install this AI Skill: @0xtiby/looper. It is used for: An independent AI loop orchestration engine that automatically retries AI coding CLI commands until task completion. Full Skill content: https://321skill.com/skills/0xtiby-looper/raw/index.md Read that page and install it.
The prompt includes a link to the full Skill content. You can also view the full content.
This Skill addresses the inefficiency of manually invoking AI coding tools repeatedly until a task is finished. In real-world development scenarios—such as refactoring large codebases, fixing intermittent bugs, or running batch tests—it often requires issuing multiple instructions to the AI. Each iteration necessitates manual judgment of completion, which is highly inefficient and prone to interruption.
Usage is straightforward: after installation, simply run looper init to generate a configuration file, then execute looper run -p "your task description". Looper will launch your specified AI CLI (e.g., Claude Code, Codex CLI), monitor its output for a sentinel string (e.g., :::LOOPER_DONE:::), and stop once the sentinel is detected or the maximum iteration count is reached. If the AI exits prematurely due to an error, Looper automatically restarts the process until the task is complete.
It is particularly well-suited for teams or individuals handling batch code processing tasks. Developers already using AI coding assistants like Claude Code or Codex will find Looper especially valuable when needing the AI to repeatedly perform similar work—such as incremental refactoring, module-by-module fixes, or progressive testing—significantly reducing manual monitoring time and enabling autonomous multi-iteration execution by the AI.
We recommend using this tool consistently during legacy project refactoring or complex bug investigation. Note that each iteration starts a fresh session without preserving conversational context, so all necessary information (e.g., project structure, code locations) must be explicitly specified in the prompt. Additionally, Node.js 20+ and at least one supported, logged-in, and functional AI CLI are required.
Key Features
Unlike writing bash loop scripts directly, Looper natively supports parsing streaming output from AI CLIs, automatically detecting sentinel strings and managing iteration counts—eliminating the need for manual regex matching or process exit code handling. While CI/CD pipeline tools (e.g., GitHub Actions) can also loop, they are better suited for integration and deployment rather than interactive, AI-coding-focused iteration.
Limitations
Requires Node.js 20+ and at least one supported AI CLI (claude, codex, opencode, pi) to be installed and logged in. Does not support persistent conversational state (each iteration starts fresh); when tasks require long-term context, it must be manually included in the prompt.
FAQ
How do I set a sentinel string for Looper to stop automatically?
Instruct the AI in your prompt to output your specified sentinel, e.g., `:::LOOPER_DONE:::`, then pass it via the `--sentinel` parameter or write it into the configuration file.
Which AI CLIs does Looper support?
Currently supports Claude Code, Codex CLI, OpenCode, and pi. You can specify which one using the `--cli` parameter.
Installation guide for AI assistants
If your AI coding assistant (Claude Code, Cursor, TRAE etc.) can see this page, send it this message to auto-install:
Visit https://321skill.com/skills/0xtiby-looper/raw/index.md to read the original Skill definition (Markdown format) for @0xtiby/looper, and install it according to the instructions.
Raw Markdown URL for AI: /skills/0xtiby-looper/raw/index.md