Skip to content
Agentmart
Submit a tool

run_subagent

Run a subagent - either a newly created one from workspace or a saved subagent from previous sessions.

Skill by zzatpku

IndexedMIT★ 66
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/zzatpku-run-subagent

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Run a subagent - either a newly created one from workspace or a saved subagent from previous sessions.

Use cases: agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/run-subagent

What's inside

Skill name
run_subagent
Description
Run a subagent - either a newly created one from workspace or a saved subagent from previous sessions.
License
MIT
Instructions
78 lines in SKILL.md · view on GitHub

Agent Skills spec issues

  • name: only lowercase letters, digits and single hyphens allowed

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Run Subagent

Run a subagent file from either the **workspace** (newly created) or from **saved skills** (previous sessions).

## Unified Command

`run_subagent` now handles BOTH types of subagents:
- **Newly created subagents**: Use `filename` parameter
- **Saved subagents**: Use `skill_name` parameter

## Usage

**For newly created subagents (workspace files):**
```xml
<action>run_subagent</action>
<params>{"filename": "subagent.py", "query": "your focused sub-question"}</params>
```

**For saved subagents (from previous sessions):**
```xml
<action>run_subagent</action>
<params>{"skill_name": "multi_hop_biographical_researcher", "query": "your focused sub-question"}</params>
```

## Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| filename | str | "subagent.py" | Name of the file you created with create_subagent (for workspace files) |
| skill_name | str | - | Name of a saved subagent from list_saved_subagents (for saved skills) |
| query | str | original question | The focused query to pass to the subagent |

**Note**: Provide either `filename` OR `skill_name`, not both. If `skill_name` is provided, it takes priority.

## Returns

On success:
```python
{
    "success": True,
    "answer": "the subagent's answer",
    "summary": "reasoning trace with key evidence"
}
```

On failure:
```python
{
    "success": False,
    "error": "error message..."
}
```

## Important Notes

- **CRITICAL: For workspace files, you MUST provide the `filename` parameter matching the exact filename you used in `create_subagent`.** If you created with `"filename": "visualizer.py"`, you must run with `"filename": "visualizer.py"` — omitting it will default to `"subagent.py"` and fail.
- For saved skills: First check `list_saved_subagents` to see available names
- Use the `query` parameter to pass focused sub-questions
- The query is passed to the subagent's `main(query)` function as a parameter
- If the subagent fails, check the error message and use `modify_subagent` to fix (workspace files only)

## Examples

```xml
<!-- After create_subagent with filename="subagent.py" -->
<action>run_subagent</action>
<params>{"filename": "subagent.py", "query": "What year was the Sapphire Jubilee?"}</params>

<!-- Using a saved subagent -->
<action>run_subagent</action>
<params>{"skill_name": "entity_researcher", "query": "Who is Kwesi Arthur?"}</params>

<!-- Call again with different query -->
<action>run_subagent</action>
<params>{"filename": "subagent.py", "query": "Who created Linux?"}</params>
```

From zzatpku/AgentFactory, MIT.

Signals

Stars
66
Forks
8
Open issues
0
Last commit (this folder)
Feb 28, 2026 (8 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from zzatpku

Cite this page

run_subagent skill. Agent Mart. https://agentmart.dev/skills/zzatpku-run-subagent (last updated 2026-10-24)