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

@jazpiper/rules-doctor

v0.3.1

Published

Node.js CLI to sync shared coding rules across multiple agent/CLI targets

Readme

@jazpiper/rules-doctor

rules-doctor keeps coding-rule files in sync across multiple agent CLIs from one source of truth: .agentrules/rules.yaml.

It is optimized for real project adoption:

  • import existing docs (init --import)
  • safe previews by default (sync is dry-run unless --write)
  • drift detection for CI (check)

All paths are resolved from project root (.git ancestor), not current subdirectory.

Install

npm install -D @jazpiper/rules-doctor

Run with:

npx rules-doctor --help

Quick Start

1) Initialize (recommended with import)

npx rules-doctor init --import
  • Creates .agentrules/rules.yaml
  • Reads existing docs when found (CLAUDE.md, AGENTS.md, GEMINI.md, .cursor/rules/*.mdc, .github/copilot-instructions.md)
  • Writes .agentrules/import-report.md

2) Preview changes safely

npx rules-doctor sync --diff

sync is dry-run by default. Nothing is written yet.

3) Apply changes

npx rules-doctor sync --write

Optional backups:

npx rules-doctor sync --write --backup

4) Verify drift in CI/local

npx rules-doctor check

Returns non-zero when generated targets are out of sync.

Supported Targets

Built-in adapters:

  • claude -> CLAUDE.md (full-managed)
  • codex -> AGENTS.md (marker-managed)
  • copilot -> .github/copilot-instructions.md (marker-managed, preserves existing text outside managed block)
  • opencode -> AGENTS.md (marker-managed)
  • cursor -> .cursor/rules/rules-doctor.mdc (full-managed)
  • gemini -> GEMINI.md (full-managed)

Command Reference

init

npx rules-doctor init [--import]

sync

npx rules-doctor sync [--target all|claude,codex,...] [--diff] [--write] [--backup]

check

npx rules-doctor check [--target all|claude,codex,...] [--diff]

CI Template

Copy docs/workflows/rules-doctor-check.yml to your repository as .github/workflows/rules-doctor-check.yml. It runs npx rules-doctor check on push and pull requests.

Inline workflow example:

name: Rules Doctor Check

on:
  push:
  pull_request:

jobs:
  rules-doctor:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: "20"
          cache: npm
      - run: npm ci
      - run: npx rules-doctor check

Troubleshooting

  • rules-doctor: command not found after npm install -D @jazpiper/rules-doctor:
    • Use npx rules-doctor ... (recommended for local dev dependency).
    • Or add an npm script in your project: "rules:check": "rules-doctor check", then run npm run rules:check.
    • Global install (npm i -g @jazpiper/rules-doctor) works, but local + npx is safer for version consistency.
  • init says rules.yaml already exists:
    • Edit .agentrules/rules.yaml directly, then run npx rules-doctor sync --write.

Rules Schema (v2 Draft)

See docs/rules-v2-draft.yaml.

Development

npm ci
npm test

License

MIT