Dev swarm headless ai agents

From X-School-Academy/skill-pilot · View interactive version

Dev swarm headless ai agents is an AI agent skill from the GitHub repository X-School-Academy/skill-pilot. Run popular AI code agents (Claude Code, Codex, Gemini CLI) in headless or non-interactive mode for automation, scripting, and programmatic execution. Use when automating AI agent tasks or integrating into CI/CD pipelines.

How to use this skill

Skill file

AI Builder - Headless AI Agents

This skill provides instructions for running popular AI code agents in headless (non-interactive) mode, enabling automation, scripting, and programmatic execution without user interaction.

When to Use This Skill

Your Roles in This Skill

Role Communication

As an expert in your assigned roles, you must announce your actions before performing them using the following format:

As a {Role} [and {Role}, ...], I will {action description}

This communication pattern ensures transparency and allows for human-in-the-loop oversight at key decision points.

Instructions

Follow these steps to run an AI code agent in headless mode:

Step 1: Identify the AI Code Agent

Determine which AI code agent to run in headless mode. Route to the appropriate reference file:

Step 2: Verify Installation

As a DevOps Engineer, verify the agent is installed:

# Claude Code
claude --version

# Codex
codex --version

# Gemini CLI
gemini --version

If not installed, use the dev-swarm-install-ai-code-agent skill.

Step 3: Choose Execution Mode

Each agent supports different headless modes:

| Agent | Mode | Use Case |

|-------|------|----------|

| Claude Code | --print | Print output and exit (piping) |

| Codex | exec | Non-interactive execution |

| Gemini CLI | Positional prompt | One-shot execution |

Step 4: Configure Permissions

Important: Headless mode typically requires bypassing permission prompts.

| Agent | Permission Flag | Security Note |

|-------|-----------------|---------------|

| Claude Code | --dangerously-skip-permissions | Bypasses all prompts |

| Codex | --ask-for-approval never | Auto-approve all actions |

| Gemini CLI | --yolo | Auto-accept all actions |

Security Warning: Only use these flags in trusted, sandboxed environments.

Step 5: Execute the Agent

Refer to the agent-specific reference file for detailed command syntax and examples.

Quick Reference (Minimal Commands):

# Claude Code (headless)
claude --print --dangerously-skip-permissions "your prompt here"

# Codex (headless)
codex --ask-for-approval never --sandbox workspace-write exec "your prompt here"

# Gemini CLI (headless)
gemini --yolo --sandbox "your prompt here"

Step 6: Handle Output

Configure output format based on your needs:

See agent-specific reference files for output format options.

Key Principles

Common Issues

Issue: Agent hangs waiting for input

Issue: Command not found

Issue: Permission denied errors

Issue: Output parsing fails

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.