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.
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.
# paths: ["**/*.js"] # applyTo: "**/*.js" ## Component Structure [Rules, patterns, conventions...]
How Each Tool Reads Rules
| Tool | Mechanism | Key |
|---|---|---|
| Claude Code | Auto-loads natively | paths: |
| Copilot CLI | COPILOT_CUSTOM_INSTRUCTIONS_DIRS | applyTo: |
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.
Agent Mapping
Each Claude Code agent has a Copilot counterpart. Same logic, different format.
| Claude Agent | Copilot Agent | Purpose |
|---|---|---|
dx-code-reviewer | DxCodeReview | Full branch code review |
dx-pr-reviewer | DxPRReview | ADO PR review with comment posting |
| (direct Skill() invocation) | DxPlanExecutor | Execute implementation plan steps |
dx-file-resolver | DxComponent | Component/module file lookup |
dx-doc-searcher | DxHelp | Project Q&A from .ai/ docs |
aem-inspector | AEMBefore / AEMAfter / AEMSnapshot | Pre/post deployment capture, inspection |
aem-editorial-guide-capture | AEMEditorialGuide | Dialog screenshots + authoring guide |
aem-page-finder | AEMComponent | AEM page lookup |
aem-bug-executor | AEMVerify | Bug verification on AEM |
Cross-Plugin Handoffs
AEM Copilot agents hand off to DX agents for shared workflows.
AEM agents delegate to DX agents when they need workflow capabilities beyond AEM scope.
Coordinator Agents
Coordinator skills become Copilot agents with handoffs: for multi-step orchestration.
| Copilot Agent | Replaces Skill | Chain |
|---|---|---|
| DxReqAll | /dx-req | fetch → dor → explain → research → share |
| DxStepAll | /dx-step-all | step → test → review → commit (loop) |
| DxBugAll | /dx-bug-all | triage → fix |
| DxAgentAll | /dx-agent-all | DxReqAll → 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 Differences
Same logic, different file formats and tool names across platforms.
| Aspect | Claude Code | Copilot CLI |
|---|---|---|
| Agent location | plugins/*/agents/*.md | .github/agents/*.agent.md |
| Tool format | Read, Glob, Grep, Bash | read, edit, search |
| MCP tools | mcp__server__tool | ’server/tool’ |
| Sub-agents | Flat (Task tool) | agents: field (nested, VS Code 1.113+) |
| Navigation | N/A | handoffs: |
| Per-agent model | Yes | Yes |
| Hooks in frontmatter | Yes | No |
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).
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.
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.