rule-audit

Scan .claude/rules for backtick-wrapped paths and line references against the codebase.

Updated Dec 19, 2025
One-click install
npx skills add https://github.com/float-ritual-stack/floatty --skill rule-audit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rule-audit
Source: https://github.com/float-ritual-stack/floatty/tree/main/.claude/skills/rule-audit
Command: npx skills add https://github.com/float-ritual-stack/floatty --skill rule-audit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This skill helps maintain citation integrity in .claude/rules by auditing backtick-wrapped file paths and line references against the actual codebase, catching drift early and preventing broken prompts.

Core Features & Use Cases

  • Scans .claude/rules/ for citations written as file paths and line numbers and validates them against the repository.
  • Reports missing files and line-number drift to guide fixes before merging PRs.
  • Provides a consumable markdown audit report that can be shared in PRs or sysops logs.
  • Runs a bundled Python script with stdlib only, avoiding external dependencies.

Quick Start

From the project root, run the audit script to generate a markdown report of rule citation integrity.

Frequently Asked Questions about rule-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit rule files for broken citations and line-number drift?

To audit rule files for citation drift, run the bundled script from the project root to scan `.claude/rules` for backtick-wrapped paths and line references, validating them against the actual codebase to generate a markdown report of missing files and shifted line numbers.

What is rule citation drift and how does it affect codebase prompts?

Rule citation drift occurs when file paths and line numbers referenced in `.claude/rules` become outdated as the codebase changes. This skill detects drift by verifying exact path references against the repository, preventing broken prompts and missing file references during local audits.

Can I use this citation audit script in a PR validation pipeline?

Yes, you can use this citation audit during PR validations to detect missing files and line-number drift across the rule set. It produces a consumable markdown audit report that can be shared directly in PRs or sysops logs to guide fixes before merging.

Do I need to install external dependencies to run a rule file audit?

No, you do not need external dependencies to run the rule file audit. The skill runs a bundled Python script using standard library modules only, avoiding external dependency installation while scanning `.claude/rules` for citation integrity.

How does the audit handle missing files and near-miss path references?

The audit enforces exact path references and reports missing files directly. For remediation, it surfaces near-matches in the codebase, helping you quickly identify and correct incorrectly cited file paths within your `.claude/rules` directory.