I build a scanner for the files AI coding agents read. This week I finally ran it on my own repo. It found one error. It was my API key.

What happened

audit-rules reads the files your AI coding agent obeys: CLAUDE.md, AGENTS.md, GEMINI.md, .cursorrules, SKILL.md, Copilot instructions, Roo Code, Kiro and Junie rules, .mcp.json and .claude/settings.json. It looks for things that should not be in there.

On our monorepo it scanned 147 agent files and reported 1 error and 15 warnings.

The error: a live API key in .vscode/mcp.json, line 11. It sits there so the editor can talk to our MCP server.

The good news: that file is in .gitignore and was never committed. git log --all shows zero entries for it.

The bad news: this is exactly the file people copy into a gist, a README or an issue when someone asks "what does your MCP config look like?". Nothing stopped me from doing that, except now this.

What it checks

Try it without your own files first:

npx @cachly-dev/audit-rules --demo 

The demo scans 4 synthetic files with dummy payloads and reports 12 errors and 3 warnings:

Real output of npx @cachly-dev/audit-rules --demo: 12 errors and 3 warnings on 4 synthetic files with dummy payloads

Some of them in plain words:

  • permissions.allow contains Bash(*): every shell command runs without asking.
  • enableAllProjectMcpServers is true: every server in .mcp.json starts without asking.
  • An MCP server with a literal token in its env block.
  • A hidden HTML comment in CLAUDE.md that tells the agent what to do. You do not see it in a Markdown preview. The agent does.
  • Zero-width characters, curl | sh, and an image URL that can send data to another host when rendered.
  • npx some-mcp-server without an exact version, so every start runs the newest release.

Then run it in your repo:

npx @cachly-dev/audit-rules 

It runs locally, makes 0 network calls and has 0 dependencies. Apache-2.0. There is also a GitHub Action with SARIF output for code scanning. Source: cachly-dev/agent-rules-audit.

Where it was wrong

Of the 15 warnings on our repo, 9 came from git worktrees inside the repo folder. Same files, counted again.

Of the 6 that were left, 4 were false. They flagged file references that do not exist. They do exist, just not relative to the repo root. One line in our CLAUDE.md says cd sdk/mcp and then names a script in that folder. Another file describes paths inside a user's Obsidian vault.

So the next two fixes are clear: skip nested worktrees, and resolve a path relative to the folder the text is talking about. The 2 true warnings stay: an MCP server that always starts @latest, and a CLAUDE.md with 218 lines.

What is the strangest thing you have found in a teammate's agent config? A key, a forgotten instruction, a rule nobody remembers writing?

I build cachly. It keeps what you explain to your AI: your rules, your decisions and the bugs you already solved. Claude Code, Cursor, Copilot and the others read it in every session, for you alone or for your whole team, and every lesson carries the name of whoever learned it.

Try it, in increasing order of commitment:

  • 30 seconds, no account: npx @cachly-dev/mcp-server@latest demo in any git repo. It reads your log locally and prints what an assistant would already know about the project. After npx fetches the package, the command makes no network calls.
  • Claude Code plugin: /plugin marketplace add cachly-dev/cachly-mcp, then /plugin install cachly-brain@cachly.
  • 5 minutes, free tier: npx @cachly-dev/mcp-server@latest autopilot writes the MCP configuration for whichever assistant you use.
  • Or from the web: cachly.dev · free tier, servers in Germany.

On Product Hunt since 1 December: cachly on Product Hunt.