dtyq/magic/subagents
Claude Code and agent skill by dtyq/magic
- community
Checking that the SKILL.md file is still in the repository.
Use when the user asks to find, select, call, or delegate work to an Agent/智能体, digital employee/数字员工, or Crew; when the target is unknown or must be selected by capability; when independent tasks can run in parallel; or when isolated research or a specialized Agent would improve the result.
Install
npx vskill@latest install dtyq/magic/subagentsSKILL.md
The same SKILL.md was published earlier as dtyq/magic/subagents.
Subagent Dispatch Skill
Use call_subagent to delegate tasks to other agents, and wait_for_subagents to collect results from background runs. These tools are Code Mode tools: run the snippets below with run_sdk_snippet, where sdk.tool.call(...) is available.
Agent is the generic technical term. Crew is the product term for a marketplace custom Agent presented as a digital employee (数字员工). Users may say Agent, 智能体, digital employee, 数字员工, or Crew. Do not call built-in Agents Crew.
When To Use
Delegate when at least one is true:
- The task is large enough to benefit from an isolated execution context
- Multiple independent tasks can run in parallel
- You need a specialized agent type (read-only explore, shell-heavy work)
Do not delegate when:
- The task is small and can be done directly
- The work requires constant access to the current conversation state
- Multiple sub-agents would write to the same file with no merge plan
- You cannot summarize the full context into a self-contained prompt
Depth limit: sub-agents cannot call call_subagent. Only the root agent may dispatch.
Selecting The Target Agent
- If the user provides a built-in name, local
.agentname, orSMA-...code, skip discovery and call that Agent directly. - If the target is unknown or must be selected by capability, call
find_agentsto search marketplace custom Agents presented as Crew digital employees. - Built-in Agents (
magic,explore,shell,search) do not require discovery.
keywords: build the complete recall list before the first call and submit it once.- Infer the user's language from the request and use that language for the main terms.
- Usually use two to four high-information words or phrases with distinct recall value.
- Add a term from another language only when candidate names, common industry terminology, or the target search source is likely to use it. English is often useful for product names and technical acronyms, but it is not mandatory.
- English requests normally use English terms only. Japanese requests should use Japanese terms first, Korean requests should use Korean terms first, and the same rule applies to every other language. Preserve relevant terms when the user mixes languages.
- Prefer short terms that may appear directly in candidate names.
- For short names or acronyms, include common case forms when search sources may treat them differently.
- Do not enumerate case forms for ordinary phrases, add overlapping synonyms only to increase the count, put the complete requirement in an item, or call
find_agentsonce per keyword. query: the user's complete requirement in the user's language, used to select more relevant candidates.limit: choose based on the task. The default is5; valid values are1through20.
Read result.content, choose by code, name, and description, then pass the selected SMA-... code as call_subagent.agent_code (or agent_name when using the direct runtime interface). Do not automatically split or retry the same search intent when no candidates are returned.
Browsing The Full Agent List
When the user asks which Agents are available rather than asking to get something done, browse instead of searching: pass keywords=[] and query=None. Results come back in a stable order with no relevance filtering, so the first entry is not necessarily the best fit.
Read has_more and next_page from result.content. To read the following page, keep every other argument unchanged and set page to next_page. Page order is stable and pages do not overlap.
Do not page through the whole directory to see everything — each page costs context. Read further pages only when the user asked for the complete list, or when the current page contains no suitable Agent.
Paging is not available for keyword search, because ranked order is not stable across pages. When a keyword search returns too few results, raise limit or change keywords instead.
Tool: call_subagent
agent_name
Target agent to call. Accepted values:
- Built-in names or aliases:
magic,explore,shell,search,ppt,data_analysis - Marketplace custom Agent codes returned by
find_agents, such asSMA-...(Crew digital employees) - Local
.agentfilenames
For marketplace custom Agent codes, call_subagent prepares the Agent automatically before dispatch.
Built-in types:
magic: general-purpose, full tool access (web, files, code). Use for complex multi-step tasks.explore: read-only. Searches files, reads code, answers structural questions. Cannot modify anything.shell: shell command specialist. Runs scripts, installs deps, performs system operations.search: web research specialist. Searches the web and reads pages to gather external information. Cannot modify local files.
Other .agent files (e.g. data-analyst) can also be used by name.
session_id
For a new session, session_id is optional. Omit it to let the runtime generate a unique session address. You may provide a human-readable base such as market-research when a stable base is useful.
- With
resume=False, the tool always creates a new session and returns the final session ID, such asmarket-research-2. - The requested base is not the session address. Read the exact final ID from
result.data["session_id"];result.data["agent_id"]is retained only for backward compatibility. - With
resume=True, pass the exact final session ID returned by the earlier call. The session must already exist. - Never infer that a repeated base should resume an old session.
- The
session_idis unrelated to theagent_idinside anagent://mention. - Name by responsibility, not by sequence:
ppt-outline,shell-install-ffmpeg— nottask1,worker-a
Session lifecycle
- New blank session:
fork=False, resume=False - New session inheriting the current context:
fork=True, resume=False - Continue an existing session:
fork=False, resume=True fork=True, resume=Trueis invalid
Completed sub-agent histories can be inspected later with the chat-history skill. Parent identity is stored explicitly in each new sub-agent's .session.json; do not infer parent-child relationships from directory nesting.
Fork creates a new independent session and never overwrites an existing one. Resume is always explicit because the caller may not know that an older session used the same name.
task_label
User-facing label shown directly in the UI for this delegated task. It is not the agent's name and not agent_id.
- Must use the same language as the user's request so the label is understandable. Do not default to English.
- Make it concise and distinct in multi-agent runs.
- It may change between calls even when
session_idstays the same.
prompt
With fork=False, resume=False, the sub-agent has no access to the parent's conversation history. Write the prompt as a self-contained task brief:
- Objective: one sentence, the single outcome you want.
- Background: the minimum facts needed to act, such as what already exists and which decisions are made. Do not assume shared context.
- In scope: the concrete targets or steps.
- Out of scope: the adjacent things the sub-agent must not touch. Be specific.
- Deliverable: the exact output path or object and its format.
- Constraints: for example read-only, or nothing created besides the deliverable.
- Done when: the check that proves the task is finished.
- Report: what the final reply must contain.
Naming what is out of scope matters most. A sub-agent told only what to do invents adjacent work: extra tool directories, rebuilds of files it does not own, cleanup nobody asked for. A sub-agent told what not to touch reports the problem instead.
Bad:
Bad, specific about the work but silent about the boundary:
Good:
background
False(default): run synchronously, block until the sub-agent finishes, return result immediately. The parent agent is completely blocked with no progress visibility — only suitable for quick tasks that finish in seconds.True: dispatch as a background task and return immediately. Must follow withwait_for_subagentsto collect the result.
Use background=True in two scenarios:
- Parallel workloads: sequential
call_subagent(..., background=True)calls result in concurrent execution regardless of whether the model supports parallel tool calls. - Long-running tasks: even a single sub-agent should use
background=Truewhen the task may take more than a few seconds. This gives the parent progress visibility viawait_for_subagents(timeout snapshots,patternmatching for checkpoint-based interleaving), and keeps the sandbox alive during long waits.
Parallel context in the prompt
When several sub-agents work on the same plan, every prompt must include a parallel context line:
Only you can write this. Sub-agents are dispatched one at a time and cannot discover or message each other, so you hold the only complete picture of the split. The runtime already tells every sub-agent that siblings may exist and that their work is not its to fix; you add how many there are, who owns what, and who merges.
fork
False(default): sub-agent starts with empty conversation history. Thepromptmust be fully self-contained.True: creates a new sub-agent that inherits the parent's full conversation history and uses the same Agent as the parent. Setagent_name=""and keepresume=False. Thepromptis a directive, not a briefing, because the fork already has full context.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingbackend/super-magic/agents/skills/subagents/SKILL.md
Popularity
- Repository stars
- 4,819
- Repository forks
- 522
- 7-day trend score
- 42
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 14 May 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dtyq/magic/subagents)