command-to-subagent — community command-to-subagent, community, ide skills, Claude Code, Cursor, Windsurf

v1.0.0
GitHub

About this Skill

Ideal for Advanced AI Agents like AutoGPT and LangChain needing streamlined command management and reduced recipe context CLI tool for managing AI assistant rules and configurations

patrickclery patrickclery
[0]
[0]
Updated: 3/5/2026

Agent Capability Analysis

The command-to-subagent skill by patrickclery is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance.

Ideal Agent Persona

Ideal for Advanced AI Agents like AutoGPT and LangChain needing streamlined command management and reduced recipe context

Core Value

Empowers agents to extract execution logic into dedicated subagents, reducing token usage and isolating API/MCP complexity through CLI tools, perfect for managing AI assistant rules and configurations with preview, confirmation, and execution patterns

Capabilities Granted for command-to-subagent

Converting complex commands to subagents for improved workflow efficiency
Reducing token usage in recipes by isolating execution logic
Isolating API/MCP complexity from user-facing workflows for better user experience
Streamlining command management for AI assistants with heavy MCP or API call logic

! Prerequisites & Limits

  • Requires commands with heavy MCP or API call logic
  • Limited to commands following preview, confirmation, and execution patterns
  • Dependent on CLI tool compatibility with AI agent ecosystem
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

command-to-subagent

Install command-to-subagent, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly

Converting Commands to Subagents

Overview

Extract execution logic from a command into a dedicated subagent, keeping only the user-facing workflow (preview, confirmation) in the command. This reduces recipe context by isolating API/MCP complexity.

When to Use

  • Command has heavy MCP or API call logic
  • Want to reduce token usage in a recipe
  • Need to isolate execution complexity from user workflow
  • Command follows preview → confirm → execute pattern

Quick Reference

ComponentLocationContains
Commandcommands/{name}.mdUser workflow (preview, confirm, dispatch)
Subagentagents/{name}.mdExecution logic (MCP calls, API operations)
Reciperecipes.ymlSubagent registration

Conversion Steps

Step 1: Identify the Split Point

Find where user interaction ends and execution begins:

User workflow (COMMAND):     Execution (SUBAGENT):
├─ Parse input               ├─ API/MCP calls
├─ Validate/lookup           ├─ Error handling
├─ Show preview              ├─ Response formatting
├─ Handle revisions          └─ Return structured result
└─ Dispatch on confirm

Split at confirmation - everything after "send it" / "post it" goes to subagent.

Step 2: Create the Subagent File

Location: rules/{domain}/agents/{name}.md

Structure:

markdown
1--- 2description: Instructions for the {name} subagent when dispatched 3alwaysApply: true 4requires: 5 - ../common.md # Shared patterns 6 - ../../accounts.md # If needs user lookups 7--- 8# {Name} Subagent - EXECUTION REQUIRED 9 10## ⚠️ CRITICAL: You MUST Execute 11 12**Your ONLY job is to {action}.** If you complete with "0 tool uses", you have FAILED. 13 14## Input Format 15 16You will receive a prompt like: 17{show expected input structure} 18 19## Execution Steps 20 21### Step 1: {First action} 22{MCP/API call with example} 23 24### Step 2: {Next action} 25... 26 27### Step N: Return Result 28 29**On success:** 30```json 31{"status": "success", "field": "value"}

On error:

json
1{"status": "error", "error": "message", "step": "which failed"}

Failure Conditions

FAILED if you:

  • Complete with "0 tool uses"
  • Return without executing
  • Ask clarifying questions

SUCCESS if you:

  • Execute all required steps
  • Return structured result

### Step 3: Update the Command

Remove execution logic, add subagent dispatch:

**Before (inline execution):**
```markdown
### Step 4: Send Message
mcp__teams__send_chat_message with:
- chatId: ...

After (dispatch to subagent):

markdown
1### Step 4: Dispatch Subagent 2 3When user confirms, dispatch the `{subagent_name}` subagent: 4 5Task tool: 6 subagent_type: "{subagent_name}" 7 prompt: | 8 {Action}: 9 - Field1: {value1} 10 - Field2: {value2} 11 12### Step 5: Show Result 13 14Display the subagent's response: 15- On success: ✅ {success message} 16- On error: ❌ {error message}

Step 4: Register in Recipe

Add to recipes.yml:

yaml
1# Subagent recipe (what the subagent gets loaded with) 2{subagent-name}: 3 description: "{Action} (subagent execution)" 4 files: 5 - /path/to/agents/{name}.md 6 - /path/to/common.md 7 - /path/to/accounts.md # if needed 8 mcp_servers: 9 - {required-mcp} 10 11# Parent recipes that use the command 12{parent-recipe}: 13 files: 14 - /path/to/commands/{name}.md 15 subagents: 16 - name: {subagent_name} # underscores for Task tool 17 recipe: {subagent-name} # hyphens for recipe name

Step 5: Sync Config Files

bash
1cp recipes.yml ~/.config/ruly/recipes.yml 2cp recipes.yml ~/Projects/chezmoi/config/ruly/recipes.yml

Example: MS Teams DM

Before: dm.md had all Teams MCP logic inline

After:

  • commands/dm.md - Preview workflow, dispatches on "send it"
  • agents/ms-teams-dm.md - Teams MCP execution

Recipe registration:

yaml
1ms-teams-dm: 2 files: 3 - rules/comms/ms-teams/agents/ms-teams-dm.md 4 - rules/comms/ms-teams/common.md 5 mcp_servers: 6 - teams 7 8comms: 9 files: 10 - rules/comms/ms-teams/commands/dm.md 11 subagents: 12 - name: ms_teams_dm 13 recipe: ms-teams-dm

Common Mistakes

MistakeFix
Subagent asks questionsAdd "EXECUTION REQUIRED" header, forbid questions
Subagent returns without actingAdd "0 tool uses = FAILED" warning
Missing MCP server in recipeSubagent can't call APIs without mcp_servers
Forgot to sync config filesAlways sync to ~/.config/ruly/ and chezmoi
Using wrong name formatRecipe names: hyphens. Task tool names: underscores

Directory Convention

rules/{domain}/
├── common.md           # Shared patterns
├── commands/
│   └── {name}.md       # User-facing command
└── agents/
    └── {name}.md       # Subagent execution
  • commands/ = User-invocable via /command-name
  • agents/ = Dispatched programmatically (not user-invocable)

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is command-to-subagent?

Ideal for Advanced AI Agents like AutoGPT and LangChain needing streamlined command management and reduced recipe context CLI tool for managing AI assistant rules and configurations

How do I install command-to-subagent?

Run the command: npx killer-skills add patrickclery/ruly/command-to-subagent. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for command-to-subagent?

Key use cases include: Converting complex commands to subagents for improved workflow efficiency, Reducing token usage in recipes by isolating execution logic, Isolating API/MCP complexity from user-facing workflows for better user experience, Streamlining command management for AI assistants with heavy MCP or API call logic.

Which IDEs are compatible with command-to-subagent?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for command-to-subagent?

Requires commands with heavy MCP or API call logic. Limited to commands following preview, confirmation, and execution patterns. Dependent on CLI tool compatibility with AI agent ecosystem.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add patrickclery/ruly/command-to-subagent. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use command-to-subagent immediately in the current project.

Related Skills

Looking for an alternative to command-to-subagent or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI