agent-host-chat-contributions

agent-host-chat-contributions is a skill for Claude Code, Codex from microsoft/vscode. It costs 56 tokens per session (3,673 once invoked), scanned A, original, MIT.

Architecture guidance for adding behaviour that runs across the Agent Host chat lifecycle. Contributions are small, self-contained components that observe or extend chat events without putting more logic in the main orchestration classes.

In plain words
What is it for?
Adding prompt or context injection, restored-history enrichment, admission checks, turn side effects, or protocol-action observers in the Agent Host.
Why use it?
It keeps lifecycle behaviour separated and prevents large central services from becoming harder to understand and change.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/microsoft/vscode/agent-host-chat-contributions
Any agent
npx skills add microsoft/vscode --skill agent-host-chat-contributions
Clone the repo
git clone --depth 1 https://github.com/microsoft/vscode

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agent-host-chat-contributions

README.md
[![agentmods](https://agentmods.dev/badge/skills/microsoft/vscode/agent-host-chat-contributions.svg)](https://agentmods.dev/skills/microsoft/vscode/agent-host-chat-contributions)
Your own site
<a href="https://agentmods.dev/skills/microsoft/vscode/agent-host-chat-contributions"><img src="https://agentmods.dev/badge/skills/microsoft/vscode/agent-host-chat-contributions.svg" alt="Measured on agentmods" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,673 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00056 $0.03673
Opus 5 $0.00028 $0.01836
Sonnet 5 $0.00011 $0.00735
Haiku 4.5 $0.00006 $0.00367

Measured 4d ago against content hash cc542a1e416a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agent-host-chat-contributions scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/skills/agent-host-chat-contributions/SKILL.md · 300 lines

How it starts

The opening of the file, as written. The whole thing — 300 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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. Does it compose with other behavior in a defined order?

Examples are admission gating, local-command interception, checkpoint and changeset work, queue draining, GitHub-reference attachment, title handling, persisted usage, session input-needed aggregation, session flag persistence, chat drafts, worktree announcements, unread state, rich-link guidance, artifact-tool guidance, and chat-surface guidance. Their directories under node/chatContributions/ are the reference implementations.

Read the full file on GitHub · 300 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 300 lines · 56 tokens per session scan A cc542a1e416a

Subscribe to this mod's changes

agent-host-chat-contributions is a skill published in the GitHub repository microsoft/vscode (190,808 stars, last pushed today), licensed MIT. It adds 56 tokens to every session and 3,673 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

cuml-machine-learning

Use for GPU-accelerated machine learning on tabular data using NVIDIA cuML. Triggers when tasks involve classification, regression, clustering, dimensionality reduction, or model training on datasets.

langchain-ai/deepagents · 43 tokens

maintain-model-list

Maintain the supported LLM model list: add a new model, or run routine maintenance to verify availability and discover new models worth adding. Use when the user asks to add/support a model, update the model list, or check model availability.

alibaba/page-agent · 53 tokens

system-prompts

Write system prompts, tool docs, and agent definitions. Project tag conventions + RFC 2119 keywords + dense compression. Use when authoring or editing any prompt the model reads.

can1357/oh-my-pi · 40 tokens

tool-prompt-optimization

Optimize the description prompts an AI agent reads to learn its built-in tools (the .md files under prompts/tools/). Two halves: (1) measure how much of a prompt is already inferable from the tool's JSON parameter schema + name, to prune redundancy with evidence; (2) house authoring rules for what belongs in a tool…

can1357/oh-my-pi · 0 tokens

review-architecture

Review a PR against the Pascal architectural rules — package boundaries (core/viewer/editor/nodes), the registry-driven composition model (def.geometry / def.renderer / def.system), legacy-dispatch regressions, the slots + world-scale-UV convention for new nodes/geometry, hook hygiene (useEditor/useScene/useViewer)…

pascalorg/editor · 97 tokens

config-evals

Builds and maintains configuration-based evaluations on a workflow with the eval-config tool. Use when the user asks to set up, add, view, change, or remove an evaluation, score, grade, or judge a workflow's output, or measure answer quality against a test dataset. This is the only eval form Instance AI handles — it…

n8n-io/n8n · 80 tokens