Skip to content

Claude Code Plugin

Install and configure the Archgate plugin for Claude Code. Give your agent a governance workflow that reads ADRs before coding, validates after, and captures architectural patterns via skills and sub-agents.

The Archgate plugin for Claude Code is the most complete editor integration. It ships five skills and two sub-agents, and wires them into a structured governance loop: the agent reads the ADRs that apply to the files it is about to touch, writes code against those constraints, validates with automated checks and a focused review pass, and finally captures any new patterns back into your ADRs.

This is the integration most teams start with. If you are evaluating Archgate across editors, see the plugin ecosystem overview for the feature matrix.

The plugin (archgate@archgate, version 0.7.0) registers a marketplace entry in Claude Code and installs two sub-agents and five skills.

AgentModePurpose
archgate:developerEdits (acceptEdits)General development agent. Reads applicable ADRs before coding, validates after, and captures learnings. Orchestrates the skills below automatically.
archgate:plannerRead-onlyDesigns ADR-compliant implementation approaches without writing or modifying any files. Useful for scoping work before handing it to the developer agent.

The archgate:developer agent is set as the default agent — the plugin ships a settings.json with { "agent": "archgate:developer" }. It carries memory: project, so governance context persists across sessions in the project.

SkillWhen the agent uses it
archgate:reviewerAfter a code change — validates all changes against project ADRs using focused per-domain sub-agents.
archgate:lessons-learnedAfter coding and validation are complete — captures recurring patterns and codifies them into ADRs.
archgate:adr-authorWhen creating or editing an ADR — follows the project’s established ADR structure and conventions.
archgate:onboardOnce per project — runs archgate init, explores the codebase, interviews you, and writes initial ADRs.
archgate:cli-referenceInternal: loads the authoritative CLI command, rules-authoring, and ADR-format references on demand.

You rarely invoke skills by hand. The developer agent calls reviewer and lessons-learned as part of its workflow, and loads cli-reference whenever it needs exact command or rule syntax that may be newer than its training data.

  1. Log in with GitHub.

    Authenticate to obtain your plugin token. This starts a GitHub Device Flow — the CLI prints a one-time code and a URL; open the URL, enter the code, and authorize.

    Terminal window
    archgate login

    Credentials are stored securely in your OS credential manager via git credential approve, so the token persists for background plugin updates.

  2. Initialize your project.

    Run archgate init in your project root. If you are already logged in, the plugin is installed automatically:

    Terminal window
    archgate init

    To request plugin installation explicitly:

    Terminal window
    archgate init --install-plugin

    This writes .claude/settings.local.json with the archgate:developer agent and skill permissions pre-configured, and sets up the .archgate/ directory.

  3. Let the CLI register the marketplace.

    If the claude CLI is on your PATH, the plugin is installed automatically via:

    Terminal window
    claude plugin marketplace add # registers the Archgate marketplace (plugins.archgate.dev)
    claude plugin install archgate@archgate

    If the claude CLI is not found, archgate init prints these commands for you to run manually.

If the project is already initialized, install or reinstall the plugin without re-running archgate init:

Terminal window
archgate plugin install

To get the authenticated marketplace URL for manual configuration:

Terminal window
archgate plugin url

After installation, run the archgate:onboard skill once per project. Ask the agent to onboard the project, and the skill will:

  1. Explore your codebase structure — directories, key files, package configuration.
  2. Interview you about your team’s conventions, constraints, and architectural decisions.
  3. Create an initial set of ADRs from your answers.
  4. Set up the .archgate/ directory with your first rules.

Onboarding runs once. After that, the other skills handle day-to-day development. See Writing ADRs for the ADR format the onboard skill follows.

For every coding task, the developer agent follows a five-phase workflow. The phases map directly onto the governance loop — prevention, detection, and learning.

  1. Understand — read the ADRs.

    The agent runs archgate review-context to get condensed briefings (the Decision and Do’s and Don’ts sections) for every ADR that applies to the changed files, grouped by domain. It does not write code until it has read the applicable ADRs.

  2. Plan — design a compliant approach.

    The agent designs an implementation that satisfies every applicable ADR. If a constraint conflicts with the task, it flags the conflict instead of silently violating the ADR.

  3. Write — implement against the constraints.

    The agent writes code referencing the Do’s and Don’ts it read in phase 1.

  4. Validate — checks, then the reviewer skill.

    The agent first discovers and runs your project’s own validation (CI checks, linters, type checkers, tests), then runs archgate check for fast automated rule validation. For an initial task completion it invokes the archgate:reviewer skill, which launches a focused sub-agent per affected domain to verify structural compliance against the full ADR set. ADR violations are hard blockers; warnings are surfaced to you but do not block.

  5. Capture — the lessons-learned skill.

    After validation passes, the agent invokes archgate:lessons-learned to review rule coverage, identify patterns worth codifying, and propose new ADRs or updates to existing ones — so the same decision carries forward to every future session.

When a task would require violating an ADR, the developer agent refuses, names the ADR that would be violated, and suggests a compliant alternative — consistently, regardless of how the request is phrased. ADRs are treated as mandatory constraints, not suggestions. If you insist on bypassing, it refuses again.

For example, asked to add a Redis cache for sessions in a project where an ADR mandates a database-backed session store, the agent declines, cites the ADR, and proposes a read-through cache on top of the existing store instead.

When you want a plan before any code is written, switch to the archgate:planner agent. It reads the relevant ADRs, analyzes the codebase, and produces a structured plan — ADR compliance summary, file-level approach, dependencies, risk areas, governance gaps, and a verification strategy — without writing or editing a single file. Hand the resulting plan to the developer agent to execute.

The plugin drives the Archgate CLI directly — nothing is sent to an external service. The commands it relies on:

  • archgate review-context — condensed, domain-grouped briefings for all ADRs applicable to the changed files.
  • archgate check — automated rule checking with violation reporting.
  • archgate adr show <id> — full text of a specific ADR.
  • archgate adr list — inventory of all ADRs with metadata.
  • archgate session-context claude-code — reads session transcripts for context recovery.

All commands run locally and read from your .archgate/adrs/ directory. For exact flags, output formats, and the rules-authoring API, see the authoritative reference at cli.archgate.dev — the plugin itself loads these via the cli-reference skill rather than guessing.

ScenarioUse
Setting up Archgate on a new projectarchgate:onboard
Planning an approach before codingarchgate:planner
Day-to-day coding tasksarchgate:developer
Reviewing changes for ADR compliancearchgate:reviewer
Capturing a recurring pattern as an ADRarchgate:lessons-learned
Creating or editing an ADR by handarchgate:adr-author

Most of the time you interact only with the developer agent — it orchestrates reviewer and lessons-learned automatically.