sub-agents

sub-agents is a skill for Claude Code, Codex from opencue/cuecards. It costs 66 tokens per session (1,410 once invoked), scanned A, original, MIT.

Execute external CLI AIs as isolated sub-agents for task delegation, parallel processing, and context separation. Use when delegating complex multi-step tasks, running parallel investigations, needing fresh context without current conversation history, or leveraging specialized agent definitions. Returns structured…

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/opencue/cuecards/sub-agents
Any agent
npx skills add opencue/cuecards --skill sub-agents
Clone the repo
git clone --depth 1 https://github.com/opencue/cuecards

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sub-agents

README.md
[![agentmods](https://agentmods.dev/badge/skills/opencue/cuecards/sub-agents.svg)](https://agentmods.dev/skills/opencue/cuecards/sub-agents)
Your own site
<a href="https://agentmods.dev/skills/opencue/cuecards/sub-agents"><img src="https://agentmods.dev/badge/skills/opencue/cuecards/sub-agents.svg" alt="Measured on agentmods" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,410 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00066 $0.01410
Opus 5 $0.00033 $0.00705
Sonnet 5 $0.00013 $0.00282
Haiku 4.5 $0.00007 $0.00141

Measured today against content hash 6a526b9cd1ed, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sub-agents scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/run_subagent.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/sub-agents/SKILL.md · 178 lines

How it starts

The opening of the file, as written. The whole thing — 178 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Sub-Agents - External CLI AI Task Delegation

Spawns external CLI AIs (Codex, cursor-agent, codex, gemini) as isolated sub-agents with dedicated context.

Resources

Script Path: Use absolute path {SKILL_DIR}/scripts/run_subagent.py where {SKILL_DIR} is the directory containing this SKILL.md file.

CLI-Specific Notes

Check the corresponding reference for your environment:

Interpreting User Requests

Extract parameters from user's natural language request:

Parameter Source
--agent Agent name from user request (see selection rules below)
--prompt Task instruction part (excluding agent specification)
--cwd Current working directory (absolute path)

Agent Selection Rules (when user doesn't specify agent name):

  1. Run --list to get available agents
  2. 0 agents: Inform user no agents available, show setup instructions (see Agent Definition Format)
  3. 1 agent: Auto-select without asking
  4. 2+ agents: Show list with descriptions, ask user to choose

Example: "Run code-reviewer on src/" → --agent code-reviewer --prompt "Review src/" --cwd $(pwd)

When to Use This Skill

Use sub-agent when ANY of these apply:

  • Complex multi-step task (isolated context prevents interference)
  • Parallel investigation (multiple agents can run simultaneously)
  • Task needs fresh context (sub-agent starts without conversation history)
  • Specialized agent definition exists (leverage pre-defined expert prompts)

Important: Permission and Timeout

This script executes external CLIs that require elevated permissions.

Before first execution:

  1. Request elevated permissions via your CLI's tool parameters
  2. Set tool timeout to match --timeout argument (default: 600000ms)

Read the full file on GitHub · 178 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 178 lines · 66 tokens per session scan A 6a526b9cd1ed

Subscribe to this mod's changes

sub-agents is a skill published in the GitHub repository opencue/cuecards (5 stars, last pushed yesterday), licensed MIT. It adds 66 tokens to every session and 1,410 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

api-conventions

Project-wide API design standards. Load this when designing or implementing REST endpoints, request/response shapes, status codes, versioning, or pagination. Defines conventions for resource naming, HTTP method usage, error response format, and header requirements.

telus-labs/stagecraft · 51 tokens

review-rubric

Standard code review checklist for all reviewers. Load this when performing a peer review at Stage 5. Covers spec compliance, correctness, security, test coverage, readability, and performance. Defines what constitutes APPROVED vs CHANGESREQUESTED and how to write review findings.

telus-labs/stagecraft · 58 tokens

agency-blockchain-security-auditor

Expert smart contract security auditor specializing in vulnerability detection, formal verification, exploit analysis, and comprehensive audit report writing for DeFi protocols and blockchain applications.

BlackPearl-AI/BlackPearl-CodingAgent · 37 tokens

need-explorer

Clarify intent, scope, constraints, and success criteria before artifact creation. Invoke when the request is fuzzy, the user is comparing options, or the workflow needs a stable change definition before writing artifacts.

MageByte-Zero/spec-superflow · 44 tokens

cortx-reliability

Check whether an x402 payment endpoint is reliably delivering value before spending USDC on it. Returns paid delivery rate, active incidents, latency, and a clear proceed/warn/block recommendation.

aeonfun/aeon · 44 tokens

finance-district-mcp

Multichain non-custodial agent wallet via Finance District - check balances, prices, and best DeFi yields, move funds, swap, and make x402 paid API calls across EVM, Solana, Bitcoin, and Sui. Keys never leave a secure enclave (TEE); spend caps are enforced at the wallet. OAuth Connect via the dashboard MCP panel.

aeonfun/aeon · 81 tokens