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 | Auto-loads natively (v1.0.89+) | paths: (mapped to its applyTo scope) |
History
Before v2.43.0, rules were copied to both .claude/rules/ and .github/instructions/.
v2.43.0 replaced the copies with the COPILOT_CUSTOM_INSTRUCTIONS_DIRS env var — but that
variable only loads AGENTS.md and *.instructions.md, never plain <name>.md,
so Copilot CLI loaded none of these rules until v1.0.89 (2026-09-28) added native .claude/rules support.
Verified with copilot instruction list on v1.0.88 and v1.0.98. The env var is no longer set.
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 / AEMSnapshot | Pre-development baseline, inspection |
aem-demo-page-capture | AEMDemoPage | Demo page + dialog/preview screenshots |
aem-page-finder | AEMComponent | AEM page lookup |
/dx-bug-verify (skill) | 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 | Yes, v1.0.97+, trusted folder only |
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) with exit 2. Ships in the
plugin hooks and, for the Copilot cloud agent, in .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 read by Claude Code and Copilot CLI.
.github/hooks/hooks.json is read by Copilot CLI and by the Copilot cloud coding agent,
which ignores plugins. Copilot runs every source with no dedup, so /dx-init puts only
the self-contained branch guard and Stop guard in the repo file — plugin-script hooks such as
SessionStart stay in the plugin, because Copilot does not set PLUGIN_ROOT for repo hooks.
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
(Playwright 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.