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

dchains

v1.1.0

Published

Language-agnostic code annotation parser — extracts @dc: tags into LLM context, JSON manifests, and interactive visualizations

Downloads

321

Readme

dchains

Language-agnostic code annotation parser. Extracts @dc: tags from source files into dependency maps for LLMs and humans.

Why

LLMs break production when they can't see the blast radius of a change. DChains solves this by mapping every module, dependency, and construct in your project into a format both machines and humans can read.

How It Works

Two-part workflow:

  1. Annotate — An LLM skill (or you, manually) adds @dc: comments to your source files describing modules, dependencies, and constructs
  2. Parsedchains extracts those annotations into output files

Quick Start

# Initialize dchains in your project
npx dchains init

# If using Claude Code, the skill is auto-installed.
# Ask Claude to "map this project" — it will annotate your files.

# Parse annotations into output files
npx dchains

Output Files

DChains generates four files:

| File | Purpose | |------|---------| | dchains.ctx | LLM context file. Feed this to an LLM so it can see every module, dependency, and construct in your project. Shows the full blast radius of any change — forward deps (deps:) and reverse deps (used-by:). | | dchains.json | Machine-readable JSON manifest. For tooling, CI integration, or building custom visualizations. | | dchains.html | Interactive D3.js constellation visualizer. Open in a browser to explore modules, layers, and dependency edges visually. | | dchains.diagnostics.json | Validation report. Warnings for broken references, orphan modules, stale dependencies, and coverage stats. |

Annotation Basics

Annotations live in source code comments using the @dc: prefix. The comment character adapts to the language:

// @dc:module Auth/Login
// @dc:description Handle user login flow
// @dc:layer Entry
// @dc:depends-on Auth/Session, Service/API
// @dc:exposes LoginPage

// @dc:def fn validateCredentials
// @dc:description Check email format and password strength
// @dc:param email string - User email address
// @dc:returns boolean
// @dc:async
# @dc:module Data/Pipeline
# @dc:description ETL pipeline for user analytics
# @dc:layer Data
-- @dc:module Data/Queries
-- @dc:description Core database queries
-- @dc:layer Data

Key Tags

Module level (top of file):

  • @dc:module — Module name (e.g., Auth/Login)
  • @dc:description — What this module does
  • @dc:layer — Entry, UI, Logic, Service, Data, Config, or Utility
  • @dc:depends-on — Other modules this depends on
  • @dc:exposes — Public exports
  • @dc:consumes — External services (e.g., Firebase:Auth)

Construct level (above functions/classes):

  • @dc:def — Type and name (e.g., fn validateEmail)
  • @dc:description — What it does
  • @dc:param, @dc:returns, @dc:throws
  • @dc:async, @dc:pure, @dc:idempotent
  • @dc:uses, @dc:reads, @dc:writes — Cross-references

See the full tag reference in ANNOTATION-GUIDE.md or the bundled skill file.

CLI Usage

# Parse current directory
dchains

# Parse a specific project
dchains parse /path/to/project

# Initialize in a new project
dchains init

# Custom output directory
dchains --output ./docs

# Ignore additional directories
dchains --ignore vendor --ignore generated

# Version and help
dchains --version
dchains --help

Configuration

dchains.config.json in the project root:

{
  "project": "my-project",
  "description": "What this project does",
  "ignore": ["vendor", "generated"],
  "output": "."
}

| Field | Purpose | |-------|---------| | project | Project name (shown in output headers) | | description | One-line description | | ignore | Directories to skip during scanning | | output | Where to write output files (default: project root) |

Claude Code Integration

When you run dchains init in a project that has .claude/skills/, the annotation skill is automatically installed. This teaches Claude how to annotate your codebase with @dc: tags.

If .claude/skills/ doesn't exist, the skill is placed as DCHAINS-SKILL.md in your project root. You can feed this to any LLM as annotation instructions.

Zero Dependencies

DChains uses only Node.js built-in modules. No npm dependencies to install, audit, or update.

License

MIT