headless-loop

Generate Claude Code loop scripts for headless automation tasks.

1|Updated Jun 9, 2026
One-click install
npx skills add https://github.com/prestarius/jet-skills-stack --skill headless-loop
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: headless-loop
Source: https://github.com/prestarius/jet-skills-stack/tree/main/skills/headless-loop
Command: npx skills add https://github.com/prestarius/jet-skills-stack --skill headless-loop

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generate ready-to-run Claude Code loop scripts for unattended, headless automation. Use this to build batch-processing workflows, self-correcting loops, and embedded Agent SDK loops that run outside an interactive session.

Core Features & Use Cases

  • Supports three loop patterns: shell batch loop, feedback-gate loop, and Agent SDK loop, enabling flexible automation strategies.
  • Lets you process large worklists, apply per-item prompts, and enforce timeouts and max-turns to prevent runaway tasks.
  • Suitable for batch processing, continuous integration pipelines, and scheduled automation across local environments.

Quick Start

Run the provided headless-loop script with a target worklist to start processing items.

Frequently Asked Questions about headless-loop

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

FAQPage Schema
How do I run Claude Code in a headless automation loop?

Use a headless-loop script to generate ready-to-run Claude Code automation loops for unattended processing. These scripts apply per-item prompts to large worklists while enforcing timeouts, max-turns, and explicit tool permissions for deterministic behavior.

What is a feedback-gate loop for batch processing?

A feedback-gate loop is a headless automation pattern that processes worklists iteratively, applying per-item prompts and enforcing self-correcting checks before proceeding to prevent runaway tasks in unattended environments.

Can I use Agent SDK loops for continuous integration pipelines?

Yes, Agent SDK loops support embedded agent workflows for continuous integration pipelines and scheduled automation, allowing you to process large worklists locally with strict max-turns and timeouts.

How do I prevent runaway tasks in unattended Claude Code scripts?

Prevent runaway tasks in unattended Claude Code scripts by enforcing deterministic behavior with explicit timeouts, max-turns limits, and specific tool permissions within your headless loop configuration.

Does headless automation work with shell batch loops for local environments?

Yes, headless automation supports shell batch loops as one of three patterns, enabling flexible batch-processing workflows and iterative checks across local environments without requiring an interactive session.