ai-cli-subagents

Define per-CLI subagents with frontmatter schemas for Claude Code, Copilot CLI, Codex CLI, and OpenCode.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/ClankerGuru/opsx --skill ai-cli-subagents
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-cli-subagents
Source: https://github.com/ClankerGuru/opsx/tree/main/cli/src/main/resources/content/skills/ai-cli-subagents
Command: npx skills add https://github.com/ClankerGuru/opsx --skill ai-cli-subagents

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Authoring consistent subagents across Claude Code, Copilot CLI, Codex CLI, and OpenCode to guide automated agents.

Core Features & Use Cases

It provides guidance on where to place subagent files, expected frontmatter fields, tool restriction mechanisms, per-CLI invocation patterns, and how to preload subagent context. Typical use cases include defining a reviewer subagent that can operate with each CLI using the appropriate invocation method and ensuring cross-CLI compatibility of memory and permissions.

Quick Start

Create a sample subagent named my-subagent for all four CLIs to see how frontmatter fields, invocation syntax, and tool restrictions work in parallel.

Frequently Asked Questions about ai-cli-subagents

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

FAQPage Schema
How do I define subagents for multiple AI CLIs like Claude Code and Copilot CLI?

To define subagents for Claude Code, Copilot CLI, Codex CLI, and OpenCode, you author per-CLI files with standardized frontmatter fields such as name, description, model, and tool permissions. This ensures consistent subagent definitions and cross-CLI invocation compatibility.

What is the invocation syntax for subagents across different CLI tools?

Subagent invocation syntax varies per CLI, requiring standardized patterns to trigger agents correctly within Claude Code, Copilot CLI, Codex CLI, and OpenCode. Matching the correct CLI-specific invocation method ensures the subagent loads the right context and permissions.

How do I set up tool restrictions for custom agents in AI CLI environments?

Tool restrictions for custom agents are configured through the frontmatter fields in each subagent definition file. By specifying allowed tools and permissions in the frontmatter, you control what operations the subagent can perform within each CLI.

Where do I place subagent files for Codex CLI and OpenCode?

Subagent files must be placed in CLI-specific file locations to be recognized by Codex CLI, OpenCode, Claude Code, and Copilot CLI. Placing files in the correct directories ensures proper subagent discovery and invocation across all four CLIs.

Can I preload context for a reviewer subagent across multiple CLIs?

Preloading context for a reviewer subagent involves configuring the subagent definition to ensure cross-CLI compatibility of memory and permissions. This allows the reviewer agent to operate consistently using the appropriate invocation method for each CLI.