rulox
v0.1.0
Published
Audit and optimize your CLAUDE.md / AGENTS.md for AI coding agents
Maintainers
Readme
rulox
One source of truth for all your AI coding agents.
Most teams use multiple AI coding tools — Claude Code, Cursor, Copilot, Windsurf. Each has its own context file format. rulox audits your context file, flags contradictions/staleness/vagueness, and can generate an optimized version for each agent.
Install
npx ruloxUsage
npx rulox
npx rulox --file ./CLAUDE.md
npx rulox --no-optimize
npx rulox --write
npx rulox --json
npx rulox --syncSync to all agents at once
npx rulox --syncFiles written when syncing:
CLAUDE.md
.cursorrules
.windsurfrules
.github/copilot-instructions.md
AGENTS.md
CONVENTIONS.md
.clinerulesScoring
- Length — line count and file size pressure
- Contradictions — conflicting instructions (always/never, use/don't use)
- Staleness — hardcoded paths, version pins, temporal references
- Specificity — concrete commands and examples
- Redundancy — rules the LLM already knows by default
- Format Compliance — agent-specific formatting limits
Anti-patterns
rulox names what it finds. Named anti-patterns help prioritize fixes:
- 👻 Ghost Path — hardcoded file paths that are probably stale
- 🔮 Obvious Oracle — rules the LLM already knows by default
- ⚡ Contradiction Trap — directly conflicting rules
- 📚 Readme Dump — README pasted as context
- 🗄️ Rule Hoarder — many rules, few removals
- 📸 Stale Snapshot — pinned versions or old dates
- 🧱 Wall of Text — extremely long files
- 🔧 Format Mismatch — markdown in plain formats
Example output
─────────────────────────────────────────
rulox v0.1.0
─────────────────────────────────────────
Analyzing: CLAUDE.md (84 lines)
SCORES
──────
Length 72/100 ⚠
Contradictions 100/100 ✓
Staleness 60/100 ✗
Specificity 85/100 ✓
Redundancy 40/100 ✗
Format Compliance 80/100 ✓
Overall: 71/100
ISSUES FOUND
────────────
[staleness] L23 Hardcoded path "src/utils/helpers.ts" — likely stale
[redundancy] L12 "don't break existing tests" — LLM default, remove
OPTIMIZATION
────────────
Calling Anthropic API to generate optimized version...
Optimized file: 51 lines (↓ 33 lines, ↓ 39%)
Diff saved to: CLAUDE.md.diff
Run with --write to apply changes.
─────────────────────────────────────────