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

@e0ipso/ai-knowledge-base

v0.9.0

Published

Builds and maintains a per-repo knowledge base from AI coding sessions, for use with Claude Code.

Downloads

2,182

Readme

@e0ipso/ai-knowledge-base

npm license: MIT

Build and maintain a per-repo knowledge base from AI coding sessions, for use with Claude Code, OpenAI Codex CLI, or OpenCode.

Your AI sessions produce a steady stream of project-specific knowledge - conventions, prohibitions, gotchas, named modules, decision rationale. Today, almost all of it evaporates when the session ends. This tool captures it, asks a human to curate it, and injects it back into every future session so the harness starts each conversation with your team's accumulated context.

Quick start

npx @e0ipso/ai-knowledge-base init --harnesses claude
npx @e0ipso/ai-knowledge-base doctor

For OpenAI Codex CLI, install with npx @e0ipso/ai-knowledge-base init --harnesses codex; Codex skills install under .agents/skills/. For OpenCode, install with npx @e0ipso/ai-knowledge-base init --harnesses opencode; OpenCode ships a single TS plugin shim at .opencode/plugins/kb.mjs plus per-event Node scripts under .opencode/kb-hooks/, and skills install under .opencode/skills/. All three harnesses share the same SKILL.md source; the active harness is resolved at runtime from inside each skill via a small /tmp/kb-detect-harness.mjs helper that the skill body materializes on first use.

That's the consumer path. After running init, AI sessions in this repo automatically capture candidate knowledge; npx @e0ipso/ai-knowledge-base curate (or /kb-curate from inside a session) writes new knowledge nodes directly under nodes/. You review with git diff, accept with git commit, reject with git restore.

If your repo already has READMEs, ADRs, and module docs, seed the KB from them:

# In a Claude Code session:
/kb-bootstrap

# Later, after adding more docs:
npx @e0ipso/ai-knowledge-base bootstrap-incremental --from docs/

How it works (one paragraph)

Two cooperating pieces. The builder tool (this npm package) installs hooks under .claude/ and a knowledge directory under .ai/knowledge-base/. Hooks capture redacted session slices, an async proposal extractor turns them into structured candidates, and the curator writes new knowledge nodes directly under nodes/. You review the diff and commit (or restore) like any other code change; a pre-commit hook keeps INDEX.md/GRAPH.md in lockstep. A SessionStart hook injects the current INDEX.md into every new AI session. The KB itself is plain markdown - readable, diffable, reviewable like code.

CLI reference

npx @e0ipso/ai-knowledge-base lint

Runs four mechanical, no-LLM checks against nodes/:

  1. Dangling structured edges: any relates_to or depends_on reference that does not resolve to a node id is reported as an error.
  2. Slug / id naming: every node's id must equal <kind>-<slug>, and the filename must be <id>.md under nodes/<kind>/. Mismatches are errors.
  3. Tag near-duplicates: tags that normalize to the same form (case-folded, separator-stripped, single trailing-s stripped) are clustered and reported as findings when two or more variants exist.
  4. Orphans: nodes that neither reference nor are referenced by another node are reported as findings.

Errors cause exit code 1; findings do not. Pass --verbose for a per-entry breakdown.

The lint also runs automatically every lintEveryNSessions sessions (default 50, configurable in config.yaml) via a SessionEnd async hook. The summary surfaces at the next SessionStart as a single nudge line; running the CLI clears it.

doctor checks install health (Node version, claude on PATH, hook wiring, INDEX freshness); lint checks content health (graph integrity, naming, tag hygiene, orphans).

Conflicts

When the curator detects that a candidate contradicts an existing node, it writes one markdown file per conflict under .ai/knowledge-base/conflicts/<id>.md. Review each file with git diff, accept the proposed replacement with git commit, and reject it with git restore.

Secret scanning in CI

This package does not install a commit-time secret scanner into your repo. Run secretlint in CI instead:

# .github/workflows/secret-scan.yml
name: secret-scan
on: [pull_request, push]
jobs:
  secretlint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: 20 }
      - run: npx secretlint "**/*"

Documentation

Full documentation lives at the docs site: How it works, Installation, Daily use, CLI reference, Troubleshooting.

For maintainers of this package itself, see CONTRIBUTING.md.

License

MIT