BardLaudian

Ghostrules — AI skill for Claude Code

AI community

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

[![CI](https://github.com/BardLaudian/ghostrules/actions/workflows/ci.yml/badge.svg)](https://github.com/BardLaudian/ghostrules/actions/workflows/ci.yml) [![PyPI](https://img.shields.io/pypi/v/ghostrules.svg)](https://pypi.org/project/ghostrules/) [![Python versions](https://img.shields.io/pypi/pyversions/ghostrules.svg)](https://pypi.org/project/ghostrules/) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/BardLaudian/ghostrules/blob/main/LICENSE)

![A CLAUDE.md that looks clean imports a file that imports a file with a hidden instruction; ghostrules finds it and shows the chain](https://raw.githubusercontent.com/BardLaudian/ghostrules/main/demo/imports.gif)

`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