subagent-cli

Execute external AI agent CLIs via Bash for delegated coding tasks.

253|42|Updated Feb 18, 2026
One-click install
npx skills add https://github.com/xuiltul/animaworks --skill subagent-cli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: subagent-cli
Source: https://github.com/xuiltul/animaworks/tree/main/templates/ja/common_skills/subagent-cli
Command: npx skills add https://github.com/xuiltul/animaworks --skill subagent-cli

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a safe, repeatable way to delegate complex, multi-file coding, review, and refactoring tasks to external AI agent CLIs via Bash while retaining the host agent's identity, memory, and decision logic.

Core Features & Use Cases

  • Tool orchestration and fallback: Prefer codex exec, fall back to cursor-agent -p, then claude -p with cost limits and sandboxing flags.
  • Workspace-targeted execution: Enforces explicit workspace directory, captures stdout/stderr or writes outputs to files, and recommends git-based workflows for change tracking.
  • Background execution and resilience: Uses nohup, timeout, and PID checks to run long tasks asynchronously and avoid blocking the host agent.
  • Safety and audit: Recommends ephemeral sessions, sandboxed workspace-write, prompt hygiene, and post-run git diff checks.
  • Use case: Delegate a multi-file refactor, unit test generation, or a comprehensive code review that requires a dedicated external coding agent.

Quick Start

Run a background codex exec targeting the project workspace with --full-auto and --ephemeral, saving the agent output to a result file and using a timeout to prevent runaway execution.

Frequently Asked Questions about subagent-cli

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

FAQPage Schema
How do I delegate a multi-file refactoring task to an external CLI agent via Bash?

You can delegate multi-file refactoring tasks by executing external AI agent CLIs noninteractively via Bash, specifying a workspace directory, applying sandboxing flags, and capturing outputs to files using a codex to cursor to claude fallback strategy.

Can I run long-running code generation tasks in the background without blocking my host agent?

Yes, long-running code generation tasks can run in the background using nohup and timeout commands, allowing the host agent to continue operating asynchronously while capturing agent outputs to designated result files.

What is the fallback strategy when codex exec is unavailable for automated code review?

The fallback strategy for automated code review prefers codex exec first, then falls back to cursor-agent -p, and finally uses claude -p with cost limits and sandboxing flags to ensure task completion.

Does subagent-cli require specific Bash execution permissions to run external coding agents?

Yes, delegating complex coding to external AI agents requires Bash execution permission across Mode S/A/B, with optional Mode C access for certain CLIs, to safely execute workspace-targeted operations.

How do I audit changes after an external AI agent modifies multiple files in my workspace?

To audit changes after multi-file modifications, you should perform post-run git diff checks on the workspace directory, leveraging the recommended git-based workflows to track and review all changes made by the subagent.

Are there limitations when using ephemeral sessions for background code generation tasks?

Using ephemeral sessions with --full-auto flags enhances safety by preventing state persistence, but you must enforce explicit workspace directories and prompt hygiene to avoid unintended file modifications during background execution.