For maintainers: guard the agents that work in your repository

This page is for people who run a repository that accepts changes written by coding agents. Back to the README.

Why a repository wants a guard

A contributor who uses a coding agent gives that agent the shell of their own machine. The agent can run terraform destroy, DROP TABLE, git push --force or rm -rf ~. It can read ~/.aws/credentials. It can write a key into a file that you then merge. You do not see these calls in the pull request. You see only the result.

KYA Guard checks each tool call before it runs, on the contributor’s machine. It stops these calls and tells the agent why. It makes no network call, it is one file, and it fails open: if the guard itself breaks, the call goes ahead and the guard writes one error line. It is advisory. It does not replace review, branch protection or a sandbox.

Public examples of calls it stopped: https://shield-agent.com/replays.

The one command

Run it at the repository root:

kya team init --guard --dry-run   # print the diff and the badge, write nothing
kya team init --guard             # write .claude/settings.json
git add .claude/settings.json && git commit -m "chore: enable the kya-guard Claude Code plugin"

The command merges two keys into .claude/settings.json and keeps every other key. The marketplace is pinned to the release tag of the kya you ran.

{
  "extraKnownMarketplaces": {
    "shield-kya": {
      "source": { "source": "github", "repo": "The-Pixel-Boys/shield-kya", "ref": "vX.Y.Z" }
    }
  },
  "enabledPlugins": { "kya-guard@shield-kya": true }
}

The command also prints one line for your README. It is a badge that reads “agent-guarded” and links to the public scoreboard:

[![agent-guarded](https://img.shields.io/badge/agent--guarded-KYA%20Guard-2ea44f)](https://shield-agent.com/replays)

The badge states that the repository asks its Claude Code contributors to run the guard. It does not state that every contributor does.

What contributors see

Contributors who use Codex, Cursor, Copilot CLI or Gemini CLI install the variant for their host. See plugins/kya-guard/HOSTS.md. kya team init --guard configures Claude Code only.

How to remove it

Reviewer sheet for the plugin: plugins/kya-guard/SECURITY.md. To roll out the full kya plugin instead, see team-rollout.md.