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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@daitasu/aicontextr

v0.0.2

Published

AI context file generator for MDC and CLAUDE.md files

Downloads

983

Readme

@daitasu/aicontextr

AI context file generator for MDC and CLAUDE.md files

Installation

npm install -g @daitasu/aicontextr

Usage

Basic Usage

aicontextr --config ./scripts/config.yaml

Using with npx

npx @daitasu/aicontextr --config ./scripts/config.yaml

Try it out

To see the tool in action, check out the working example in the examples/ directory:

cd examples
npx @daitasu/aicontextr --config ./scripts/config.yaml

This will generate sample *.mdc and CLAUDE.md files so you can see exactly how the tool works.

Options

  • -c, --config <path>: Path to config file (default: scripts/config.yaml)
  • -h, --help: Display help information
  • -V, --version: Display version number

Configuration

Create a YAML configuration file with the following structure:

mdcConfigurations:
  - output: ".cursor/rules/frontend.mdc"
    sourceDir: "docs/frontend/"
    header:
      description: "Frontend development rules and architecture guidelines"
      globs: "src/**/*.ts,src/**/*.tsx,components/**/*.js"
      alwaysApply: false
    filePattern: "*.md"
    subDirectories:
      - "apps/frontend/"

claudeConfigurations:
  - output: "CLAUDE.md"
    sections:
      - title: "Project-wide Common Rules"
        sourceDir: "docs/common/"
        filePattern: "*.md"
      - title: "Database Design"
        sourceDir: "docs/data/"
        filePattern: "*.md"

Configuration Fields

mdcConfigurations

  • output: Output path for the MDC file
  • sourceDir: Source directory containing markdown files
  • header: YAML front matter for the MDC file
    • description: Description of the rules
    • globs: File patterns to apply rules to
    • alwaysApply: Whether to always apply the rules
  • filePattern: Pattern to match source files (e.g., "*.md")
  • subDirectories: Optional list of subdirectories to copy the MDC file to

claudeConfigurations

  • output: Output path for the CLAUDE.md file
  • sections: Array of sections to include
    • title: Section title
    • sourceDir: Source directory for this section
    • filePattern: Pattern to match files in this section
    • description: Optional description for the section

Features

  • Modular Configuration: Separate configurations for MDC and CLAUDE files
  • Automatic File Sorting: Files are sorted by numeric prefix (e.g., 01_, 02_)
  • Sub-directory Support: Automatically copy MDC files to specified subdirectories
  • YAML Front Matter: Automatic generation of YAML headers for MDC files
  • File Cleaning: Clears existing files before regeneration

File Structure

The tool expects your project to have a structure like:

your-project/
├── scripts/
│   └── config.yaml
├── docs/
│   ├── frontend/
│   │   ├── 01_architecture.md
│   │   └── 02_components.md
│   └── backend/
│       ├── 01_api.md
│       └── 02_database.md
└── .cursor/
    └── rules/
        ├── frontend.mdc
        └── backend.mdc

Requirements

  • Node.js >= 18.0.0
  • TypeScript support (for development)

License

MIT