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

@shelviahq/context-pack

v1.0.3

Published

Validate, render, and export Context Packs — portable, reviewed project context for AI tools.

Readme

Shelvia Context Kit

An open format and toolkit for Context Packs — portable, reviewed project context for AI tools.

License: MIT Spec: v0.1 Node: >=18

Package: @shelviahq/context-pack · Format: Context Packs · Hosted product: Shelvia.net


The problem: AI tools lose your project context

Every time you move work between ChatGPT, Claude, Cursor, or a coding agent, you re-explain the goal, the decisions, and the constraints from scratch, and the tool fills the gaps by inventing details you never approved. Your context lives in scattered chat logs, in a shape the next tool cannot read. So each tool starts cold, repeats mistakes you already ruled out, and drifts from the direction you agreed on.

What a Context Pack is

A Context Pack is a single, structured JSON document that captures the reviewed context of a project so the next tool continues instead of restarting:

  • project summary and current direction
  • key decisions, each with the why (rationale, tradeoffs, outcome, evidence)
  • trusted sources, each with a plain trust grade
  • constraints, boundaries, and what to avoid
  • open questions, next steps, and a definition of done

A pack follows schema/context-pack.schema.json. The rule that keeps it stable: one schema, many renderers. The JSON is the source of truth; every Markdown view is derived from it.

Available now

This repo is a working toolkit, not just a spec:

  • JSON schema for the Context Pack format (schema/context-pack.schema.json).
  • Reusable templates (templates/) and working examples (examples/).
  • TypeScript types for a ContextPack and its sub-objects.
  • A validator that returns clear, path-anchored errors.
  • A Markdown renderer (renderMarkdown).
  • Exporters for ChatGPT, Claude, Cursor, and Codex (CLAUDE.md, AGENTS.md, a Cursor rule, or paste-ready Markdown).
  • A CLIvalidate, render, export.
  • CI that builds, tests, and validates every example on each push.

Install

npm install @shelviahq/context-pack

Node 18+. Ships with TypeScript declarations and a shelvia-context-pack CLI.

As a library

import {
  validateContextPack,
  renderMarkdown,
  exportPack,
} from "@shelviahq/context-pack";

const pack = JSON.parse(fs.readFileSync("my.pack.json", "utf8"));

const { valid, errors } = validateContextPack(pack);
if (!valid) console.error(errors); // [{ path, message }, ...]

const markdown = renderMarkdown(pack);
const agentsMd = exportPack(pack, "codex"); // "chatgpt" | "claude" | "cursor" | "codex"

From the command line

npx @shelviahq/context-pack validate examples/basic/context-pack.json
npx @shelviahq/context-pack render   examples/basic/context-pack.json
npx @shelviahq/context-pack export   examples/basic/context-pack.json --target cursor
npx @shelviahq/context-pack export   examples/basic/context-pack.json --target codex

validate exits 0 when the pack is valid and non-zero (with readable errors) when it is not, so it drops straight into a pre-commit hook or CI.

What each export target produces

One pack, several views — each is a transform of the same reviewed JSON, and the output is worded for how the target tool consumes it:

| Target | Output | Use it as | |---|---|---| | claude | a CLAUDE.md-style project-context file | drop into a repo for Claude / Claude Code to read as standing project context (not a chat message) | | codex | an AGENTS.md file | the AGENTS.md that OpenAI Codex and other AGENTS.md readers pick up | | cursor | a Cursor rule (.mdc, with frontmatter) | a project rule under .cursor/rules/ | | chatgpt | paste-ready Markdown | paste into a ChatGPT thread or a Project's custom instructions as background |

renderMarkdown produces the neutral, tool-agnostic Markdown view when you just want a readable brief rather than a tool-specific file.

Local development

git clone https://github.com/Evan14-7/shelvia-context-kit
cd shelvia-context-kit
npm install                 # install deps and build (TypeScript -> dist)
npm run build               # compile
npm test                    # run the test suite
npm run validate:examples   # every example conforms to the schema

Who it is for

  • Developers moving work across multiple AI tools without re-briefing each one.
  • Founders keeping product context consistent across assistants and sessions.
  • Researchers carrying sources, claims, and decisions between tools.
  • AI-assisted teams that need scoped, reviewed context instead of raw chat dumps.
  • Anyone building agents that need trustworthy, bounded context to act on.

Safety

A Context Pack is meant to carry only reviewed, human-approved content, never a raw chat log. Do not put secrets, credentials, or API keys in a pack — the format does not need them, and exporters copy pack content verbatim. Exporters never invent facts; they only transform what the pack already contains. See SECURITY.md.

Relationship to Shelvia

This Kit is open source and standalone. Shelvia.net is the hosted product that produces trustworthy packs: it imports messy chats, screenshots, and links, reviews them into memory, and captures results back. The whole Shelvia product is not open source — the Context Pack format is. See docs/relationship-to-shelvia.md.

Versioning

0.x of the format may change the pack shape between releases; every pack declares the spec_version it targets so a validator can pick the right rules.

Contributing and more

License

MIT. See LICENSE.