Guard Layer — AI skill for Claude Code
Runtime guardrails between an AI agent and its tools: scan what it reads, gate what it does, and track the session so a secret read earlier can't be exfiltrated later.
How to install Guard Layer
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open Lijithvmv/Guard-Layer and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Guard Layer does
Runtime guardrails between an AI agent and its tools: scan what it reads, gate what it does, and track the session so a secret read earlier can't be exfiltrated later. Containment over detection — pure Python, zero dependencies, ~0.2 ms per tool call.
Alternatives in AI
- Hol Guard — Open-source antivirus for AI agents: block risky tools, secret access, prompt injection, malicious packages, M 485 ★
- Prismor — Self-hosted runtime control plane for AI agents 334 ★
- Hazmat — Containment for AI agents - user isolation, sandboxed execution, network controls, backup/rollback 167 ★
README
GuardLayer
Stop an AI agent from doing harm after it reads something an attacker wrote.
GuardLayer sits between an agent and its tools. It checks what the agent **reads**, decides whether what it is about to **do** may run, needs a human, or is refused, and remembers what the session has already seen, so an action is judged in context. Pure Python, zero dependencies, about 0.2 ms per tool call in-process.
   
**Documentation: https://lijithvmv.github.io/Guard-Layer/**
Why this approach
Any text an agent reads (a web page, an email, an issue, a tool result) can carry instructions, and the model can't reliably tell them apart from yours. Detectors help, but on attacks they have never seen they catch a minority (our own held-out numbers are below). So GuardLayer does not bet on detection. It stops the **harm**:
- What the agent reads is scanned for injections, secrets and personal data, and the session remembers it: untrusted content, an injection, sensitive data.
- What the agent is about to do goes through a tool policy: destructive commands, credential files, exfiltration endpoints, and your own argument rules.
- The two meet in the session: a secret read earlier and now being sent out is blocked; any side effect after the agent read an injection needs a human; untrusted content plus sensitive data plus a network call needs a human. This works even when the injection itself was never detected.
- Every decision goes to a tamper-evident audit log.
Quickstart: Claude Code
# pilot.toml: record what would happen, enforce nothing
Related Skills
Agent Guard
Real-time secret-leak guardrails for AI coding agents (Claude Code, Codex), Git hooks, and CI.
Claude Code Secret Guard
Claude Code mod that keeps API keys, tokens and passwords out of the model's context: gitleaks scans every too
Moorai
On-device guardrails for AI coding agents. Hooks check prompts, file reads, shell commands, writes, web fetche
LLM Secret Manager
The secret manager for LLM agents: create, rotate, and use secrets they can never read. OS-native keyvault (ma
Lean Guard
A policy layer for AI coding agents, written and proved in Lean 4. Every Claude Code tool call is checked by a
Klarion
AI-powered secret scanner for code and git history. Finds leaked API keys, tokens and credentials with near-ze
Related Agents
Secret Guard
MUST be used whenever the user asks to scan for secrets, API keys, credentials, or tokens before a commit or i
ForensicAgent
Forensic security analyst — PII detection, secret scanning, identity leak auditing across git history, staged
Claudehut Reuse Scanner
Finds existing implementations to adopt or extend before any new code is written, and produces the reuse-scan