create-sub-agent

Generates custom sub-agent directories with agent.md prompts, rules, and skills.

2|Updated Jun 8, 2026
One-click install
npx skills add https://github.com/HACK-WU/skills --skill create-sub-agent-hack-wu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-sub-agent
Source: https://github.com/HACK-WU/skills/tree/main/skills/create-sub-agent
Command: npx skills add https://github.com/HACK-WU/skills --skill create-sub-agent-hack-wu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Creating a custom sub-agent for an AI coding workflow requires consistent prompt structure, permission boundaries, and delegation contracts; this Skill standardizes that process so every new agent follows the same proven template. ## Core Features & Use Cases - Directory Scaffolding: Creates the agents/{agent-name}/ structure with agent.md plus optional rules/ and skills/ subdirectories. - Structured Prompt Authoring: Writes agent.md following a fixed template covering role definition, capability assumptions, three-tier file permissions, task boundaries, input/output contracts, and failure reporting. - Validation Checklist: Self-checks the output against a verification list including the three-part output contract and the no-redelegation constraint. - Use Case: When you need a dedicated API testing agent, ask to create an api-tester sub-agent and receive a complete agent.md with permission boundaries, a three-section reporting contract, and a companion skill for HTTP assertions. ## Quick Start Ask the AI to create a sub-agent named api-tester that validates HTTP API responses and reports results in the three-section format.

Frequently Asked Questions about create-sub-agent

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

FAQPage Schema
How do I create a custom sub-agent for an AI coding assistant?

Define the agent name in kebab-case, its role, task boundaries, and delegation triggers, then generate an agents/{name}/ directory containing an agent.md prompt file. The agent.md follows a fixed template with role definition, capability assumptions, permission tiers, and input/output contracts.

What should an agent.md prompt file contain?

An agent.md needs frontmatter with description and provider fields, plus sections for role positioning, capability assumptions, three-tier file permissions (writable, needs-confirmation, forbidden), task boundaries, a five-field input contract, execution requirements, a three-section output contract, failure reporting, and a self-check list.

When should I not create a new sub-agent?

Skip creating a new agent when an existing agent already covers the functionality, when a one-off task can be delegated to a generic sub-agent, or when you only need behavioral constraints, which belong in rules files instead of a dedicated agent.

How do other skills reference a created sub-agent?

Other skills reference the agent with use_agent({agent-name}) syntax in their SKILL.md, without copying file paths or agent content. The agent.md in agents/{agent-name}/ remains the single source of truth, and delegation passes the five-field input contract.

Can a sub-agent delegate tasks to other sub-agents?

No. The template explicitly forbids re-delegation to prevent uncontrolled delegation chains and unclear responsibility. A sub-agent must refuse tasks outside its boundary and report back to the main agent instead.