rule-analyzer

rule-analyzer is a skill for Codex from Eliyce/paqad-ai. It costs 14 tokens per session (1,349 once invoked), scanned A, original, MIT.

A rule-analysis step that turns written project rules into a reviewable map of automated checks. It labels each rule as machine-checkable, review-assisted, or not machine-checkable, and records existing enforcement.

In plain words
What is it for?
Use it after changing several rules or before generating scripts for rules in a new project.
Why use it?
It separates rules that scripts can enforce from rules that need judgment, while exposing contradictions before new checks are generated.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it after changing several rules or before generating scripts for rules in a new project.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/eliyce/paqad-ai/rule-analyzer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Eliyce/paqad-ai --skill rule-analyzer
Clone the repo
git clone --depth 1 https://github.com/Eliyce/paqad-ai

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rule-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/skills/eliyce/paqad-ai/rule-analyzer/github.svg)](https://agentmods.dev/skills/eliyce/paqad-ai/rule-analyzer)
Your own site
<a href="https://agentmods.dev/skills/eliyce/paqad-ai/rule-analyzer"><img src="https://agentmods.dev/badge/skills/eliyce/paqad-ai/rule-analyzer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rule-analyzer

Your own site · 80×15
<a href="https://agentmods.dev/skills/eliyce/paqad-ai/rule-analyzer"><img src="https://agentmods.dev/badge/skills/eliyce/paqad-ai/rule-analyzer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,349 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Prompt Injection · line 22
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00014 $0.01349
Opus 5 $0.00007 $0.00674
Sonnet 5 $0.00003 $0.00270
Haiku 4.5 $0.00001 $0.00135

Measured 12d ago against content hash b9f9cb44a8a8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

rule-analyzer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/analyze.mjs, scripts/record-conflicts.mjs, scripts/write-map.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

runtime/base/skills/rule-analyzer/SKILL.md · 86 lines

How it starts

The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.

What It Does

Turns prose rules into a reviewable contract. For every bullet under docs/instructions/rules/** it:

  • Embeds an opaque, stable <!-- @rule RL-<hash> --> marker (idempotent — reruns cause no churn).
  • Classifies verifiability:
    • deterministic — a script can decide pass/fail (e.g. "no debugger statements").
    • heuristic — a script can flag candidates; humans/LLM adjudicate (e.g. "business logic belongs in hooks").
    • unverifiable — with a reason (e.g. "coherence is judgment-dependent").
  • Records pre-existing enforcers in enforced_by so no duplicate script is generated.
  • Detects contradictory rules and surfaces them via the Decision Pause Contract before any script work.

It writes a draft docs/instructions/rules/rule-script-map.yml. The user reviews this map before generate rule scripts.

Use This When

  • A user prompt matches the priority-225 router rule analyze rules.
  • After adding or editing several rules and you need to re-classify the rule set.
  • Before generate rule scripts on a fresh project — generation reads this map.

Inputs

  • All markdown rule files under docs/instructions/rules/** (the .yml registries are not prose rules and are skipped).
  • The project's existing enforcers, read to populate enforced_by: eslint.config.js / .eslintrc.*, tsconfig.json strictness flags, Prettier config, and existing paqad infra (module-health, design-test, pentest).
  • The prior rule-script-map.yml if present (script entries are carried over for unchanged rules).

Procedure

  1. Embed markers + collect the inventory:
    node scripts/analyze.mjs [project-root]
    
    Prints { inventory, files, rule_files_hash, changed_files }. The script has already written the markers back into the rule files on disk.
  2. Detect existing enforcers per rule. Read eslint.config.js/.eslintrc.*, tsconfig.json, Prettier config. A rule covered by an existing enforcer gets enforced_by: ["eslint:no-debugger"] and no script — see references/classification-guide.md.
  3. Classify each remaining rule deterministic / heuristic / unverifiable. Use references/classification-guide.md for the decision rubric. unverifiable requires a reason.
  4. Run the conflict pass. For any pair of contradictory rules (e.g. "always named exports" vs "components use default exports"), record them and surface a Decision Pause packet quoting both rules; await resolution before writing the map. Record conflicts into drift.json so the dashboard + planning gate see them:
    node scripts/record-conflicts.mjs <project-root> <conflicts.json>
    
    where conflicts.json is [{ "rule_ids": ["RL-…","RL-…"], "message": "…" }, ...]. This emits RS-CONFLICT findings.
  5. Write the draft map through the single writer:
    node scripts/write-map.mjs <project-root> <classifications.json>
    
    where classifications.json is [{ "id", "verifiability": { "kind", "reason"? }, "enforced_by": [] }, ...].
  6. Present the ## Analysis Summary block and tell the user to review the map, then type generate rule scripts.

Read the full file on GitHub · 86 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 86 lines · 14 tokens per session scan A b9f9cb44a8a8

Subscribe to this mod's changes

rule-analyzer is a skill published in the GitHub repository Eliyce/paqad-ai (8 stars, last pushed today), licensed MIT. It adds 14 tokens to every session and 1,349 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.