A Claude Code skill that acts as a boundary defense for an AI agent: before any artifact crosses out of the body — into a public repo, an external service, a release, someone else's inbox — it scans for foreign or dangerous material, so an infection never spreads in the first place.
It's the immune organ of an agent's nervous system, alongside octopus investigation (perception, outward) and rem-sleep (memory, inward). It distinguishes self (safe to expose) from non-self (must not cross the membrane), responds proportionally, and remembers every antigen so the next scan is faster.
Public is forever — even after deletion, leaked material is cached, indexed, and cloned. The scar behind this skill is a real one: medical data committed to a public repo. The lesson: scan before the membrane, not after. It is far cheaper to never leak than to scrub a leak.
- Secrets / keys / tokens — API keys, private keys,
.envcontents, cloud credentials, connection strings. - Credentials — hardcoded passwords, basic-auth URLs, session cookies.
- PII / PHI — real names, emails, phones, addresses, medical/health records, IDs.
- Private identity / paths — internal hostnames, home paths leaking a username, internal URLs, customer IDs.
- Oversized / vendored material —
node_modules, build artifacts, large binaries.
The scan adapts to whatever you have, using the first available and falling back to a built-in pattern pass — so there's never an excuse to skip the check:
Argus → gitleaks → trufflehog → detect-secrets → git-secrets → built-in ripgrep pass over the diff.
It reports which scanner ran, so you know the depth of coverage.
Works with Claude Code, Codex, and Cursor. Clone the repo once, then install for your tool(s):
git clone https://github.com/thdelmas/immune-check.git
cd immune-check# Global (all projects)
mkdir -p ~/.claude/skills/immune-check
cp SKILL.md ~/.claude/skills/immune-check/
# Or per-project: .claude/skills/immune-check/SKILL.mdInvoke with /immune-check, or just say "is this safe to push?" / "scan before publish."
# User scope (all repos)
mkdir -p ~/.agents/skills/immune-check
cp SKILL.md ~/.agents/skills/immune-check/
# Or per-repo: .agents/skills/immune-check/SKILL.md# Global (all projects)
mkdir -p ~/.cursor/commands
cp cursor/immune-check.md ~/.cursor/commands/
# Or per-project: .cursor/commands/immune-check.mdType / in Cursor's chat and pick immune-check.
See SKILL.md for the full process. In short:
- Define the boundary — what's leaving, and to where (the destination sets the stakes).
- Recognize antigens — run the detected scanner over exactly what crosses.
- Triage — pathogen (block), allergen (ask the human), self (pass and record).
- Quarantine / remediate — stop, redact, scrub history, and rotate live secrets.
- Immune memory — allowlist false positives, add missed patterns, record the incident.
- Clear or block — CLEAR ✅ / BLOCKED 🛑 / HOLD ⏸️.
- Scan before the membrane, not after — public is forever.
- Tune for the pathogen, not paranoia — blocking everything is autoimmune.
- Adaptive immunity — every real hit teaches the next scan.
- Rotate, don't just delete, live secrets — removal hides, rotation neutralizes.
MIT