Skip to content
Security
Command

/verify

Run a deterministic one-shot secret scan over the repository's pending changes (staged content, unstaged worktree edits, and untracked files; gitignored paths excluded). Use for a quick "does the current state contain secrets?" check without going through hook triggers. It is a

From plugin
agent-guard
272 skills2 commands
Install
> /plugin marketplace add JeongJaeSoon/agent-guard
> /plugin install agent-guard@agent-guard

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/verify

Context preview

What this command does when you run it.

Run a deterministic one-shot secret scan over the repository's pending changes (staged content, unstaged worktree edits, and untracked files; gitignored paths excluded). Use for a quick "does the current state contain secrets?" check without going through hook triggers. It is a

Command definition

verify.md
allowed-tools: Bash
description: Run a deterministic one-shot secret scan over the repository's pending changes (staged content, unstaged worktree edits, and untracked files; gitignored paths excluded). Use for a quick "does the current state contain secrets?" check without going through hook triggers. It is a point-in-time check, not a gate, so it does not replace the pre-commit hook. For gitignored paths or a tree outside the repository, use `agent-guard scan-path <dir>` instead.

/agent-guard:verify

One-shot secret scan over everything the repository has pending: the worktree (`git diff HEAD`) and the index (`git diff --cached`), **both compared against `HEAD`**, plus untracked files. Backed by the bundled gitleaks rule set the agent-guard hooks already use.

The index is covered. Stage a secret and then restore the file on disk to its `HEAD` contents and the staged copy is still flagged, so the tracked input is a superset of what `agent-guard scan-staged` sees. Keeping `HEAD` as the base for both diffs is what makes that safe in the other direction too: stage the *removal* of a committed secret and then undo it on disk and nothing is reported, because relative to `HEAD` nothing was added. It remains a snapshot of the moment it ran, not a gate: the pre-commit hook runs `scan-staged` at commit time and is what actually blocks a commit.

What it does **not** cover:

  • **gitignored paths** — deliberately. Untracked input comes from `git ls-files --others --exclude-standard`, and flagging a local `.env` every run would bury the findings that do matter. "Is there a secret anywhere in this directory?" is a different question: answer it with `agent-guard scan-path <dir>`, which reads the filesystem directly and does cover gitignored paths and trees outside the repository.
  • **history** — only content that differs from `HEAD` is diffed. A secret already committed in `HEAD` or an earlier commit is not re-reported here.

Run

!`"${CLAUDE_PLUGIN_ROOT}/bin/agent-guard" scan-working-tree`

Interpretation

  • **Exit 0, no output beyond the gitleaks summary** → no secrets detected in what was scanned. Say that, not "the directory is clean" or "safe to commit" — gitignored paths and committed history were not covered, and the result goes stale with the next edit. Then stop.
  • **Non-zero exit with `agent-guard:` lines** → leaks were flagged. Report the exact file paths and rule names gitleaks emitted, verbatim. Do not propose fixes unless the user asks.
  • **`required command not found: gitleaks`** → suggest `agent-guard setup --install --gitleaks-checksum <SHA>` and stop.
  • **`gitleaks config not found`** → the plugin install is incomplete; suggest reinstalling or updating Agent Guard through the owning host plugin manager, then reload the host and stop. A standalone bootstrap install does not repair a plugin cache.

Stay terse: the scan output is the answer. Avoid restating what gitleaks already printed.

Read more
Ships withagent-guard

Agent Guard is a local-first guardrail for Claude Code, Codex, Git hooks, GitHub Actions, and direct shell use. It blocks common secret-exposure paths before a supported tool runs, redacts supported tool output, and scans changed files after mutations.

Get the whole plugin
Stats
27
Stars
0
Forks
Active
Maintenance
Shell
Language
MIT
License
1d ago
Last commit
4mo ago
Created

Repo: JeongJaeSoon/agent-guard

Other commands on agent-guard.