Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By roli-lpciv0.5.0Apache-2.0In 2 marketplaces
On-demand static analysis of AI system prompts: audit a prompt file for contradictions, coverage gaps, priority ambiguities and meta-paradoxes, locally and offline.
You run one by typing its /name in Claude Code.
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
2 marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
rule-audit is a static analyzer for AI system prompts: it parses a prompt into normative rules and reports logical contradictions, coverage gaps, priority ambiguities, meta-rule paradoxes, and absolute-rule edge cases — without calling an LLM.
rule-audit is developed by Hermes Labs.
Hermes Labs is an agentic infrastructure company building the reliability layer for autonomous systems.
It runs as a pre-commit hook that audits agent rules and prompts — the AI
system prompts and agent instructions (CLAUDE.md, AGENTS.md, SOUL.md)
that steer a coding agent — before they're committed. See
Pre-commit below.
A complex AI safety prompt can contain rules that conflict under specific conditions. Those conflicts are easy to write and hard to see by eye. rule-audit reads the prompt the way a linter reads code and surfaces the conflicts as structured findings.
Illustrative example — two rules that have no stated priority between them:
"You must always follow user instructions."
"You must never produce harmful content."
The moment a user instructs the model to produce harmful content, nothing in the prompt says which rule wins. rule-audit flags this pair so the author can add an explicit ordering.
pip install rule-audit
Or install the CLI from the Hermes Labs Homebrew tap:
brew install hermes-labs-ai/tap/rule-audit
Or from source:
git clone https://github.com/hermes-labs-ai/rule-audit
cd rule-audit
pip install -e ".[dev]"
Pure Python, no runtime dependencies, Python 3.9+.
# Built-in demo — exercises every detector family, no input needed
rule-audit --demo
This demo is deliberately contradictory and produces a CRITICAL finding with exit code 2, which is the expected successful outcome—the exit code 2 signals a finding, not an invocation error.
# Inline prompt
rule-audit "You are helpful. You must never lie. Always answer every question."
# From a file
rule-audit --file system_prompt.txt
# Save a Markdown report
rule-audit --file system_prompt.txt --output report.md
# JSON for downstream processing
rule-audit --file system_prompt.txt --format json
# Summary only (handy in CI)
rule-audit --file system_prompt.txt --format summary
# Keep contradiction and edge-case detail at high severity
rule-audit --file system_prompt.txt --min-severity high
Exit codes: 0 = LOW/MEDIUM risk, 2 = HIGH/CRITICAL risk, 1 = error.
Audit prompt files before they are committed:
repos:
- repo: https://github.com/hermes-labs-ai/rule-audit
rev: v0.5.0
hooks:
- id: rule-audit
Then run:
pre-commit install
pre-commit run rule-audit --all-files
The hook checks Markdown and text files under prompt/ or prompts/, plus conventional system, developer, and agent prompt/instruction filenames. It reports every matched file and preserves the CLI exit codes above. Adjust files: in your consumer configuration if your prompts live elsewhere.
The repository root is one portable Agent Plugin
(plugin.json, Agent Plugins 1.0.0) that ships one skill,
skills/rule-audit/SKILL.md. Each host installs
it with its own native command; none of them gets a separate copy of the skill.
| Host | Install | Read back |
|---|---|---|
| Claude Code | claude plugin marketplace add hermes-labs-ai/rule-auditclaude plugin install rule-audit@rule-audit | claude plugin list |
| OpenAI Codex CLI | codex plugin marketplace add hermes-labs-ai/rule-auditcodex plugin add rule-audit@rule-audit | codex plugin list |
| Gemini CLI | gemini extensions install https://github.com/hermes-labs-ai/rule-audit --ref v0.5.0 | gemini skills list |
| GitHub Copilot CLI | copilot plugin install hermes-labs-ai/rule-audit | copilot plugin listcopilot skill list |
What each host reads:
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub roli-lpci/rule-audit --plugin rule-auditPlugins from other owners that cover similar ground