Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Immune Check — a Claude Code skill

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.

Why it exists

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.

What it catches

  • Secrets / keys / tokens — API keys, private keys, .env contents, 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 materialnode_modules, build artifacts, large binaries.

Stack-agnostic

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:

Argusgitleakstrufflehogdetect-secretsgit-secretsbuilt-in ripgrep pass over the diff.

It reports which scanner ran, so you know the depth of coverage.

Install

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

Claude Code

# Global (all projects)
mkdir -p ~/.claude/skills/immune-check
cp SKILL.md ~/.claude/skills/immune-check/

# Or per-project: .claude/skills/immune-check/SKILL.md

Invoke with /immune-check, or just say "is this safe to push?" / "scan before publish."

Codex

# 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

Cursor

# Global (all projects)
mkdir -p ~/.cursor/commands
cp cursor/immune-check.md ~/.cursor/commands/

# Or per-project: .cursor/commands/immune-check.md

Type / in Cursor's chat and pick immune-check.

The reflex

See SKILL.md for the full process. In short:

  1. Define the boundary — what's leaving, and to where (the destination sets the stakes).
  2. Recognize antigens — run the detected scanner over exactly what crosses.
  3. Triage — pathogen (block), allergen (ask the human), self (pass and record).
  4. Quarantine / remediate — stop, redact, scrub history, and rotate live secrets.
  5. Immune memory — allowlist false positives, add missed patterns, record the incident.
  6. Clear or block — CLEAR ✅ / BLOCKED 🛑 / HOLD ⏸️.

Principles

  • 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.

License

MIT

About

Immune Check — a pre-flight reflex that scans any outbound artifact for secrets/PII before it leaves the body. Stack-agnostic. The defense organ alongside octopus + rem-sleep.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors