Skip to Content
AI Agents

AI Agents

Use xgrep as a security-scanning and code-intelligence backend for AI agents.

xgrep is designed to be a static-analysis and code-intelligence backend for AI agents: Semgrep-compatible scanning with taint analysis, code navigation via xgrep inspect, and a queryable code graph — all with --json output.

  • Agent guide — the canonical, root-level AGENTS.md: orient → locate → navigate → assess with inspect, scan for findings, trace dataflow with the graph, a triage workflow with investigation patterns by vulnerability type, and how to respond when the guard blocks an action. Agent tools (Claude Code, Cursor, …) auto-discover this file at the repo root.
  • Skills — packaged Claude Code skills for inspecting code, creating rules, triaging findings, and secure coding.
  • Guard hooks — run xgrep guard as a Claude Code or OpenAI Codex hook to block secrets and PII from leaving your machine through the agent, and to stop the agent from running a dangerous command (curl … | sh, a reverse shell, rm -rf, exfiltration), including one hidden in a script it runs.
  • Guard daemon — keep the guard's rules warm in a per-user service that hooks use automatically, and lint bash/PowerShell scripts over an RPC API.
  • Guard mod — a Claude Code mod that scans risky tool calls locally with xgrep and shows the findings in a review pane with Proceed and Cancel, installed from a marketplace as one unit.

Related: Code intelligence and the MCP server.

Last updated on