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-compass

v1.0.3

Published

Static code intelligence for AI-assisted development. Generates a dense CODEBASE.ctx from your source files — no API calls, pure local compute.

Readme

repo-compass

Static code intelligence for AI-assisted development. Run one command, get a dense CODEBASE.ctx file that tells an AI everything it needs to know about your codebase — in under 2000 tokens.

What it does

repo-compass scan walks your source files, extracts exports, resolves imports, builds a module dependency graph, and writes CODEBASE.ctx to the repo root. No API calls. No AI. Pure local compute.

src/commands/scan.ts [★3] :: scanCommand:variable
> src/analyzers/entrypoints.ts,src/analyzers/source-files.ts,src/analyzers/graph-builder.ts

src/analyzers/file-analyzer.ts [★4] :: analyzeFile(root:string,relativePath:string):FileAnalysis
> src/types.ts

src/types.ts [★6] :: ExportItem:type | ResolvedImport:type | FileAnalysis:type | ModuleGraph:type | normalizePath(p:string):string

An AI reading this file understands your entire codebase structure — what each module exports, which modules are central (★), and how data flows between them — in a single read.

Install

npm install -g repo-compass

Usage

cd your-project
repo-compass scan

Generates CODEBASE.ctx in the current directory. Open it, paste it to any AI, or use the Claude Code skill (see below).

Options

--all    Skip confirmation prompt for large repos (>300 files)

Claude Code skill

The /repo-compass slash command is installed automatically when you install the package globally. No extra setup needed.

In any Claude Code session:

/repo-compass

Claude runs the CLI, reads CODEBASE.ctx, and instantly has full codebase context — without reading individual files or consuming thousands of tokens.

Manual install: if you installed via a local clone or need to reinstall the skill, run node scripts/postinstall.cjs from the package root, or copy .claude/commands/repo-compass.md to ~/.claude/commands/.

What it analyzes

Languages: TypeScript, JavaScript (ESM + CJS), Python

Extracts:

  • Functions with signatures and return types
  • Classes, interfaces, type aliases, enums
  • Re-exports and default exports
  • CJS module.exports patterns
  • Python functions, classes, constants, __all__

Graph:

  • Resolves relative imports to actual file paths (handles .js.ts NodeNext convention)
  • Counts how many files import each module (★ = imported by 2+)
  • Core modules get full detail; leaf modules get summary-only

Project detection:

  • Monorepos: pnpm-workspace.yaml, package.json workspaces
  • Source roots: src/, lib/, app/, pages/, and more
  • Python flat layout: directories with __init__.py
  • Project type: cli | library | app | unknown

Large repos

Above 300 files, CODEBASE.ctx switches to compact mode: only core modules (★) get full import/export detail. Leaf files appear as a single line. This keeps the file readable and useful even on large codebases.

You'll be prompted before scanning large repos. Use --all to skip.

Token efficiency

A typical 50-file project generates a CODEBASE.ctx of ~1000 tokens. Reading individual source files for the same coverage would cost 20–50×. At 300 files, compact mode keeps output under 6000 tokens while preserving full fidelity for the modules that matter.

License

MIT