cvg-spawn
Ensures subagents remain visible and monitored by the Convergio daemon.
Install
mkdir -p .claude/skills/cvg-spawn && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/17391" && unzip -o skill.zip -d .claude/skills/cvg-spawn && rm skill.zipInstalls to .claude/skills/cvg-spawn
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Wrap spawned-worker briefs (subagent or background agent) with auto-register + heartbeat boilerplate so they stay visible in the Convergio daemon. Use this when invoking the Task tool for code-mutating work in this repo.Key capabilities
- →Generate a unique subagent ID
- →Create a bash block for subagent registration
- →Include a heartbeat POST call in the bash block
- →Add a budget pre-check and mid-flight reminder
- →Generate a bash block for subagent retirement
- →Provide a one-line confirmation summary for the parent agent
How it works
The skill generates a bash wrapper for spawned worker briefs, including a unique ID, registration, heartbeat, and retirement calls to ensure the worker remains visible in the Convergio daemon.
Inputs & outputs
When to use cvg-spawn
- →Spawn worker agent
- →Register subagent
- →Ensure agent visibility
About this skill
/cvg-spawn — wrap a spawned worker brief with Convergio auto-register
Why this skill exists
Claude Code spawned helpers (subagents and background agents launched
via the parent's Task tool) run in a different harness from the
top-level session. The SessionStart hook in .claude/settings.json
therefore does not fire for them — they would silently disappear from
the daemon's agent registry, which means:
cvg agent listcannot see them.- The TUI dashboard cannot colour-code them.
cvg coherence agentscannot detect zombies.- Audit cannot prove who did what.
/cvg-spawn solves this by emitting the canonical 3-step lifecycle
wrapper (register → work → retire) plus a heartbeat reminder. The
parent agent prepends the rendered block to every spawned-worker brief
that contains code-mutating work in this repository.
When to invoke
The parent (top-level) agent should invoke /cvg-spawn immediately
before calling the Task tool, then paste the rendered block
into the head of the spawned worker's brief.
You do not need to invoke /cvg-spawn for read-only helpers (pure
search, single-shot question answering). Invoke it whenever the spawned
worker will edit files, run tests, push branches, or open PRs.
What this skill renders
The skill produces three deterministic outputs (and is safe to re-run: agent registration is an upsert):
- A unique
subagent_idof the formsubagent-${TASK_DESC_SLUG}-${HEX8}where:TASK_DESC_SLUG= first 24 chars of the task description, lower-cased, spaces replaced with-, non-alnum stripped.HEX8= 8 random hex chars (openssl rand -hex 4).
- A bash block to prepend to the spawned-worker brief:
- line 1:
SUBAGENT_ID="subagent-<slug>-<hex8>"(orsubagent-bg-...in background mode) - line 2:
CVG_SPAWN_MODE="subagent"|"background" - line 3: budget pre-check —
./scripts/check-context-budget.shrefuses only on hard caps (exit 1). Soft warnings (exit 2) are advisory. - line 4: register POST to
/v1/agent-registry/agentswithkind=subagentandmetadata.spawn_mode. - line 5: heartbeat POST to
/v1/agent-registry/agents/${SUBAGENT_ID}/heartbeat. - line 6:
# heartbeat every 5 min(subagent) or# heartbeat every 60 s(background) - line 7: budget mid-flight reminder — re-run
check-context-budget.shevery ~200 LOC so the worker does not push past cap on push. - line 8:
# ... do work ... - line 9: retire POST to
/v1/agent-registry/agents/${SUBAGENT_ID}/retire.
- line 1:
- A one-line confirmation summary the parent prints back to the
user before launching the helper:
Subagent <id> will be registered as kind=subagent (mode=...).
Execution
# default (subagent)
bash "$(dirname "$0")/cvg-spawn.sh" <task-description>
# background helper spawned via Task tool background mode
bash "$(dirname "$0")/cvg-spawn.sh" --mode background <task-description>
<task-description> is the short human-readable label the parent
will pass into the Task tool's description field. The skill
slug-ifies it to seed the subagent id.
If CONVERGIO_SPAWN_HEX is set (used by the integration smoke
test), the skill uses it verbatim instead of generating fresh
random bytes — that is the only deterministic seam.
Output contract
| Stream | Content |
|---|---|
| stdout | The wrapper bash block (no leading blank line) followed by the one-line summary on its own line |
| stderr | Empty on success; one-line error on bad usage |
| exit | 0 on success, 2 on missing argument or invalid --mode |
The skill performs no network I/O. It only renders text. The register / heartbeat / retire calls fire when the spawned worker actually runs the rendered block.
Why kind=subagent
The agent registry kind field is a permissive lower-case string
(see convergio-durability::store::agent_validation). Existing
top-level sessions register as kind=claude or kind=copilot.
Subagents register as kind=subagent so:
- The TUI dashboard can render them with reduced visual weight (smaller indent, gray accent).
cvg coherence agentscan decide whether to count them as PR-author candidates (a subagent normally is not the PR author — its parent is).- Audit rows distinguish "I, the human-driven session, did this" from "I, a tool-spawned helper, did this".
The list of recognised kinds lives in
docs/multi-agent-operating-model.md
under "Subagent lifecycle".
Relation to /cvg-attach
/cvg-attach registers the top-level Claude Code session at
session start (the SessionStart hook calls it). /cvg-spawn
generates a wrapper for spawned helpers (subagents and background
agents) launched mid-session via the Task tool. The two skills do not
overlap — they cover the distinct harnesses in which Claude Code can run.
When not to use it
- →For read-only helper agents that do not modify files, run tests, push branches, or open PRs
- →When the `SessionStart` hook in `.claude/settings.json` is expected to fire for the helper
- →When the parent agent does not need to track the spawned worker's visibility
Limitations
- →The skill performs no network I/O and only renders text
- →The skill does not register the top-level Claude Code session
- →The skill requires the parent agent to prepend the rendered block to the spawned worker's brief
How it compares
This skill provides a standardized lifecycle management wrapper for spawned agents, ensuring their visibility and auditability within the Convergio daemon, unlike simply launching a task without tracking.
Compared to similar skills
cvg-spawn side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| cvg-spawn (this skill) | 0 | 2mo | Review | Beginner |
| opencode-cli | 14 | 7mo | Review | Advanced |
| claude-automation-recommender | 47 | 2mo | Review | Beginner |
| mcp-integration | 21 | 8mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
opencode-cli
SpillwaveSolutions
This skill should be used when configuring or using the OpenCode CLI for headless LLM automation. Use when the user asks to "configure opencode", "use opencode cli", "set up opencode", "opencode run command", "opencode model selection", "opencode providers", "opencode vertex ai", "opencode mcp servers", "opencode ollama", "opencode local models", "opencode deepseek", "opencode kimi", "opencode mistral", "fallback cli tool", or "headless llm cli". Covers command syntax, provider configuration, Vertex AI setup, MCP servers, local models, cloud providers, and subprocess integration patterns.
claude-automation-recommender
anthropics
Analyze a codebase and recommend Claude Code automations (hooks, subagents, skills, plugins, MCP servers). Use when user asks for automation recommendations, wants to optimize their Claude Code setup, mentions improving Claude Code workflows, asks how to first set up Claude Code for a project, or wants to know what Claude Code features they should use.
mcp-integration
anthropics
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context Protocol", "connect external service", mentions "${CLAUDE_PLUGIN_ROOT} with MCP", or discusses MCP server types (SSE, stdio, HTTP, WebSocket). Provides comprehensive guidance for integrating Model Context Protocol servers into Claude Code plugins for external tool and service integration.
hook-development
anthropics
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.
agent-factory
alirezarezvani
Claude Code agent generation system that creates custom agents and sub-agents with enhanced YAML frontmatter, tool access patterns, and MCP integration support following proven production patterns
swarm-advanced
ruvnet
Advanced swarm orchestration patterns for research, development, testing, and complex distributed workflows