Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By dzianisvv0.8.0MITIn 1 marketplace
Checks each finished agent turn against your ~/.agents/AGENTS.md and sends rule violations back so the agent fixes them. Runs on every stop and can block Bash commands that would break a rule; needs bun and the opencode CLI.
Trending plugins
7-day copy clicks
Run automatically on Claude Code events. Claude doesn't decide.
1 caution to review before installing
A hook runs when Claude uses the Bash tool
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Plugin for opencode and Claude Code. When the agent stops, a cheap model reads the conversation
and the AGENTS.md files that apply (~/.agents/AGENTS.md, then the project's AGENTS.md and .agents/AGENTS.md, each labelled with its path; SUPERVISOR_RULES overrides all of them), then lists the rules the agent broke, with quotes. The findings are
delivered immediately: in Claude Code the Stop hook blocks with them, so the agent fixes them in the
same turn, within a 90 second wait (SUPERVISOR_INLINE_TIMEOUT); if the judge is slower than that,
the audit finishes in the background and the note falls back to your next message. In opencode the
plugin prompts the session with a <system-reminder> as soon as the audit returns. Every note starts
with [agents-md-guard], and only a note that lists at least one violation is ever injected: an audit
error waits for the next prompt instead. Every time findings are delivered you also
get a desktop notification ("N rule violation(s): rule; rule"), on both runtimes, never deduplicated;
opencode v1 adds a toast. AGENTS_NOTIFY=0 turns it off. Only the newest turn (the last user message
and the agent work after it) is judged, and each violation rule is delivered at most once per session,
so an old finding can never be re-flagged; the shared ceiling in packages/shared/src/inject-limit.ts
is a backstop. The rules behind this are in AGENTS.md, "Plugin loop safety".
Design and limits: DESIGN.md.
A failed audit (judge exits non-zero, times out, or returns no verdict) raises a desktop notification
and, in opencode, an error toast, through packages/shared/notify. In Claude Code the next prompt also
carries an agents-md-guard ERROR: note. AGENTS_NOTIFY=0 turns the notification off.
Before a shell command that matches the list in ~/.agents/plugins/agents-md-guard/commands, a judge
checks it against the same AGENTS.md rules and blocks it with a deny reason when running it would
clearly break one. One plain substring per line, not a regex; the file is created with these defaults:
git commit, git push, git rebase, git merge, git tag, git reset, git revert, git cherry-pick
gh pr create|comment|review|edit|merge|close|reopen|ready
gh issue create|comment|edit|close|reopen
gh release create|edit|delete
kubectl apply|create|replace|patch|edit|delete|scale|rollout|set|exec|drain|cordon|uncordon|taint
A missing file is created from the defaults; an empty file means no command is checked; a # line is
a comment. AGENTS_MD_GUARD_HOME moves the directory, AGENTS_MD_GUARD_COMMANDS=0 turns the check
off. It fails open: a timeout, a missing judge or an unreadable verdict lets the command run and sends
a notification. The check runs in tool.execute.before in opencode (both entries) and as a PreToolUse
Bash hook in Claude Code.
Claude Code (needs bun and the opencode CLI on PATH, the audit runs through it). After any change, bump version in .claude-plugin/plugin.json and run claude plugin update agents-md-guard@agents-plugins:
claude plugin marketplace add dzianisv/opencode-plugins
claude plugin install agents-md-guard@opencode-plugins
opencode: add this directory to plugins in ~/.config/opencode/opencode.json, then restart opencode. Logs show the plugin as agents-md-guard.
/absolute/path/to/opencode-plugins/packages/agents-md-guard
opencode 2.x (2.0.29 and the desktop app's 2.2.5) loads server.ts through package.json main; opencode 1.x needs the file entry src/opencode/plugin.ts. v2 rejects config entries that point at a file (configured plugin path must be a directory), so the old .../opencode/plugin.ts entry no longer works there.
All logic lives in one TypeScript core, src/core/, that both runtimes call. Claude Code hooks are thin entrypoints in src/claude/ (wired by hooks/hooks.json with bun); the opencode v1 plugin is src/opencode/plugin.ts and the v2 entry is server.ts.
v2 differences from v1:
ctx.generate.text call (system prompt + transcript in one prompt). No audit child sessions, no judge agent, no toast — v2 has no server-side toast API, so a FAIL verdict raises the desktop notification only.session.execution.succeeded/failed/interrupted (v2.0.29 does not emit session.idle). The plugin runs in the server process, so headless opencode run sessions served by it are audited too; SUPERVISOR_AUDIT_RUN is v1-only.context session hook on the last user message of the turn, re-attached on every step of that turn. A plugin instance only audits sessions from its own project directory.Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub dzianisv/agents-plugins --plugin agents-md-guardPlugins from other owners that cover similar ground