Who it is forA developer or agent operator who wants to check AI-written changes on their own machine before opening a pull request.
The problemWaiting for CI to report a leftover TODO or a hardcoded key wastes time and a push cycle.
The outcomeThe same TODO, secret and commit checks run locally on the diff, so problems are fixed before the branch is pushed.
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
- Write the change to a patch file with
git diff main > /tmp/patch.diff. (inferred, check the README) - Run
npx --yes codex-guard --diff /tmp/patch.diff. (inferred, check the README) - Read each finding and its file and line.
- Fix the flagged lines, regenerate the patch, and run the command again.
Prompt for your agent
In the repository at <repo-path>, create /tmp/patch.diff from the diff against main and run `npx --yes codex-guard --diff /tmp/patch.diff`. Expected output: a list of TODO, secret and commit findings, or a clean result. Verify that no finding points to a file you did not change.
Caveat. The README example is a diff file path, so the patch must come from a diff of the same changes you want checked.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for Akimiya-z/codex-guard and "Preview gate findings on a local diff before pushing"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer