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

repo-context-doctor

v0.3.0

Published

Show the instruction graph your coding agents actually receive.

Readme

Repo Context Doctor

npm version CI Node.js License

Map the instruction files a coding agent can inherit, then find conflicts, stale references, duplicated rules, unsafe guidance, and context pressure before they change agent behavior.

Repo Context Doctor is a read-only repository linter and graph inspector. It does not generate rules, package a codebase, call an LLM, or upload source content. That boundary is intentional: Rulesync synchronizes agent configuration, Repomix packages repositories for model input, and DheerG/context-doctor provides interactive context diagnosis. This tool verifies the instruction surface itself.

The executable is named repo-context-doctor (or rctx-doctor) to avoid colliding with the established context-doctor package, which profiles and optimizes LLM conversation windows.

Install

npm install --save-dev repo-context-doctor
npx repo-context-doctor check .

Node.js 20 or newer is required.

What it discovers

| Ecosystem | Sources | Activation evidence | | --- | --- | --- | | OpenAI Codex | AGENTS.md, AGENTS.override.md | repository and nested-directory scope | | Claude Code | CLAUDE.md, CLAUDE.local.md | project/local-style override layers | | Cursor | .cursorrules, .cursor/rules/**/*.mdc | rule files and Cursor rule scope | | Gemini CLI | GEMINI.md | project and ancestor files | | GitHub Copilot | .github/copilot-instructions.md | repository instruction file | | Windsurf | .windsurfrules, .windsurf/rules/**/*.md | rule files and rule scope |

Use --include-global to include ancestor files above the project root. Without it, scanning stays inside the selected repository.

Checks

  • CTX001 contradictory package-manager, test, lint, or build guidance
  • CTX002 references to missing files
  • CTX003 missing npm run scripts
  • CTX004 duplicated directives loaded from multiple sources
  • CTX005 provider context approaching its configured budget
  • CTX008 unsafe shell, secret-handling, or safety-bypass guidance

Every finding includes evidence paths and line numbers. JSON redacts directive bodies; SARIF points back to source files; Mermaid shows provider-to-source and override relationships.

Commands

# Human report; exits 1 for errors
npx repo-context-doctor check .

# Inspect a nested service and one provider
npx repo-context-doctor check . --cwd services/payments --agent codex

# Include ancestor instruction files explicitly
npx repo-context-doctor check . --include-global --json > context-report.json

# Pull-request annotations and graph visualization
npx repo-context-doctor check . --sarif > context.sarif
npx repo-context-doctor graph . --mermaid > context.mmd

# Treat warnings as blocking in a strict CI gate
npx repo-context-doctor check . --strict

Exit codes are 0 for a clean report, 1 for an actionable finding (or a warning under --strict), and 3 when the scanner cannot complete. The JSON schema is versioned and contains no instruction bodies.

Library API

import { scan } from "repo-context-doctor";

const report = await scan(process.cwd(), ".", undefined, { includeGlobal: true });
console.log(report.sources, report.findings, report.edges);

Privacy and limits

  • Offline and read-only; no subprocesses, model calls, network access, or file writes.
  • Source paths, line numbers, normalized metadata, and graph edges are retained; instruction bodies are omitted from JSON reports.
  • Natural-language interpretation and undocumented provider precedence cannot be proven statically.
  • Findings are evidence for review, not a guarantee of what a closed-source agent will do.

Development

npm install
npm run lint
npm test
npm run test:cli
npm pack --dry-run

Issues and pull requests are welcome in the GitHub repository.

License

MIT © Debaditya Hait