Codex Guard CLI

Codex Guard checks AI-agent pull requests for TODOs, leaked keys, sloppy commits and red CI before they merge into main

  • 132 ★ on the repository
  • Last commit
CLI

Extended access

Why this level

  • The action reads PR diffs, statuses and comments and can block merging, so a false positive stops the team's work
All reasons and checks

akimiya-z/codex-guard

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/codex-guard

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The action reads PR diffs, statuses and comments and can block merging, so a false positive stops the team's work

This is third-party code. Review the repository files before installing.

What it does

A GitHub Action that runs on `pull_request`, decides from a label, branch prefix or title that an agent wrote the PR and checks four things. The leftovers scan looks for `TODO`, `FIXME`, `XXX`, `HACK` and `WIP` on added lines only. The secret scan looks for AWS, GitHub, Google, OpenAI, Anthropic, Slack, Stripe, npm, SendGrid and Telegram keys, JWTs and connection strings, with values redacted in reports. Commit hygiene checks conventional-commit subjects and the CI check catches failing statuses on the head commit. Each finding lands as a check-run annotation on the exact file line, with a summary comment on the PR. The `npx --yes codex-guard init` installer starts in observe mode with no blocking, and the `balanced` and `strict` presets turn blocking on. `codex-guard doctor` checks the setup read-only.

Who it is for. Teams whose repositories accept pull requests from Codex, Claude Code and Copilot and want to take the obvious checks off the reviewer.

Good fit when

  • An agent left a `// TODO` and keys from a chat transcript in a PR and the reviewer caught it by hand
  • You want to block the merge when CI or a status failed on the head commit
  • Commit messages like `WIP` and `fix stuff` should be filtered against conventional commits
  • You want to start gently: observe mode first with no blocking and the `balanced` preset later

Not a fit when

  • The repository is not on GitHub: the project runs as a GitHub Action
  • You need a semantic code review: the checks are deterministic and look for patterns
  • You need every PR checked: by default only agent-looking PRs are checked

Example request

Add Codex Guard to this repository in observe mode and show what it would have flagged in the last three agent PRs

Limitations

  • It works as a GitHub Action and needs `statuses: read` in the workflow `permissions` block or the status check will not run.
  • A PR counts as agent-written by the label `codex-generated`, `agentic` or `ai-generated`, by branch prefix or by title, and others are skipped. The `codex-guard-ignore` label disables the check.
  • GitHub sometimes omits the text patch of binary and very large files, and the report marks such files as not scanned and never counts them as clean. The PR files API limit is 3,000.
  • Checks are deterministic and do not judge what the code means.
  • The repository's last commit is dated September 2026.

How to disable. Delete the workflow file with `Akimiya-z/codex-guard@v1` from `.github/workflows/` and the policy configuration. The `codex-guard` installer installs nothing globally.

FAQ

How do I add Codex Guard?

Run `npx --yes codex-guard init`: the installer creates a workflow on `Akimiya-z/codex-guard@v1`. It starts in observe mode, and `--preset balanced` or `--preset strict` turns blocking on.

How does Codex Guard know a PR is from an agent?

By label, branch prefix or title. Default labels are `codex-generated`, `agentic` and `ai-generated`, and the list is set by the `agent-labels` parameter.

How do I skip the check for one PR?

Add the `codex-guard-ignore` label to the PR; the label name changes through the `ignore-label` parameter.

What does the secret scan cover?

AWS, GitHub, Google, OpenAI, Anthropic, Slack, Stripe, npm, SendGrid and Telegram keys, JWTs, Azure connection strings and hardcoded credentials. Values are redacted in reports.

How do I verify the setup?

Run `npx --yes codex-guard doctor`, or `npx --yes codex-guard doctor --json` for machine-readable output. It is read-only and exits 1 on a configuration error.

Discussion

No questions or reviews yet.

CLI tools

A CLI that checks npm, Python and Rust packages against the real archive before release and writes Codex a bounded task.

CLIMinimal access105Repository stars

A GitHub CLI wrapper for agents: compact TOON output, next-step hints and structured errors for issues, PRs, CI and releases

CLIBroad access364Repository stars

A skill that splits changes into logical Conventional Commits and safely handles branches, pushes and pull requests.

SkillExtended access106Repository stars

A gh extension for agentic workflows: describe a task in Markdown and run it with an agent in GitHub Actions

CLIBroad access5.6KRepository stars
Official

Diffinery plugins connect Claude Code and Codex to self-hosted Git, pull requests and CI on Cloudflare through an MCP server

PluginBroad access81Repository stars

A Zig utility for switching Codex accounts: importing an auth file, listing, switching, for the CLI, VS Code and the app

CLIBroad access2.9KRepository stars

README in short

The README explains how agent PRs differ from usual ones and lists the four checks in a table. Install through `npx`, presets, action parameters, labels and an example real report on the repository itself follow.

README badge

Report a problem