Plugins

June 19, 2026 · View on GitHub

This directory contains the mc-agent-toolkit plugin for each supported AI coding agent. Each plugin bundles skills, hooks, MCP server configuration, and agent-specific adapters into a single installable package.

For the user-facing feature list and installation instructions, see the main README.

Coding Agent Support

AgentStatusSkillsMCPInstallation
Claude CodeFullAll 17OAuthSetup guide
CursorFullAll 17OAuthSetup guide
OpenCodeFullAll 17OAuthSetup guide
Cortex CodeFullAll 17OAuthSetup guide
Copilot CLIPreliminaryAll 17OAuthSetup guide
CodexPreliminaryAll 17OAuthSetup guide

Currently, only the Prevent skill leverages hooks for enforcement; the other skills are instruction-only. (Telemetry also uses a lightweight SessionStart hook to fire an anonymous install beacon — see each plugin's README and the Telemetry section in the root README.)

Prevent Hook Behavior

The Prevent feature uses four hooks and a slash command to enforce the impact-assessment-first workflow:

ComponentWhat it does
Pre-edit hookBlocks edits to dbt models (and macros/snapshots) until a change impact assessment has been presented.
Post-edit hookTracks which models were modified in the session for downstream validation.
Pre-commit hookGates git commit when modified models have unresolved monitor coverage gaps.
Turn-end hookFires at the end of each turn to inject validation reminders when models were edited without running validation queries.
/mc-validate commandExplicitly generates validation queries for all dbt models changed in the session.

How it works:

  1. You edit a model — the pre-edit hook blocks until a change impact assessment runs. The agent surfaces downstream blast radius, active alerts, monitor coverage, and a risk-tiered recommendation.
  2. You confirm and edit — the post-edit hook records the change. The skill offers to generate monitors for new logic.
  3. You commit — the pre-commit hook checks for unresolved monitor coverage gaps flagged during the assessment.
  4. You validate — run /mc-validate or ask the agent to generate validation queries. Targeted SQL checks are saved to validation/<table>_<timestamp>.sql.

Hook availability and behavior varies by agent — see each agent's README for platform-specific details. The Hook Format Comparison table below shows the technical differences.

Editor compatibility: Most agents run inside popular editors. VS Code users can use Copilot CLI or Claude Code. JetBrains users can use Copilot CLI. Cursor is a standalone editor with its own plugin. Claude Code, Copilot CLI, and OpenCode also run in any terminal. Codex runs on GitHub. Cortex Code is Snowflake's terminal CLI agent.

Architecture

Each editor plugin follows the unified toolkit model — one plugin per editor named mc-agent-toolkit, with skills as features within it.

plugins/
├── shared/              # Shared hook logic, synced into each editor plugin
│   ├── prevent/lib/     # Business logic used by all editor adapters (Python)
│   └── telemetry/lib/   # Canonical install-beacon (bash), synced into hooks/telemetry/lib/
├── claude-code/         # Claude Code plugin
├── cursor/              # Cursor plugin
├── opencode/            # OpenCode plugin (TypeScript port)
├── copilot/             # Copilot CLI plugin
├── codex/               # Codex plugin (skills only)
└── cortex-code/         # Cortex Code plugin (wraps Claude Code)

Key patterns:

  • Shared hook logic lives in shared/<skill>/lib/. Editor plugins copy it (kept in sync via scripts/bump-version.sh --sync-only; symlinks under hooks/ are rejected by CI) and provide thin adapter scripts that translate editor-specific JSON formats.
  • Skills are symlinked from ../skills/ — authored once, shared across all editors.
  • OpenCode is an exception — it ports the shared logic to TypeScript since the @opencode-ai/plugin SDK requires it.

For detailed architecture decisions, see the Plugin Architecture Guide. For contribution guidelines, see CONTRIBUTING.md.

Hook Format Comparison

AspectClaude CodeCursorOpenCodeCopilot CLICortex Code
LanguagePythonPythonTypeScriptPythonPython
Hook confighooks/<skill>/hooks.jsonhooks/<skill>/hooks.jsonEvent handlers in src/hooks.json (v1 format) at plugin roothooks/<skill>/hooks.json
Command field"command""command"SDK events"bash""command"
Tool namesWrite, Edit, BashWrite, Editedit, write, apply_patchedit, create, bashEdit/Write/MultiEdit/Bash (matchers; tool names arrive lowercased)
Deny formathookSpecificOutput.permissionDecisionpermission: "deny"Thrown ErrorpermissionDecision: "deny"hookSpecificOutput.permissionDecision
Session IDsession_idconversation_idSDK clientPID (not provided)session_id

Cortex Code wraps Claude Code, so its hook config and hook I/O JSON match Claude Code, and ${CORTEX_PLUGIN_ROOT} expands in hook commands (the analog of Claude Code's ${CLAUDE_PLUGIN_ROOT}; the Cortex hooks use ${CORTEX_PLUGIN_ROOT}). The one difference: the hook transcript_path points at a <id>.json metadata file, while the session messages live in a sibling <id>.history.jsonl; the prevent pre-edit hook reads that sibling and matches markers only in assistant-authored text.