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

claude-md-generator

v0.1.2

Published

Scan any repo and draft a CLAUDE.md your AI coding agent can actually use — stack, commands, layout, env vars, and a scaffold for the invariants only you know.

Readme

claude-md-generator

npm CI zero dependencies license

Scan any repo and draft a CLAUDE.md your AI coding agent can actually use.

npx claude-md-generator

That's it. It reads your package.json (or pyproject.toml, go.mod, Cargo.toml), lockfile, folder layout, .env.example, CI config and existing docs, then writes a CLAUDE.md with the boring half already filled in and the important half scaffolded for you.

Zero dependencies. Nothing leaves your machine. Works for Claude Code, Cursor, Codex, Copilot — anything that reads CLAUDE.md or AGENTS.md.


What you get

A file with two kinds of content:

Filled in from the repo

  • Stack: language, package manager, framework + version, backend, auth, ORM, payments, styling, state, AI SDKs, web3, and ~80 other libraries it recognises
  • Commands: every script, in sensible order, with the right npm run / pnpm / make prefix, plus a "before saying done" check chain
  • Layout: each top-level folder with what it's for, and your route list if it's an App Router app
  • Environment variables: from .env.example and from process.env.X / os.environ[...] in your code, flagged public vs server-only, with the ones you forgot to document called out
  • Conventions it can see: TS strict, path aliases, ESLint/Prettier/Biome, git hooks, shadcn style, ESM
  • Stack-specific gotchas: Prisma migrations, Stripe raw-body webhooks, Convex generated files, Next.js 16 changes, Expo bundle ids
  • CI and deploy config present

Left for you, with prompts that make them easy to answer

  • Invariants that are easy to break — the rules that don't fail loudly, they ship broken. This is the section that saves you afternoons. The generator seeds a few from your stack; the real ones come from your last three "how did that reach production" bugs.
  • Where things go — the three changes you make most often and the files they touch.

Search the output for TODO. Usually there are four or five.


Usage

npx claude-md-generator            # writes ./CLAUDE.md
npx claude-md-generator ./apps/web # a different directory
npx claude-md-generator --print    # stdout only, writes nothing
npx claude-md-generator --agents   # also writes AGENTS.md pointing at CLAUDE.md
npx claude-md-generator --force    # overwrite an existing CLAUDE.md
npx claude-md-generator --out docs/AGENT.md
npx claude-md-generator --json     # dump the scan (to see what it detected)

If CLAUDE.md already exists it will not be touched: the draft goes to CLAUDE.generated.md so you can merge by hand.

Requires Node 18+.


Let your agent do the rest

The generator fills in the facts. The claude-md skill gets an agent to fill in the judgment too: it runs the generator, mines your git history for the fixes that reveal invariants, asks you about the rest, and trims the result.

Claude Code — install the skill once, then ask "write a CLAUDE.md for this repo":

mkdir -p ~/.claude/skills/claude-md
curl -fsSL https://raw.githubusercontent.com/hexmillionaire/claude-md-generator/main/skills/claude-md/SKILL.md \
  -o ~/.claude/skills/claude-md/SKILL.md

Cursor, Codex, Copilot, anything else — paste this:

Run npx -y claude-md-generator --print, then follow https://github.com/hexmillionaire/claude-md-generator/blob/main/skills/claude-md/SKILL.md to fill in the invariants and where-things-go sections. Don't overwrite an existing CLAUDE.md; merge into it.

Agents looking for a summary of this tool can read llms.txt.


Why

Agents read CLAUDE.md at the start of every session. A good one is the difference between "add a notes table" producing the right files on the first try and producing a plausible-looking wrong guess. Most people either don't write one, or write a paragraph of vibes.

The facts — stack, commands, layout, env — take twenty minutes to type and are the same twenty minutes for every project. The generator does those. What's left is the part only you know, and the file is structured so you know exactly what to put there.

The output is deliberately short. Agents read the whole file every session; a 600-line CLAUDE.md costs you context on every prompt and gets skimmed.


Example output

Run on a Next.js + Convex + Clerk app:

# convex-clerk-starter — agent notes

Vibe Stack — Next.js + Convex + Clerk starter for people who build with AI.

## Stack

- TypeScript · npm
- Next.js 16.2.1
- Routing: App Router
- Backend: Convex 1.34.0
- Auth: Clerk 7.0.7
- Styling: Tailwind CSS v4
- UI: shadcn/ui 4.1.0, Base UI 1.3.0, Lucide icons 0.577.0, next-themes 0.4.6
- Integration: Convex ↔ Clerk

> **Next.js 16.2.1 is newer than most training data.** Conventions differ
> (`proxy.ts` replaces `middleware.ts` in 16, async `params`/`searchParams`, Turbopack by default).
> Read `node_modules/next/dist/docs/` for the relevant API before writing framework code.

Things about this stack that are easy to get wrong:

- **Convex:** Regenerates `convex/_generated/` while `npx convex dev` runs — never hand-edit those.
- **Convex ↔ Clerk:** the Clerk JWT template must be named `convex` and its issuer set with
  `npx convex env set CLERK_JWT_ISSUER_DOMAIN`.

## Commands

| Command | What it does |
|---|---|
| `npm run dev` | Dev server |
| `npm run build` | Production build |
| `npm run typecheck` | Type-check only, no emit |
| `npm run lint` | Lint |

**Before saying "done":** `npm run typecheck` → `npm run lint` → `npm run build`.

## Environment variables

| Variable | Notes |
|---|---|
| `CLERK_SECRET_KEY` | Clerk Dashboard → your app → API Keys. — server-only; in `.env.example` |
| `NEXT_PUBLIC_CONVEX_URL` | Written automatically by `npx convex dev`. — public (shipped to the browser) |
| `OPENAI_API_KEY` | server-only; read in `src/app/api/explain-verse/route.ts` |

1 of these is read in code but missing from the example env file: `OPENAI_API_KEY`.

## Invariants that are easy to break

<!-- TODO: … -->

Starting points from the stack (verify, edit, or delete):

- Identity in Convex functions comes from `ctx.auth.getUserIdentity()`, never from a `userId` argument.
- Clerk hooks throw outside `<ClerkProvider>`. If the provider is conditional anywhere, every hook import must go through a wrapper.
- Setting `openGraph` in a page's `metadata` replaces, not merges, the parent's — so it drops the inherited image.

## Where things go

| Need | Do |
|---|---|
| A new page | `src/app/<route>/page.tsx`; a `layout.tsx` beside it for metadata |
| A new table | `convex/schema.ts` with an index for every way it's queried; functions in `convex/<table>.ts` |
| A reusable component | `src/components/<name>.tsx`; primitives from shadcn go in `src/components/ui/` via the CLI |

(Trimmed. The real file is ~110 lines.)


What it detects

Languages: TypeScript, JavaScript, Python, Go, Rust. Frameworks: Next.js, Nuxt, Remix, React Router, SvelteKit, Astro, Expo, React Native, Angular, Vue, Svelte, SolidJS, NestJS, Fastify, Hono, Express, Electron, Vite (+React/Vue/Svelte/Solid), FastAPI, Django, Flask, Streamlit. Plus ~80 libraries across backend, auth, ORM, payments, styling, UI, state, data fetching, validation, AI, web3, email, jobs, analytics, monitoring, i18n, charts, testing.

Missing one you use? Open a PR adding a line to STACK in src/scan.js. It's a table.


Safety

Reads files only: never runs your code, spawns processes or touches the network. Never opens .env / .env.local — only .env.example-style templates, and only variable names. See SECURITY.md.

Related

  • convex-clerk-starter — a Next.js + Convex + Clerk starter whose CLAUDE.md is the shape this tool produces, with the invariants filled in from production.
  • Agent Lanes — keep an agent's task inside its declared file scope, then hand it off.

License

MIT