Cross-Agent Communication

How agents from different plugins interact across Claude Code, Copilot CLI, VS Code Chat, Codex, Cursor, Windsurf, and more. Single-source conventions, multi-platform skills, and unified hooks.

Rules

Convention Architecture

Coding conventions live in .claude/rules/ -- a single source read by both Claude Code and Copilot CLI.

Dual Frontmatter

Each rule file has dual frontmatter: paths: (Claude Code) and applyTo: (Copilot CLI). Both tools read their own key and ignore the other.

Example: fe-javascript.md
# paths: ["**/*.js"]
# applyTo: "**/*.js"

## Component Structure
[Rules, patterns, conventions...]

How Each Tool Reads Rules

ToolMechanismKey
Claude CodeAuto-loads nativelypaths:
Copilot CLICOPILOT_CUSTOM_INSTRUCTIONS_DIRSapplyTo:

History

Before v2.43.0, rules were copied to both .claude/rules/ and .github/instructions/. The COPILOT_CUSTOM_INSTRUCTIONS_DIRS env var (Copilot CLI v1.0.6+) eliminated this duplication. .github/instructions/ is no longer generated.

Agents

Agent Mapping

Each Claude Code agent has a Copilot counterpart. Same logic, different format.

Claude AgentCopilot AgentPurpose
dx-code-reviewerDxCodeReviewFull branch code review
dx-pr-reviewerDxPRReviewADO PR review with comment posting
(direct Skill() invocation)DxPlanExecutorExecute implementation plan steps
dx-file-resolverDxComponentComponent/module file lookup
dx-doc-searcherDxHelpProject Q&A from .ai/ docs
aem-inspectorAEMBefore / AEMAfter / AEMSnapshotPre/post deployment capture, inspection
aem-editorial-guide-captureAEMEditorialGuideDialog screenshots + authoring guide
aem-page-finderAEMComponentAEM page lookup
aem-bug-executorAEMVerifyBug verification on AEM
Handoffs

Cross-Plugin Handoffs

AEM Copilot agents hand off to DX agents for shared workflows.

AEM to DX Handoffs

AEM agents delegate to DX agents when they need workflow capabilities beyond AEM scope.

AEMBefore Baseline capture
DxPlanExecutor Start implementation
AEMAfter Post-deploy verify
DxCodeReview Review changes
AEMComponent Component lookup
DxTicket Research ticket
AEMVerify Bug reproduction
DxDebug Diagnose issue
Coordinators

Coordinator Agents

Coordinator skills become Copilot agents with handoffs: for multi-step orchestration.

Copilot AgentReplaces SkillChain
DxReqAll/dx-reqfetch → dor → explain → research → share
DxStepAll/dx-step-allstep → test → review → commit (loop)
DxBugAll/dx-bug-alltriage → fix
DxAgentAll/dx-agent-allDxReqAll → plan → DxStepAll → DxCommit
DxFigma/dx-figma-*extract → prototype → verify

Copilot CLI Limitation

The handoffs: field is parsed but does NOT execute in Copilot CLI yet. Templates include it so they auto-activate when CLI adds support. CLI users invoke coordinator skills sequentially or use /fleet mode.

Format

Format Differences

Same logic, different file formats and tool names across platforms.

AspectClaude CodeCopilot CLI
Agent locationplugins/*/agents/*.md.github/agents/*.agent.md
Tool formatRead, Glob, Grep, Bashread, edit, search
MCP toolsmcp__server__tool’server/tool’
Sub-agentsFlat (Task tool)agents: field (nested, VS Code 1.113+)
NavigationN/Ahandoffs:
Per-agent modelYesYes
Hooks in frontmatterYesNo
Skills

Skill Discovery

Both platforms auto-discover plugin skills. No copying or transformation needed.

Claude Code

Loads plugin skills directly via the plugin system. Skills with context: fork spawn isolated subagents. Coordinator skills use agent: dispatch frontmatter for delegation.

Copilot CLI

Auto-discovers plugin skills directly — no copying to .github/skills/ needed. Coordinator skills become Copilot agents with handoffs: for orchestration (parsing works since v0.0.402, execution pending).

Hooks

Unified Hook System

A single hooks.json file works across both Claude Code and Copilot CLI.

SessionStart

Validates .ai/config.yaml exists and Node version matches .nvmrc. Runs on both platforms.

PreToolUse

Blocks commits on protected branches (main, master, development, develop). Branch guard deployed to both plugin hooks and .github/hooks/hooks.json.

Stop

Session stop guard — checks for secrets, abandoned steps, and uncommitted changes. Prompts for confirmation before terminating.

Platform Separation

Plugin hooks/hooks.json is active in Claude Code only. .github/hooks/hooks.json is active in Copilot CLI only. Both use the same version: 1 format with PascalCase events. /dx-init deploys hooks to both locations.

Hook Merging (Copilot CLI v1.0.11+)

Multiple plugins’ hooks now merge instead of overwriting each other. dx-core contributes general hooks (branch guard, Figma screenshots, subagent log) while dx-aem contributes AEM-specific hooks (Chrome DevTools screenshots). In Claude Code, plugin hooks always merged. In Copilot CLI, this required v1.0.11+. SessionStart additionalContext is also now injected into the conversation context.

Plugins

Plugin System

Same plugin.json manifest works for both tools from the same marketplace repo.

Single Manifest

plugin.json is read by both Claude Code and Copilot CLI. Install from the same marketplace with /plugin install. Both tools auto-discover agents and skills from default directories.

Permissions

Claude Code uses .claude/settings.json with permissions.allow. Copilot CLI uses —allow-tool flags per invocation. Each platform handles auto-approval independently.

Summary: Single Source, Dual Output

Same plugins, same marketplace, same skills. Rules use dual frontmatter. Hooks use a single format. Agent templates generate both Claude Code and Copilot .agent.md files with platform-specific tool name transforms.

KAI by Dragan Filipovic