Skip to content
Back to skills

Create Sub Agent

ASecurity

Scaffolds a new autonomous sub-agent with its own prompt, system instructions, and tool permissions. Enforces modern architectural guidance: sub-agents are reserved for isolated execution contexts, strict tool sandboxing, or adversarial personas. NOT for simple procedural skills (use `create-skill`) and NEVER for pointer-wrapper stubs that merely delegate to a skill.

  • 7 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 2, 2026
ai-agentspythonbashgit

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned October 3, 2026

npx -y skills add richfrem/agent-plugins-skills --skill create-sub-agent --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Create Sub Agent?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Create Sub Agent
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/richfrem-create-sub-agent-agent-plugins-skills/badge)](https://www.skillsdirectory.com/skills/richfrem-create-sub-agent-agent-plugins-skills)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: create-sub-agent
plugin: agent-scaffolders
description: >
  Scaffolds a new autonomous sub-agent with its own prompt, system instructions, and tool permissions.
  Enforces modern architectural guidance: sub-agents are reserved for isolated execution contexts,
  strict tool sandboxing, or adversarial personas. NOT for simple procedural skills (use `create-skill`)
  and NEVER for pointer-wrapper stubs that merely delegate to a skill.
argument-hint: "[agent-name or use-case description]"
allowed-tools: Bash, Read, Write
---

# Create Sub-Agent (`create-sub-agent`)

Scaffolds a specialized autonomous sub-agent with focused system prompt, permissions, and tool bounds.

## Contents

- [Constraints](#constraints)
- [Quick start](#quick-start)
- [Workflow](#workflow)
- [Placement](#placement)
- [Verification](#verification)
- [References](#references)

## Constraints

- **Architectural purpose**: Reserve sub-agents for isolated execution contexts, sandboxed tool bounds, or adversarial personas.
- **No pointer wrappers**: Never create pointer-wrapper stubs that merely delegate to a skill.
- **Flat directory structure**: Plugin agents reside as flat `.md` files in `plugins/<plugin>/agents/` without nested subdirectories.
- **Explicit tool permissions**: Always declare tool bounds and denial rules (`permissions.deny`).

## Quick start

```bash
# Validate existing agent definition or scaffold new agent template
python3 scripts/validate_agent.py plugins/<plugin>/agents/<agent-name>.md
```

## Workflow

1. **Pre-Design Gate**: Verify the task requires an autonomous persona rather than a procedural skill (`create-skill`).
2. **Design Interview**: Extract intent, contract, tool allowances, model tier, and system prompt.
3. **Scaffold**: Write flat agent markdown file to `plugins/<plugin>/agents/<agent-name>.md`.
4. **Validation**: Run `validate_agent.py` to ensure schema conformance and tool constraint sanity.
5. **Publication**: Mirror to target platform (`.github/agents/` or `.claude/agents/`).

## Placement

- **Plugin Agents**: Flat `.md` file at `plugins/<plugin-name>/agents/<agent-name>.md`.
- **Project Agents**: Flat `.md` file at `.claude/agents/<agent-name>.md`.

## Verification

```bash
# Run structural validator on the agent definition
python3 scripts/validate_agent.py plugins/<plugin>/agents/<agent-name>.md
```

## References

- [agent-discovery-and-publication.md](references/agent-discovery-and-publication.md) — Multi-agent platform visibility.
- [system-prompt-design.md](references/system-prompt-design.md) — Persona crafting and constraints.
- [acceptance-criteria.md](references/acceptance-criteria.md) — Acceptance gates and structural requirements.
- [fallback-tree.md](references/fallback-tree.md) — Escalation protocol for sub-agent authoring.

Files in this skill

  • SKILL.md2.8 KB
  • acceptance-criteria.md635 B
  • evals/evals.json989 B
  • evals/results.tsv417 B
  • fallback-tree.md1.4 KB
  • references/acceptance-criteria.md42 B
  • references/examples/agent-creation-prompt.md56 B
  • references/examples/complete-agent-examples.md58 B
  • references/examples/validate-agent.sh49 B
  • references/fallback-tree.md36 B
  • references/hitl-interaction-design.md46 B
  • references/pattern-decision-matrix.md46 B
  • references/patterns/action-forcing-output-with-deadline-attribution.md82 B
  • references/patterns/adversarial-objectivity-constraint.md69 B
  • references/patterns/anti-pattern-vaccination.md59 B
  • references/patterns/anti-symptom-triage.md54 B
  • references/patterns/artifact-embedded-execution-audit-trail.md74 B
  • references/patterns/artifact-generation-xss-compliance-gate.md74 B
  • references/patterns/artifact-lifecycle.md53 B
  • references/patterns/artifact-state-interrogative-routing.md71 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.