group-chat

group-chat is a skill for Claude Code from ag2ai/ag2-claude-plugins. It costs 39 tokens per session (2,516 once invoked), scanned A, original, Apache-2.0.

A workflow for creating a group chat between multiple AG2 agents, with explicit rules for passing work from one agent to another. AG2 is a framework for building applications where several AI agents collaborate.

In plain words
What is it for?
Use it to design multi-agent pipelines, specialist handoffs, hierarchical delegation, and workflows where agents need shared context or tools.
Why use it?
It makes agent handoffs, routing, validation steps, and shared state explicit instead of leaving coordination to chance.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the ag2-workflow-patterns plugin — 6 skills shipped together

Good fit Use it to design multi-agent pipelines, specialist handoffs, hierarchical delegation, and workflows where agents need shared context or tools.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ag2ai/ag2-claude-plugins/group-chat
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.

Any agent
npx skills add ag2ai/ag2-claude-plugins --skill group-chat
Clone the repo
git clone --depth 1 https://github.com/ag2ai/ag2-claude-plugins

Made for: Claude Code.

Or install ag2-workflow-patterns, the plugin that ships this one along with the rest of its 6 skills.

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 group-chat

README.md
[![agentmods](https://agentmods.dev/badge/skills/ag2ai/ag2-claude-plugins/group-chat.svg)](https://agentmods.dev/skills/ag2ai/ag2-claude-plugins/group-chat)
Your own site
<a href="https://agentmods.dev/skills/ag2ai/ag2-claude-plugins/group-chat"><img src="https://agentmods.dev/badge/skills/ag2ai/ag2-claude-plugins/group-chat.svg" alt="Measured on agentmods" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,516 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00039 $0.02516
Opus 5 $0.00019 $0.01258
Sonnet 5 $0.00008 $0.00503
Haiku 4.5 $0.00004 $0.00252

Measured 6d ago against content hash d32c75796bde, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

group-chat 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 6d 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.

plugins/ag2-workflow-patterns/skills/group-chat/SKILL.md · 364 lines

How it starts

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

You are creating an AG2 group chat workflow using DefaultPattern -- explicit handoffs control agent transitions.

Instructions

  1. Ask the user for:

    • What task the group needs to solve
    • How many agents and their specializations
    • The handoff/routing logic between agents
    • Whether agents need tools (functions)
    • Whether shared context variables are needed
  2. Create the group chat following this pattern:

DefaultPattern Group Chat

from autogen import ConversableAgent, UserProxyAgent, LLMConfig
from autogen.agentchat import run_group_chat
from autogen.agentchat.group.patterns import DefaultPattern
from autogen.agentchat.group import (
    AgentTarget,
    AgentNameTarget,
    OnCondition,
    StringLLMCondition,
    OnContextCondition,
    ContextExpression,
    ExpressionContextCondition,
    ReplyResult,
    ContextVariables,
    RevertToUserTarget,
    TerminateTarget,
)

llm_config = LLMConfig({"api_type": "anthropic", "model": "claude-sonnet-4-6"})

# Shared context for tracking state across agents
shared_context = ContextVariables(data={
    "stage_completed": False,
})

# Tool function that controls handoff via ReplyResult
def process_task(result: str, context_variables: ContextVariables) -> ReplyResult:
    """Process and hand off to next agent"""
    context_variables["stage_completed"] = True
    return ReplyResult(
        message=f"Task processed: {result}",
        context_variables=context_variables,
        target=AgentNameTarget("next_agent"),  # Explicit handoff
    )

agent_a = ConversableAgent(
    name="agent_a",
    system_message="Your role instructions...",
    functions=[process_task],
    llm_config=llm_config,
)

agent_b = ConversableAgent(
    name="next_agent",
    system_message="Your role instructions...",
    llm_config=llm_config,
)

user = UserProxyAgent(name="user", code_execution_config=False)

# Register handoffs (see Handoffs section below)
agent_a.handoffs.add_context_condition(
    OnContextCondition(
        target=AgentTarget(agent_b),
        condition=ExpressionContextCondition(
            ContextExpression("${stage_completed} == True")
        ),
    ),
)
agent_a.handoffs.set_after_work(RevertToUserTarget())

pattern = DefaultPattern(
    initial_agent=agent_a,
    agents=[agent_a, agent_b],
    user_agent=user,
    context_variables=shared_context,
)

result = run_group_chat(
    pattern=pattern,
    messages="Your task here",
    max_rounds=30,
)
result.process()
print(result.summary)
# result.context_variables has the final shared state
# result.last_speaker has the last agent's name

Read the full file on GitHub · 364 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. 6d ago First seen · 364 lines · 39 tokens per session scan A d32c75796bde

Subscribe to this mod's changes

group-chat is a skill published in the GitHub repository ag2ai/ag2-claude-plugins (2 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 39 tokens to every session and 2,516 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens