npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

agent-doctor

v0.1.0

Published

Instruction quality auditor for AI agent rule files

Readme

agent-doctor

Instruction quality auditor for AI agent rule files.

npm version license node

AI agents are only as good as the rules they follow. But as your CLAUDE.md, .cursorrules, and system prompts grow, nobody asks the hard questions:

  • Do these rules contradict each other?
  • Are they specific enough to actually change behavior?
  • Are the file paths and commands they reference still valid?
  • Is the same instruction written four different ways?

agent-doctor is a CLI that scans your rule files and gives you a health score — with specific, actionable findings.


Demo

  ╭────────────────────────────────────────────────────────────────────╮
  │  AGENT DOCTOR                                              v0.1.0  │
  ╰────────────────────────────────────────────────────────────────────╯

  CLAUDE.md
  1 file(s)  ·  47 rules parsed  ·  5 issue(s) found

  ┌────────────────────────��───────────────────────────────────────────┐
  │                                                                    │
  │  HEALTH SCORE                                                  C   │
  │                                                                    │
  │  ████████████████████░░░░░░░░░░░░░░░   62 / 100                    │
  │                                                                    │
  └────────────────────────────────────────────────────────────────────┘

  ── HIGH ────────────────────────────────────────────────────────────

  │ ⚡  CONFLICT                         CLAUDE.md:14 ↔ CLAUDE.md:87
  │ ──────────────────────────────────────────────────────────────────
  │  "act autonomously on reasonable assumptions" conflicts with
  │  "always ask before making significant changes"

  │ ◌  VAGUE RULE                                         CLAUDE.md:22
  │ ──────────────────────────────────────────────────────────────────
  │  "write clean, maintainable code"
  │
  │  Vague phrases:  write clean
  │  → Rewrite as: "when X → do Y"

  ── MEDIUM ──────────────────────────────────────────────────────────

  │ ⊘  DEAD REF                                           CLAUDE.md:103
  │ ──────────────────────────────────────────────────────────────────
  │  ./scripts/deploy.sh  →  not found (path)

  ── SUGGESTIONS ─────────────────────────────────────────────────────

  1  Add a precedence section: e.g. "safety > repo-policy > style guidance"
  2  Rewrite 1 vague rule(s) as concrete trigger → action pairs
  3  Update or remove dead path/command references

Installation

# Run once without installing
npx agent-doctor check .

# Or install globally
npm install -g agent-doctor

Usage

# Scan current directory
ard check .

# Scan a specific file
ard check CLAUDE.md

# Scan a directory recursively
ard check ./my-project

# Heuristic checks only (no API key required)
ard check . --no-llm

# Filter by severity
ard check . --severity high

# Output as JSON
ard check . --output json

# Output as Markdown
ard check . --output markdown > RULES_HEALTH.md

What it detects

| Check | Severity | Method | |---|---|---| | Conflicting rules — "always ask" vs "act immediately" | HIGH | LLM | | Missing precedence — conflicts exist but no priority order defined | HIGH | Heuristic | | Vague rules — "be thoughtful", "write clean code" | HIGH | Heuristic + LLM | | Redundancy — same instruction written multiple times | MEDIUM | Jaccard similarity | | Dead references — file paths or commands that no longer exist | MEDIUM | fs + which | | Weak triggers — "when needed", "if appropriate" | MEDIUM | Heuristic |

Supported rule files

Automatically discovered in the target directory:

  • CLAUDE.md / .claude/CLAUDE.md
  • .cursorrules
  • .windsurfrules
  • AGENTS.md
  • .copilot-instructions.md
  • *system-prompt*.md
  • *instructions*.md

LLM-powered checks

Conflict detection uses the Claude API for semantic analysis. Set your API key to enable it:

export ANTHROPIC_API_KEY=sk-ant-...
ard check .

Without the key, all heuristic checks still run. The --no-llm flag explicitly disables LLM checks.


Exit codes

| Code | Meaning | |------|---------| | 0 | No HIGH severity issues | | 1 | One or more HIGH severity issues found | | 2 | Error (file not found, etc.) |

Useful for CI:

- name: Audit agent rules
  run: npx agent-doctor check . --no-llm

Scoring

Base score: 100

Deductions per issue:
  CONFLICT           -12
  MISSING_PRECEDENCE -10
  VAGUE              -7
  REDUNDANCY         -5
  DEAD_REF           -4
  WEAK_TRIGGER       -3

Grade: A (90–100)  B (75–89)  C (60–74)  D (40–59)  F (<40)

License

MIT © Efe Görkem Bildi