cachly-dev

Agent Rules Audit — Security skill for Claude Code

Security community

Offline scanner for AI coding rule files (CLAUDE.md, AGENTS.md, .cursorrules, SKILL.md): finds leaked secrets and hidden prompt injection.

How to install Agent Rules Audit

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

What Agent Rules Audit does

Offline scanner for AI coding rule files (CLAUDE.md, AGENTS.md, .cursorrules, SKILL.md): finds leaked secrets and hidden prompt injection. No network calls. Apache-2.0.

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 ★
  • Anthropic Cybersecurity Skills — 734+ structured cybersecurity skills for AI agents · MITRE ATT&CK mapped · agentskills.io open standard · Work 3.8k ★
  • ThinkWatch — Self-hosted AI API and MCP gateway for organizations: SSO and RBAC, per-user identity for MCP tool calls, PII 817 ★

README

audit-rules

**Scan your AI rule files for leaked secrets and hidden prompt injection. Offline, no network calls.**

[![npm](https://img.shields.io/npm/v/@cachly-dev/audit-rules)](https://www.npmjs.com/package/@cachly-dev/audit-rules) [![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-yellow)](./LICENSE)

Checks `CLAUDE.md`, `AGENTS.md`, `.cursorrules`, `.cursor/rules/*.mdc`, `SKILL.md`, `.github/copilot-instructions.md`, `.windsurfrules` and `.clinerules`. Output: terminal summary, JSON, Markdown table for pull requests, or SARIF 2.1.0 for the GitHub Security tab. Made by [cachly](https://cachly.dev/?utm_source=github&utm_medium=repo&utm_campaign=agent-rules-audit).

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

AI coding agents load repo rule files straight into their system/developer prompt on every turn. One leaked token, one hidden HTML comment, or one invisible Unicode tag payload in a PR can silently hijack every teammate's assistant.

`audit-rules` scans your rule files locally. It has no runtime dependencies and makes no network calls. It prints a terminal summary, JSON, a Markdown table for pull requests, or SARIF 2.1.0 for the GitHub Security tab.


Quick Start

# Scan the current repository
npx @cachly-dev/audit-rules .

# Try the bundled synthetic vulnerable demo (safe dummy payloads only)
npx @cachly-dev/audit-rules --demo

# Strict mode (fail CI on warnings too)
npx @cachly-dev/audit-rules . --strict

# Generate SARIF 2.1.0 for GitHub Code Scanning
npx @cachly-dev/audit-rules . --sarif > audit-rules.sarif

Requires **Node.js 20+**. Zero external npm dependencies.


Example Output (`--demo`)

@cachly-dev/audit-rules v0.1.0 · scanned 2 rule files (0 network calls)

  ERROR  SEC-007  .cursorrules:6
         Possible hardcoded secret assignment detected (redacted: DUMM***...***77 (len 34)).
  ERROR  INJ-006  .cursorrules:9
         Unverified remote script piped directly