Claude Code plugin

The Packrat plugin lets Claude Code query your Packrat data, declare the checks that verify each pull request, and check how your deploys are doing in production.

Turn it on for your repository

To give everyone who works in a repository the plugin, add it to the repository's .claude/settings.json and commit the file. In a Rails app, bin/rails generate packrat does this for you.

{
  "extraKnownMarketplaces": {
    "packrat": { "source": { "source": "github", "repo": "packratlabs/claude-plugin" } }
  },
  "enabledPlugins": { "packrat@packrat": true }
}

When someone opens Claude Code in the repository and trusts the folder, Claude Code adds the plugin. There's nothing to install.

Claude Code applies the file only in a folder you trusted itself. If you trusted a parent folder, such as ~/projects, Claude Code shows Plugin "packrat" not cached and /packrat:ask isn't found. Install the plugin yourself, as below.

Install the plugin yourself

To use the plugin in every repository on your machine, run these in Claude Code, one at a time:

/plugin marketplace add packratlabs/claude-plugin
/plugin install packrat@packrat

The plugin runs the Packrat CLI. If packrat is on your PATH, the plugin uses it. Otherwise, it downloads the CLI the first time it runs.

Keep the plugin up to date

Claude Code updates a plugin from a marketplace outside Anthropic only when you turn on auto-update for that marketplace. Run /plugin, open Marketplaces, choose packrat and select Enable auto-update. Claude Code then updates the plugin in the background a few minutes into a session and tells you to run /reload-plugins. The packrat-rails generator turns it on for the repository in .claude/settings.json.

While auto-update is off, the plugin tells you at the start of a session when a newer version is out. To update it then, run:

claude plugin update packrat@packrat

Sign in

! packrat login

The command opens your browser so you can approve the sign-in, and keeps an API key on your machine.

Check the plugin

/packrat:ask status

Claude runs packrat status and tells you what Packrat receives for your apps. The Next steps page of your app shows when Claude Code last reached Packrat with your key.

Use it

Ask Claude about production, and it uses the plugin. For example:

  • "How did PR 482 do?", or /packrat:ask PR 482
  • A Packrat link, such as one from a Packrat email
  • "Why is checkout slow?"
  • "Check that the cleanup job ran on Monday."

Before Claude opens a pull request with gh pr create, it drafts the pull request's checks: what shows the change worked in production, the data that shows it, and how long after the deploy to look. The plugin validates the draft first, then declares it with packrat pr checks set once the pull request has a number. After the deploy, the analyst runs each check and reports whether the change worked. A repository Packrat doesn't verify is never blocked.

The plugin's README has the details.