abhi12337

Rules File Audit — Security skill for Claude Code

Security community

Static audit of AI coding-assistant rules files (.cursorrules, CLAUDE.md, AGENTS.md, copilot-instructions.md) and agent permission configs: hidden Unicode, hidden instructions, exfiltration, auto-appr.

How to install Rules File Audit

This entry records only its repository, not the path inside it, so there is no exact command to give. Open abhi12337/rules-file-audit and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Rules File Audit does

Static audit of AI coding-assistant rules files (.cursorrules, CLAUDE.md, AGENTS.md, copilot-instructions.md) and agent permission configs: hidden Unicode, hidden instructions, exfiltration, auto-approve settings.

Alternatives in Security

  • Token Scan — Meme coin and token security scan — checks for rug pull vectors (hidden mint, honeypot, fee manipulation, LP l 3.8k ★
  • Trail Of Bits Claude-code-config — Opinionated production defaults from a top security firm: sandboxing, permissions, hooks, skills, MCP server c 1.6k ★
  • Agentseal — Security toolkit for AI agents 344 ★

README

rules-file-audit

A static audit of the files that tell AI coding assistants what to do. Rules files are code that nobody reviews like code: an agent follows `.cursorrules`, `CLAUDE.md` or `copilot-instructions.md` on every task, with your permissions, and a malicious pull request, template or "awesome rules" pack can hide instructions in them that a reviewer never sees. rules-file-audit finds:

  1. Invisible and deceptive Unicode: Unicode tag characters (the "rules file backdoor"), with the hidden text decoded and shown; stacked variation selectors that smuggle bytes; bidi overrides ("Trojan Source"); zero-width characters that split words or carry a payload.
  2. Hidden content: instructions in HTML comments, [//]: # comments and display:none / font-size:0 markup, text pushed off-screen by long whitespace runs, and base64 / hex blobs that decode to URLs, commands or instructions.
  3. Dangerous instructions: download-and-run (curl ... | sh), sending env vars, keys or code to a URL, reading ~/.ssh / .env / cloud credentials, and concealment ("do not tell the user", "silently add").
  4. Instructions that switch off safety: skip tests, --no-verify, disable lint / security checks, turn off TLS verification, change the package registry, add postinstall scripts.
  5. Agent permission configs that auto-approve dangerous actions: Claude Code bypassPermissions, Bash / Bash(curl:*) / Bash(rm:*) allow rules, enableAllProjectMcpServers, ANTHROPIC_BASE_URL redirects and hook commands; VS Code chat.tools.autoApprove and terminal auto-approve rules; Codex approval_policy = "never".
  6. Provenance: rules files not tracked by git, and rules that tell the agent to fetch more rules from a URL.

Every finding has a rule id, a severity, `file:line`, the offending text with every invisible character written out as `` (it never echoes a raw invisible character to your terminal), why it matters,