ワンクリックで
subagent-badge-state
Render live sub-agent badges from resolved identity, current model, and active work state.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Render live sub-agent badges from resolved identity, current model, and active work state.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
{what this skill teaches agents}
Validate Squad avatar regressions with alias-resolution probes and source assertions around reset paths.
Use stable agent identity fields for metadata joins and reserve instance ids for runtime bookkeeping.
Protect persisted voice selections when async voice lists reload or the active TTS engine changes.
Replay extension state only after the webview page declares its own ready flag.
Keep avatar window chrome and topmost behavior driven by one explicit rule.
| name | subagent-badge-state |
| description | Render live sub-agent badges from resolved identity, current model, and active work state. |
| domain | frontend, extension-ui |
| confidence | high |
| source | earned |
Use this when avatar or agent overlays need to explain what each sub-agent is doing right now. These cards have tiny surfaces, so every line has to carry live state instead of decorative filler.
General Purpose Agent, but keep a safe fallback chain for non-Squad sessions.detailText / taskSummary / live intent so the role never falls back into the lower box.displayName, role, taskSummary, detailText) through subagent.started, live activity/intention/model/thinking updates, and terminal events. Otherwise an out-of-order progress or completion update can recreate the card with only role-flavored metadata.activityLabel before intent and task summary, thinking cards resolve intent before task summary, idle cards fall through to role/default copy, and success/failed cards skip task summaries entirely in favor of terminal intent/status text.subagent.started as the render permission for that runtime agentId. Show the card immediately; do not add a second evidence gate or debounce on top of Copilot presence.assistant.reasoning, assistant.intent, model updates, and tool-wrapper metadata non-promoting until a matching subagent.started exists. Once the Copilot-owned card exists, those signals can enrich it freely.addSubagent or another payload with a strong resolved identity arrives. Do not let update-only traffic mint a placeholder card with General Purpose Agent-style fallback copy.subagent.started finally lands, but do not require those hints as extra proof before first render.addSubagent has not created the card yet. That keeps visibility ownership in the extension lifecycle seam instead of leaking into badge/activity helpers.displayName > resolved agentName > fallback/current) so a late Squad-resolved name can replace an earlier fallback label without letting weaker runtime slugs overwrite a good visible name.Lead, Frontend Dev, or similar role text after live activity clears.workDescription/taskSummary field from main.mjs and render that for non-root cards instead of reusing transient Copilot intent copy.parentToolCallId first, but also keep a runtime toolCallId → agentId map so assistant.intent, assistant.usage, and tool.execution_complete still hit the right card when the SDK omits event.agentId.session.getMessages(): recover spawn metadata from historical parent tool calls, bind it back to agentId, and replay the active cards into the webview once it is ready.subagent.selected as a short-lived identity hint for weak runtime labels. Cache it, bind it once to the concrete agentId when subagent.started or a correlated follow-up event lands, then clear the pending hint so it cannot bleed into another agent.subagentStateById, tool-call activity maps, pending model maps) and send a matching webview clear call so backend and UI snapshots stay in lockstep.idle, let thinking and explicit work-description fallback win so wrapper noise like report_intent does not hide the real assignment..github/extensions/copilot-avatar/main.mjs builds a shared resolveSubagentEventData() payload for started/completed/failed events..github/extensions/copilot-avatar/content/main.js uses getAvatarBadgeText() and describeToolActivity() to keep badge text aligned with live tool state..github/extensions/copilot-avatar/content/main.js can render .agent-header + .agent-role + .agent-detail, while .github/extensions/copilot-avatar/main.mjs forwards detailText and taskSummary through buildSubagentPayload() so the lower panel stays about work, not identity..github/extensions/copilot-avatar/main.mjs should pass an explicit taskSummary payload sourced from task spawn hints, while content/main.js uses that field for badge fallback instead of roster description..github/extensions/copilot-avatar/main.mjs resets cached sub-agent maps before refreshSessionContext() re-syncs a new session or cwd, and .github/extensions/copilot-avatar/content/main.js exposes window.clearSubagents() to drop non-root avatars immediately..github/extensions/copilot-avatar/main.mjs forwards taskSummary separately from Squad description, and .github/extensions/copilot-avatar/content/main.js reads that dedicated taskSummary for badge fallback instead of role-flavored charter copy..github/extensions/copilot-avatar/main.mjs can call ensureSubagentVisible() directly from subagent.started, then let tool.execution_start / tool.execution_progress update badge activity without any first-render debounce..github/extensions/copilot-avatar/main.mjs can keep task wrapper entries in activeToolStatesByToolCallId or pending spawn hints for correlation and richer labels, while still requiring seenStartedEvent before any non-root card is shown or updated..github/extensions/copilot-avatar/main.mjs can resolve assistant.intent, assistant.usage, and tool.execution_complete through resolveAgentIdFromEvent() plus a runtime toolAgentIdsByToolCallId map, so missing event.agentId does not send sub-agent detail back through the root path..github/extensions/copilot-avatar/main.mjs can call session.getMessages() on avatar open, scan historical tool.execution_start + subagent.started events into active sub-agent state, then replay addSubagent / setAgentModel / setAgentIntent / setAgentActivity so already-running agents keep their Squad names..github/extensions/copilot-avatar/main.mjs schedules a fallback retire when tool.execution_complete clears a visible sub-agent's last live tool without a matching subagent.completed / subagent.failed..github/extensions/copilot-avatar/content/main.js can treat workDescription as the first non-root detail fallback and ignore idle tool entries when deciding whether thinking should be visible..github/extensions/copilot-avatar/content/main.js can queue setAgentActivity / setAgentIntent / setAgentThinking for a missing sub-agent, then replay them inside ensureAvatar() once addSubagent or a strong identity payload creates the card..github/extensions/copilot-avatar/content/style.css widens sub-agent cards slightly and clamps badge text to two lines.subagent.started before a Copilot-owned card is allowed to appear.assistant.reasoning, assistant.intent, model-only updates, or terminal events mint a new non-root card before Copilot has emitted subagent.started.task wrapper or report_intent tool bypass Copilot lifecycle ownership and create cards by themselves.It looks like you're all set) outrank a non-root card's assigned work description.