guardrails

guardrails is a plugin for Claude Code from melodic-software/claude-code-plugins. Its token cost is not measured, scanned C, original, MIT.

A set of safety checks that blocks risky actions such as writing secrets, bypassing Git hooks, force-pushing, discarding a worktree, or using unsafe file-writing workarounds. Git is the version-control system used to track code changes.

In plain words
What is it for?
It is for protecting coding-agent workflows from unsafe Git operations, secret writes, path mistakes, and selected command or process errors.
Why use it?
It prevents common commands and edits from accidentally exposing credentials, destroying work, or bypassing project safeguards.

Plugin for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: reads .claude/ paths; mentions subagents; names the NotebookEdit tool.

Good fit It is for protecting coding-agent workflows from unsafe Git operations, secret writes, path mistakes, and selected command or process errors.

Compare 6 plugins from other repositories ↓
Install in Claude Code
/plugin marketplace add melodic-software/claude-code-plugins
/plugin install guardrails
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/melodic-software/claude-code-plugins

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for guardrails

README.md
[![agentmods](https://agentmods.dev/badge/plugins/melodic-software/claude-code-plugins/guardrails/github.svg)](https://agentmods.dev/plugins/melodic-software/claude-code-plugins/guardrails)
Your own site
<a href="https://agentmods.dev/plugins/melodic-software/claude-code-plugins/guardrails"><img src="https://agentmods.dev/badge/plugins/melodic-software/claude-code-plugins/guardrails/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for guardrails

Your own site · 80×15
<a href="https://agentmods.dev/plugins/melodic-software/claude-code-plugins/guardrails"><img src="https://agentmods.dev/badge/plugins/melodic-software/claude-code-plugins/guardrails.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session not measured What this adds to a session before it is invoked.
When invoked not measured Not applicable: nothing here is loaded into a session.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Security

Grade C, and why

guardrails scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reaches for credential fileshighPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

"description": "Blocks a command whose output is a credential: git credential fill, gh auth token, a token-shaped variable echoed, and an interpreter (python -c, node -e) reading .env, .netrc, ~/.ssh/id_* or ~/.aws/crede

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

"description": "Blocks an agent from posting the PR-fix lane fix request (a line starting \"PR-fix lane: please fix this finding\") to GitHub through gh, curl or a GitHub MCP write tool. Only the owner posts it, in the G
plugins/guardrails/.claude-plugin/plugin.json · 263 lines

How it starts

The opening of the file, as written. The whole thing — 263 lines — stays where its author put it; the contents beside it link to each section on GitHub.

{
  "name": "guardrails",
  "description": "24 toggleable guards. Blocks: secrets, machine paths, hook bypass, force-push, reset --hard, open-review merges, cross-domain paths, PR-fix requests, PR body format, drive-root /tmp, MSYS_NO_PATHCONV, cd && git, foreground waits, PR polls, unsafe rm -r, expanding commit -m, off-convention titles, loopback Artifacts; opt-in, credential reads, main-checkout edits. Asks: settings writes. Warns: Workflow fan-out, bare gh pr create. Git hooks: commits, secrets, paths, CLI flags, skill and path refs.",
  "author": {
    "name": "Melodic Software",
    "email": "[email protected]"
  },
  "license": "MIT",
  "keywords": [
    "guard",
    "security",
    "secrets",
    "hooks",
    "pretooluse",
    "git",
    "hardcoded-paths",
    "cli-flags",
    "pull-request",
    "hook"
  ],
  "metadata": {
    "category": "security"
  },
  "userConfig": {
    "secret_pattern_detection_enabled": {
      "type": "boolean",
      "title": "Secret-pattern-detection guard",
      "description": "Blocks writes containing high-confidence secret or credential patterns. On by default.",
      "default": true
    },
    "secret_pattern_detection_allowed_roots": {
      "type": "string",
      "title": "Secret-pattern-detection allowed roots",
      "description": "Comma-separated absolute directories; a Write, Edit or NotebookEdit whose real path is strictly under one is not scanned for secrets. Empty by default. A commit is still checked only in clones where /guardrails:setup apply install-git-hooks ran. Limits: README Option details.",
      "default": ""
    },
    "secret_pattern_detection_skip_gitignored": {
      "type": "boolean",
      "title": "Secret-pattern-detection skips gitignored files",
      "description": "When true, a Write, Edit or NotebookEdit to a file its own repository ignores is not scanned for secrets. Off by default. A commit is still checked only in clones where /guardrails:setup apply install-git-hooks ran. Limits:

Read the full file on GitHub · 263 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed a373bd4622a3
  2. yesterday Changed 94d8801b618f
  3. 2d ago Changed f4ecfa2e27e9
  4. 3d ago Changed 79e6676dfbf0
  5. 4d ago Changed · +6 lines adc9bd1e25b6
  6. 5d ago Changed · +6 lines 5e780e0c6208
  7. 6d ago Changed ad5e6336b802
  8. 7d ago Changed 6bf91539531a
  9. 8d ago Changed be35ad3c456d
  10. 9d ago First seen · 251 lines scan C a7da115bec67

Subscribe to this mod's changes

guardrails is a plugin published in the GitHub repository melodic-software/claude-code-plugins (33 stars, last pushed today), licensed MIT. Its token cost is not measured: this kind of file is read by the harness, not the model. A static security scan graded it C with 2 findings (reaches for credential files, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

guardrails compared with plugins from other repositories

guardrails next to 6 plugins from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
guardrailsmelodic-software/claude-code-pluginsPlugin33todayMITC—Claude Code
parallel-workflowsjimmc414/claude-code-plugin-marketplacePlugin4yesterdayMITA—Claude Code
humanizerblader/humanizerPlugin75k11d agoMITA—Claude Code
claude-plugins-official marketplaceanthropics/claude-plugins-officialPlugin49kyesterdayApache-2.0A—Claude Code
nextjsvercel/next.jsPlugin144ktodayMITA—Claude Code
themes-examplegoogle-gemini/gemini-cliPlugin109ktodayApache-2.0A—Gemini CLI
android-skillsandroid/skillsPlugin11k7d agoApache-2.0A—Claude Code