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

context-pack

v0.1.3

Published

Task-specific context bundle generator for Claude Code / Codex

Readme

context-pack

CI npm

Prepare an optimal, task-specific context bundle from a repository for Claude Code and OpenAI Codex.

Install

npm install -g context-pack

Quickstart

Global install:

npm install -g context-pack
context-pack bundle --task "Add Reddit OAuth + ingest pipeline" --budget 14000

npx:

npx -y context-pack bundle --task "Add Reddit OAuth + ingest pipeline" --budget 14000

Output

Generates .context-pack/ in the repo:

  • bundle.md → copy/paste friendly context for LLMs
  • bundle.json → structured representation
  • explain.md → why each file was included

Why it exists

LLMs perform poorly when given too many files, irrelevant files, missing entrypoints, or noisy diffs. context-pack deterministically selects, ranks, and packages the most relevant files within a strict token budget.

How it works (minimal)

Heuristics (v1):

  • Git relevance: recently changed, co-changed files
  • Semantic relevance: filename/path/symbol matches to task text
  • Dependency proximity: import relationships
  • Structural importance: entrypoints, config, manifests
  • Noise elimination: .gitignore, build outputs, node_modules, tests excluded by default

Token budgeting:

  • Estimate tokens per file
  • Stop when budget is reached
  • Degrade gracefully: full → trimmed → signature-only

Commands

  • context-pack bundle --task "<task>" [--budget N]
  • context-pack scan --task "<task>"
  • context-pack explain

Examples

context-pack bundle --task "Add Reddit OAuth + ingest pipeline" --budget 1000
context-pack scan --task "Refactor config loader" --limit 25
context-pack explain

See docs/examples/ for sample outputs.

Troubleshooting

  • Ensure you ran npm run build before invoking the CLI from dist/.
  • If the bundle is empty, try increasing --budget or refining the task description.

How to release

See RELEASE.md for the full checklist.

Docs

  • Codex workflows: docs/codex.md
  • Claude Code plugin wrapper: docs/claude-plugin.md
  • Release checklist: RELEASE.md

Integrations

  • MCP server: integrations/mcp/README.md
  • Claude Code: integrations/claude-code/README.md
  • Codex workflows: integrations/codex/README.md