Agent Guard: Allow-All Claude Code Without Unasked Pushes

    1

    Two Claude Code hooks: the agent works freely inside its project, but pushes, PRs and cloud, database or publish commands wait for your approval.

    $9

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Agent Guard: Allow-All Claude Code Without Unasked Pushes

    Example session with this skill installed

    Install agent guard so Claude can work without prompts but never pushes or touches prod without me.

    • Read your context and instructions
    • Compiled the agent guard

    Added agent-guard to ~/.claude/settings.json (PreToolUse for Bash, Write, Edit, MultiEdit, NotebookEdit; PostToolUse for Bash). Tests: 7 passed. Start a new session to load the hooks.

    Later, in a session:

    git push origin feat/login
    agent-guard: this pushes or changes a pull request. Allow?
    kubectl apply -f deploy.yaml
    agent-guard: this command reaches past the project (cloud, cluster, database, publish or an HTTP write). Allow?
    git push --force
    Denied. agent-guard: never force-push. Merge the base branch in and push fast-forward.

    kubectl apply -f deploy.yaml

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Agent Guard lets you give Claude Code broad permissions and still keep control of the calls that leave your machine.

    What it does

    • Writes outside the project are denied. Symlinks are followed, so a link cannot carry a write out.
    • The agent cannot edit .claude/settings.json, so it cannot switch the guard off.
    • Force-pushes are denied.
    • git push and gh pr create/merge/... ask you first. After you approve 5 pushes in a repo, that repo pushes without asking.
    • Commands that reach past the project always ask: kubectl apply, terraform apply, helm install, gcloud, aws, psql, mysql, npm publish, docker push, curl -X POST, gh secret set, migrations and more.
    • Wrappers such as env X=1, sudo, sh -c "..." and command chains are unwrapped, so sh -c "git push" still asks.
    • If the guard itself fails, the call goes to your permission prompt. It never runs without a prompt.

    What you get One Node script with no dependencies, a 5-step install that the skill does for you, and 7 tests that you can run after the install.

    The core comes from the permission gate in my open-source project Agents of Empire (github.com/wagejs/agents-of-empire). This package makes it a standalone hook, adds the settings protection, and fixes a false force-push match on chained commands.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.

    The guard reads the command text. A script or Makefile target that runs git push or kubectl does not match, so it is a speed bump, not a wall. For a wall, also turn on Claude Code's sandbox. It does not check where Bash writes files; only the file tools (Write, Edit, MultiEdit, NotebookEdit) are confined. Push trust uses the session's working folder, so git -C other-repo push uses the current repo's count. Two sessions that push at the same moment can lose one count.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 4 days ago

    Software
    Claude CodeNode.js 18+Git

    Permissions

    File Scopes

    ~/.claude/settings.json
    or
    project
    /.claude/settings.json
    (one-time
    install
    shown
    to
    you
    first)
    ~/.claude/agent-guard/permits.json
    (push
    count
    for
    each
    repo)

    No network access. The hook runs git rev-parse to identify the repo.

    Listed4 days ago

    What's inside

    Frequently Asked Questions

    No. It matches command text, so a script that runs git push does not match. Use it with Claude Code's sandbox if you need a hard wall.

    Delete the repo's entry in ~/.claude/agent-guard/permits.json.

    Yes. Set AGENT_GUARD_TRUST_AFTER to a very large number.

    Add the folder to AGENT_GUARD_WRITABLE.

    New in Security