Agent skill · microsoft

agent-host-chat-contributions

Build and review cross-cutting agent-host chat behavior through lifecycle contributions. Use when adding turn lifecycle side effects, prompt or context injection, restored-history transformation, protocol-action observation, or when reviewing changes that add code to AgentSideEffects or AgentService.

What it needs

About 9k tokens when loaded.

What this skill does

Agent Host Chat Contributions Use the contribution model for a self-contained behavior that crosses an agent-host chat lifecycle boundary. Read these files before changing the model: src/vs/platform/agentHost/common/agentHostChatContributionsService.ts src/vs/platform/agentHost/node/agentHostChatContributionsService.ts src/vs/platform/agentHost/node/chatContributions/TODO.md src/vs/platform/agentHost/node/chatContributions/builtInChatContributions.ts The rule that prevents the old failure mode New cross-cutting features go in contributions, not in AgentSideEffects or AgentService. AgentSideEffects has shed well over 700 lines by extracting seventeen behaviors. Do not put another lifecycle side effect, outgoing-prompt addition, restored-turn enrichment, admission check, or action observer back into either large orchestration class. AgentSideEffects dispatches the lifecycle and retains routing and send mechanics; AgentService owns session lifecycle and invokes hydration and memento eviction. See agentSideEffects.ts and agentService.ts. This is also a review rule: code added to either file needs a specific reason that it is routing, a correctness invariant, provider-shaped behavior, or a dispatcher call site. "It was convenient to add here" is not a reason. Decide before you code Write a contribution when the behavior answers yes to this test: 1. Does it react to a lifecycle moment the hooks already name — a turn request asking to proceed, a completed turn, a dispatched action, a turn about to be sent, a restored turn list, or a chat being restored? 2. Can an explicitly registered, dependency-injected unit own it without changing protocol routing or provider mapping? 3. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills microsoft/agent-host-chat-contributions

View the source on GitHub

Browse the @skills marketplace