DEDUPED Hot AI repos, turned into use cases Get the Monday 5

How to set a per-repo gate policy agents cannot loosen with Codex Guard

Put the policy in .github/codex-guard.yml on the default branch to set blocking rules.

Who it is forA repository owner who wants to choose which findings block merges and does not want agents to change that in their own PRs.

The problemDifferent repos need different tolerance for TODOs and secret patterns, and per-PR changes should not weaken the rules.

The outcomeA policy file on the default branch sets the preset, blocking checks, labels and comment behavior for every matching PR.

What you need first

  • A GitHub repository with Actions enabled and permission to add a workflow file
  • Node.js with npx available on your machine
  • A Git working copy of the repository (the init command runs from its root)
  • Permission to change branch protection settings if you want the check to block merges

Steps

  1. Copy examples/codex-guard.yml from the Codex Guard repository into .github/codex-guard.yml.
  2. Set preset: balanced and list your agent-labels and secret-exclude-paths.
  3. Commit the file to the default branch.
  4. Run npx --yes codex-guard doctor to check the policy file.

Prompt for your agent

In the repository at <repo-path>, create .github/codex-guard.yml with `preset: balanced` and `comment-mode: replace`, then run `npx --yes codex-guard doctor`. Expected output: the policy file is accepted with no errors. Verify that the file is on the default branch and not only in a feature branch.

Caveat. The policy file only counts when it is on the default branch, so changes made inside an agent PR do not apply to that PR.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for Akimiya-z/codex-guard and "Set a per-repo gate policy agents cannot loosen"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer