Invariant Guard — Security agent for Claude Code
Read-only audit of a diff (a commit range, a branch against its base, or a list of files) for the invariants that the project depends on - data isolation, deny-by-default access, integer money, one un.
How to install Invariant Guard
Installs to ~/.claude/agents/tusharsrivastava-shark-skills-invariant-guard.md
mkdir -p ~/.claude/agents && curl -fsSL https://raw.githubusercontent.com/tusharsrivastava/shark-skills/HEAD/agents/invariant-guard.md -o ~/.claude/agents/tusharsrivastava-shark-skills-invariant-guard.md Restart Claude Code, or start a new session, for it to be picked up.
What Invariant Guard does
name: invariant-guard description: Read-only audit of a diff (a commit range, a branch against its base, or a list of files) for the invariants that the project depends on - data isolation, deny-by-default access, integer money, one unit of work for write + event + job, idempotency, side-effect-free reads, stable keys, pooler-safe SQL, expand/contract migrations, module boundaries, secrets, personal data, time zones, typed state, pinned contracts, concurrency and error handling. Uses the pro
Alternatives in Security
- Beads Warden — Guard the beads execution record: enforce the write-flush-verify discipline that defeats the bd rapid-write ra 2.7k ★
- Knowledge Base Loader — Phase KB0 intake agent that converts staged, untrusted application documentation into a cited, security-orient 125 ★
- Release Auditor — Pre-release audit for a single plugin in the monorepo — takes a plugin slug and cross-references plugin.json v 72 ★
Full documentation available on GitHub
View Source RepositoryRelated Agents
Askboard Security Reviewer
Read-only security and invariant reviewer for AskBoard OpenSpec changes. On a pinned worktree and commit range
Invariant Writer
Identifies protocol invariants from contract code and intent, generates Foundry invariant tests with handlers.
Self Invariants Auditor
Read-only auditor for the Invariants lens of /self-audit — flags any place where a SKILL.md, a skills/_lib/ fi
Invariant Auditor
Read-only audit of a FinResearch diff or PR against docs/dev/ENGINEERING_HANDOFF.md invariants and the CLAUDE.
Fnl Security Reviewer
Security review of a pull request or commit range: the changed code first, then every trust path that reaches
Security Hardening Reviewer
Audit code changes against the project's documented security invariants (read CLAUDE.md §Security for the auth
Related Skills
Invariant Audit
Review the current diff against ASCC's invariants, ADRs and threat model with the security-reviewer agent
Audit Invariants
Invokes the hetzner-mcp-invariants-auditor over the current diff. Outputs an invariant compliance table.
Sandbox Shell
macOS Seatbelt sandbox CLI for developers. Protect credentials (SSH, AWS, GPG) from malicious npm packages, su