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

getprimer

v0.14.16

Published

Shared memory for AI agents — works in Cursor, Claude Code, Windsurf, Zed, VS Code, and anything with MCP.

Readme

Primer

AI agents are powerful. They're also forgetful, risky, and unaccountable. Primer fixes all three.

VS Code Marketplace License: MIT

Primer is a VS Code extension that gives every AI coding agent persistent memory, enforced guardrails, and a live audit trail — so you can finally step away and trust the work gets done right.

Works with Claude, Cursor, Windsurf, Zed, and any MCP-compatible agent.


The problem

Every developer using AI agents has been burned.

The agent forgot what it was doing yesterday. It overwrote the wrong file. You told it "don't touch .env" and it did anyway. You came back to a broken build and no idea what changed.

AI agents are remarkably capable — but they have no memory, no rules, and no accountability. You end up babysitting them instead of shipping.

Primer adds all three.


What your agents get

🧠 Memory that persists

Facts, decisions, file history, and handoff notes survive across sessions, machines, and even different AI agents. Start a session in Claude on your phone; continue in Cursor on your laptop. Everything is there.

🛡️ Guardrails that actually work

Define which files are off-limits. Primer intercepts every write attempt and returns allow, warn, or block — before anything happens. .env, *.pem, migrations — never touched without explicit approval.

📋 An audit trail you can trust

Every file change is captured in real-time by the file watcher. See exactly what your agent did, when, and why — directly in the VS Code sidebar.


How it works

  Claude.ai  ·  Cursor  ·  Windsurf  ·  Any MCP agent
        │
        │  MCP over HTTP/SSE
        ▼
  ┌─────────────────────────────────────────┐
  │      Cloudflare Relay (primer-relay)    │  ← No ports exposed. No server to run.
  │      primerctx.workers.dev             │
  └──────────────┬──────────────────────────┘
                 │  WebSocket
                 ▼
  ┌─────────────────────────────────────────┐
  │   Primer VS Code Extension              │
  │   · MCP daemon (12 tools)               │
  │   · Memory & guardrails engine          │
  │   · Real-time sidebar                   │
  └──────────────┬──────────────────────────┘
                 │
        ┌────────┴────────┐
        ▼                 ▼
  Local filesystem    Supabase
                      (events, sessions,
                       live dashboard)

Quick start

1. Install the extension

Search joshuathinks.primer-agent in VS Code, or install from the Marketplace.

2. Sign in and generate a relay URL

Click Sign in with Google in the Primer sidebar, then click + New URL to get your agent relay URL.

3. Connect your agent

Claude.ai: Settings → Integrations → Add integration → paste the relay URL.

Cursor / Claude Desktop / Windsurf:

{
  "mcpServers": {
    "primer": {
      "url": "https://primer-relay.primerctx.workers.dev/mcp/YOUR_UUID?token=YOUR_TOKEN"
    }
  }
}

4. Add the system prompt

Paste this into your agent's custom instructions once — it works forever:

You have Primer MCP connected. ALWAYS start each session:
  primer_agent_brief({ session_id: "unique-uuid", agent: "your-name" })

Rules:
• primer_list_dir before navigating any files
• primer_str_replace for ALL edits — never overwrite whole files
• primer_agent_learn to save facts for future sessions
• primer_agent_handoff at end of every session

MCP Tools (12)

| Tool | Description | |---|---| | primer_agent_brief | Full project briefing — memory, pending plans, recent activity, guardrails | | primer_agent_check | Gate before any write/delete — returns allow / warn / block | | primer_agent_learn | Persist a fact, decision, or observation to project memory | | primer_agent_handoff | End session — writes summary + next steps for the next agent | | primer_read_file | Read a file through guardrails (.env, *.pem blocked) | | primer_write_file | Write a file — guardrails enforced, logged immediately | | primer_str_replace | Surgical code edit — replaces exactly one string, safe for any file size | | primer_list_dir | File tree of the project — use before any file operation | | primer_file_history | What agents did to a specific file — reads, writes, patches | | primer_add_plan | Save a task visible in every future brief until marked done | | primer_list_plans | List all pending plans | | primer_done_plan | Mark a plan complete |


Guardrails

Rules are defined in .primer/agent/rules/ (auto-generated on first use).

| Level | Behavior | |---|---| | block | Agent cannot proceed. Action denied and logged. | | warn | Agent is warned. Can proceed with caution. | | allow | Unrestricted. |

Defaults: .env and **/.env* are blocked. **/*.pem is blocked. **/migrations/** warns.


Session resumption

When an agent disconnects and reconnects (e.g. Claude.ai tab refresh), the relay automatically injects the last 5 actions into the next primer_agent_brief call — so the agent continues exactly where it left off, no re-explanation needed.


Project structure

primer-agent/        VS Code extension + MCP daemon
├── src/
│   ├── daemon/      MCP server, tools, HTTP/SSE, workspace sync
│   ├── ui/          Sidebar webview
│   ├── agent/       Memory, sessions, conflict detection
│   └── extension.ts Entry point, command registration
└── out/             Compiled (daemon.js, sidebar-webview.js)

primer-relay/        Cloudflare Worker
└── src/index.ts     Durable Object relay + OAuth + token management

primer-web/          Next.js dashboard — getprimer.dev
└── src/app/
    ├── dashboard/   Overview, live feed, sessions, audit, memory, rules
    └── auth/        Google OAuth

Development

# Extension
cd primer-agent && npm install
npm run build:all     # compile daemon + webview
npx vsce package      # build .vsix

# Relay
cd primer-relay
npx wrangler dev      # local
npx wrangler deploy   # production

# Dashboard
cd primer-web && npm install
npm run dev           # localhost:3000

License

MIT — built by Joshua