Ghostrules — AI skill for Claude Code
Know exactly what your AI agent reads.
How to install Ghostrules
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open BardLaudian/ghostrules and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Ghostrules does
Know exactly what your AI agent reads. Scans AGENTS.md, CLAUDE.md, .cursorrules, skills and MCP configs, follows @imports, and finds hidden Unicode, prompt injection and risky settings. CLI, GitHub Action (SARIF) and pre-commit.
Alternatives in AI
- Iai Personal Memory Engine — A cyber brain for your AI 866 ★
- Kibitz — Real-time decoded feed of AI agent actions — monitor multiple Claude Code & Codex sessions, see exactly what e 521 ★
- Hol Guard — Open-source antivirus for AI agents: block risky tools, secret access, prompt injection, malicious packages, M 485 ★
README
ghostrules
*Know exactly what your AI agent reads — and approve every change to it.*
[](https://github.com/BardLaudian/ghostrules/actions/workflows/ci.yml) [](https://pypi.org/project/ghostrules/) [](https://pypi.org/project/ghostrules/) [](https://github.com/BardLaudian/ghostrules/blob/main/LICENSE)

`ghostrules` finds the instructions your AI agent sees but you don't. It scans a repository (and, if you ask, your machine) for **hidden instructions and risky configuration in the files AI coding agents read and obey**: `AGENTS.md`, `CLAUDE.md`, `.cursorrules`, Copilot instructions, skills, MCP configs and more. It models how each agent loads those files (imports, rules that apply to some paths, what it strips), so it scans what the agent really reads, and it can pin that and show every change to it. It runs as a CLI, a GitHub Action (with SARIF for the Security tab) and a pre-commit hook.
It is a defensive tool. It only **reads** files and reports findings: it never executes anything it finds, never makes network requests and never phones home. Secrets it finds are always printed masked (`ghp_****…a1b2`).
Works with the files of Claude Code, Cursor, GitHub Copilot, Windsurf, Cline and Roo Code, Gemini CLI, Codex CLI, JetBrains Junie, Kiro, Continue and Aider. Tested on Linux, macOS and Windows with Python 3.10 to 3.13.
Why
AI coding agents load instruction files from your repository and follow them. Anyone who can get a file into the repo (a pull request, a dependency, a temp
Related Skills
Unicode Smuggling Guard
Detects invisible Unicode hidden in code, docs and AI agent files (CLAUDE.md, SKILL.md, MCP tool descriptions)
Invisible Text Forensics
Agent Skill that finds and removes invisible Unicode in text: zero-width characters, AI watermarks, bidi overr
Prompt Injection Scanner
A zero-dependency Python CLI that scans READMEs, SKILL files, and source code for prompt-injection patterns ta
AI Outreach Agent
Agent that runs my post-application outreach: finds the hiring manager and recruiter, writes the email or Link
Claude Auto API
Claude Code settings.json auto-config tool to quickly switch API_KEY, AUTH_TOKEN, and model configs across mul
Gitspawn Scan
Scan a folder before your AI coding agent opens it. Finds the git config, hooks and agent settings that execut
Related Agents
Gitnexus Security Boundary Reviewer
GitNexus security and trust-boundary reviewer. Use for auth, permissions, secrets, injection, unsafe parsing,
Frontend Analyzer
Analyzes and auto-fixes frontend code including TypeScript errors, unused imports, deprecated syntax, build co
Architecture Red Team
adversarial reviewer for plans and architecture changes. challenge assumptions, expose hidden coupling, scalin