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

v2.0.0

Published

🧠 Your AI that trains itself. MCP-native self-improving agent for Claude Code.

Readme

🧠 claude-learner

Your AI that trains itself. MCP-native self-improving agent for Claude Code.

npm version GitHub release CI License: MIT

Every correction becomes a rule. Every rule makes Claude smarter. Automatically.


⚑ 30-Second Setup

npm install -g claude-learner
claude-learner init

That's it. Claude now learns from every session.


The Problem

You correct Claude. Claude forgets. You correct again.

You: "Don't use rm, use trash"
Claude: *uses rm again next session*
You: 🀦

Knowledge dies when the session ends.

The Solution

claude-learner watches your sessions, detects patterns, and creates permanent rules:

[daemon] Detected: User corrected "rm" β†’ "trash" (3 times)
[daemon] πŸ“‹ Proposed rule: "Use trash instead of rm"
[you]    claude-learner approve rule_xxx
[claude] *follows rule forever*

How It Works

πŸ“ You work with Claude Code
     ↓
πŸ‘οΈ  Daemon watches sessions in real-time
     ↓
πŸ” Detects patterns (corrections, retries, rollbacks)
     ↓
πŸ“‹ Proposes rules for your approval
     ↓
βœ… Approved rules become permanent
     ↓
🎯 Claude follows them via MCP
     ↓
πŸ“Š Ineffective rules get auto-pruned

The daemon runs in the background. You don't need to do anything except approve good rules.


Commands

| Command | What it does | |---------|--------------| | init | One-step setup (starts daemon + registers MCP) | | start | Start the learning daemon | | stop | Stop the daemon | | status | Show daemon status + stats | | watch | Live activity feed | | rules | List all rules | | rules --pending | Show rules awaiting approval | | rules --effectiveness | Show compliance rates | | approve <id> | Approve a proposed rule | | reject <id> | Reject a proposed rule | | mcp-serve | Start MCP server (for Claude Code) |

v1 commands still work:

| analyze | Batch-analyze session history | | improve | Generate CLAUDE.md suggestions | | export | Export learnings to files | | stats | Usage statistics |


MCP Integration

When integrated with Claude Code, these tools are available:

| Tool | Purpose | |------|---------| | get_rules | Load active rules at session start | | check_rule | Check if action violates a rule | | log_correction | Log corrections for learning | | record_compliance | Track rule effectiveness | | get_pending_rules | View proposed rules | | approve_rule / reject_rule | Manage rules |

Claude Code automatically calls these to learn and improve.


Example Workflow

  1. You correct Claude: "Don't use any, use proper types"
  2. Daemon detects it: Logs as correction pattern
  3. Pattern repeats: Same correction 2+ times
  4. Rule proposed: "Don't use any type"
  5. You approve: claude-learner approve rule_xxx
  6. Rule active: Claude checks it before using any
  7. Tracked: System monitors compliance
  8. Auto-prune: If ignored >70%, rule is pruned

Rule Scopes

| Scope | Applies to | Example | |-------|-----------|---------| | global | All projects | "Use 2-space indentation" | | project | Specific project | "This repo uses pnpm" | | file | File pattern | "*.test.ts files use vitest" |


Storage

~/.claude-learner/
└── learner.db      # SQLite database (rules, patterns, sessions)

/tmp/
β”œβ”€β”€ claude-learner.pid    # Daemon PID
└── claude-learner.log    # Daemon logs

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Claude Code    │────▢│  MCP Server  │────▢│   SQLite    β”‚
β”‚  (your work)    β”‚     β”‚  (7 tools)   β”‚     β”‚  (storage)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚                                          β–²
         β–Ό                                          β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”‚
β”‚ Session Files   │────▢│   Daemon     β”‚β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚ ~/.claude/...   β”‚     β”‚  (watcher)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Requirements

  • Node.js 20+
  • Claude Code (for MCP integration)

FAQ

Does it send data anywhere?
No. Everything runs locally. Your sessions never leave your machine.

Can I use it without the daemon?
Yes. Use analyze/improve/export for batch processing.

How do I uninstall?

claude-learner stop
npm uninstall -g claude-learner
rm -rf ~/.claude-learner

Support

If this saved you time:


Links


License

MIT Β© Alex Zaytsev


Make Claude Code actually learn. Install in 30 seconds. Never repeat a correction.