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

docalign

v0.4.22

Published

Documentation-reality alignment engine — detects when docs drift from code

Readme

🔍 DocAlign - Give your coding agent docs it can trust.

npm version License: MIT TypeScript

Detects when your documentation drifts from code reality — and tells your AI coding agent about it.

Overview

Most documentation checkers verify syntax: does this file exist, is this version correct? DocAlign goes further. It reads your docs the way a developer would, extracts every factual claim — both mechanical facts and behavioral assertions — and verifies each one against the actual codebase.

The result is a living map of what your docs claim vs. what your code does, kept current on every commit. Works as an MCP server for Claude Code (primary) or as a standalone CLI.

How It Works

On first setup, a sub-agent reads each selected doc in parallel, extracts every verifiable behavioral claim, and stores it with a stable ID:

  • "Requests are authenticated using JWT tokens validated in middleware/auth.ts"
  • "The worker retries failed jobs up to 3 times with exponential backoff"
  • "All errors are forwarded to Sentry before responding to the client"

These are the claims that go stale — and that no regex can catch.

On every commit, a Claude Code PostToolUse hook fires when Claude runs git commit. It reads which source files changed and tells Claude to invoke the /docalign skill. The skill then reverse-looks up which stored claims reference those files, re-verifies only those claims against the updated code, and reports any mismatches.

Change src/auth.ts and only auth-related docs are re-checked — not your entire doc tree. Extraction runs once; verification runs on every commit, scoped to what changed.

What It Finds

Syntactic checks (regex-based, instant):

| Category | Example | |----------|---------| | File paths | src/auth.ts referenced but doesn't exist | | Dependencies | README says express 4.17, package.json has 4.18 | | CLI commands | npm run deploy but no deploy script defined | | API routes | GET /api/users not found in route handlers | | Code examples | Import from ./utils/helpers but symbol not exported | | Env variables | DATABASE_URL documented but missing from .env.example | | Config values | "Defaults to port 3000" but code uses 8080 |

Semantic checks (LLM-powered, via Claude):

Behavioral claims that regex can't verify — extracted from prose, stored as structured claims with stable IDs, re-checked against source on every scan. Every claim falls into one of three types:

| Type | Example claim | Would drift when… | |------|---------------|-------------------| | behavior | "Uses JWT for authentication" | Auth switches to sessions or middleware is removed | | behavior | "Retries failed jobs up to 3 times" | Retry count changes or retry logic is deleted | | behavior | "Returns 404 for unknown routes" | Error handling is restructured | | architecture | "Processes files in parallel using worker threads" | Parallelism replaced with sequential execution | | architecture | "Claims are extracted once and cached per section" | Caching removed or extraction always re-runs | | config | "Defaults to port 3000" | The port constant is updated in source | | config | "Timeout defaults to 30 seconds" | The timeout value is changed |

Semantic claims are extracted once per document, assigned stable IDs, cached alongside the doc, and re-verified automatically whenever related code changes.

See Checks Reference for all claim types.

Setup

Run this from the root of your project:

cd your_project_root
curl -fsSL https://raw.githubusercontent.com/BigDanTheOne/docalign/main/scripts/install.sh | bash

The script checks prerequisites (Node 18+, git), installs DocAlign globally, runs docalign init to configure the MCP server and skills, then launches Claude Code. Claude walks you through selecting which docs to monitor and runs the initial extraction — one sub-agent per document, in parallel.

After setup, Claude automatically checks documentation after code changes and answers "are my docs accurate?" directly. No further configuration required.

Claude Code Skill

DocAlign ships as a native Claude Code skill — an agent workflow that Claude runs automatically, not a tool you have to remember to call.

Once installed, Claude watches every git commit. When source files change, the skill:

  1. Looks up which docs reference those files
  2. Re-verifies each affected doc's claims against the updated code
  3. Surfaces any mismatches inline, with the exact line and a suggested fix

The result: stale documentation gets caught at commit time, before it reaches reviewers or other developers. No CI step required, no separate lint job — it runs inside the same Claude Code session where you're already working.

You can also invoke it on demand:

  • /docalign — check docs affected by recent changes
  • /docalign-setup — first-time interactive setup wizard

MCP Tools

Claude Code gets 4 documentation tools:

| Tool | What it does | |------|-------------| | check_doc | Check a doc file for drift — optionally scoped to a section (section=) or with full audit (deep=true) | | scan_docs | Repo-wide health score + ordered drift hotspot list | | get_docs | Search docs by topic or reverse-lookup docs that reference a code file (code_file=) | | register_claims | Persist semantic claims found during analysis |

See MCP Tools Reference for parameters and return values.

CLI

For one-off checks, CI use, or manual setup:

npx docalign init              # Manual setup (alternative to install.sh)
npx docalign scan              # Scan entire repository
npx docalign check README.md   # Check a single file

See CLI Reference for all commands and flags.

Configuration

Works with zero configuration. To customize, create .docalign.yml:

doc_patterns:
  include: ['README.md', 'docs/**/*.md']
  exclude: ['docs/archive/**']

claim_types:
  url_reference: false   # Skip dead link checks

verification:
  min_severity: medium   # Only report medium+ issues

See Configuration Reference for all options.

Documentation

Getting started: Installation & first scan

Guides: Checking files · Semantic extraction · MCP integration · Fixing drift · Suppressing findings · Custom configuration

Reference: CLI · Configuration · Checks · MCP tools

Explanation: How it works · Verification tiers

Contributing: Architecture · Design patterns · Adding a check · Testing

Troubleshooting

License

MIT