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

@defi-wonderland/ai-rules

v0.0.2

Published

Script to install standard AI configuration files

Downloads

11

Readme

@defi-wonderland/ai-rules (Core Script)

Script entry point for generating and managing AI configuration files (Cursor rules and coderabbit.yaml)

Overview

This package provides the main script entry for generating standardized configuration files (such as .coderabbit.yaml and .cursor/rules/*) across teams and repositories. It is a script that can be run directly or via npx.

Directory Structure

core/
├── src/
│   └── index.ts      # Script entry point
├── bin/
│   └── ai-rules.js   # Executable script for npx/global usage
├── test/
│   └── index.spec.ts # Tests for the script
├── package.json
└── README.md

Usage

You can run the script directly with npx (no install required):

npx @defi-wonderland/ai-rules

Or, after installing globally:

pnpm add -g @defi-wonderland/ai-rules
ai-rules

Or, for development:

git clone https://github.com/defi-wonderland/ai-rules.git
cd ai-rules
pnpm install
pnpm build
node packages/core/bin/ai-rules.js

Development

Prerequisites

  • Node.js v20
  • pnpm v9.7.1

Available Scripts

| Script | Description | | ------------- | ------------------------------------------------------- | | build | Build the script using tsc | | check-types | Check types issues using tsc | | clean | Remove dist folder | | lint | Run ESLint to check for coding standards | | lint:fix | Run linter and automatically fix code formatting issues | | format | Check code formatting and style using Prettier | | format:fix | Run formatter and automatically fix issues | | test | Run tests using vitest | | test:cov | Run tests with coverage report |

Features

  • Generates .coderabbit.yaml and .cursor/rules/* files for standardizing AI configuration
  • Supports multiple tech stacks and team types
  • Semantic versioning for configuration
  • Typesafe and extensible architecture
  • File system-based operations with robust error handling

Versioning and File Management

The configuration files generated by @defi-wonderland/ai-rules (both .coderabbit.yaml and the individual rule files in .cursor/rules/) include a version field. This version corresponds to the version of the ai-rules package itself or its underlying base configuration.

When you run the script:

  1. Version Comparison: For files that the script manages (i.e., files it would normally generate), it reads the version from the existing file on your system. It then compares this version with its current internal version. An update (overwrite) to a managed file only occurs if the script's version is newer than the version found in the existing file. This ensures your configurations are kept up-to-date with the latest standards provided by the package without unnecessary changes.

  2. Preservation of Custom Files: The script is designed to be non-destructive towards user-created customizations. If you create your own rule files within the .cursor/rules/ directory (or its subdirectories like Offchain, Solidity, UI), these custom files will not be overwritten or deleted by the script. The script only manages and potentially overwrites files that are part of its standard generation process, identified by their expected names and paths. This allows you to extend the base rule set with your own specific guidelines without fear of them being removed when you update the standard configurations.

Contributing with Changesets

This project uses Changesets to manage versioning and changelogs. If you are making a change that should result in a new version of the @defi-wonderland/ai-rules package (e.g., bug fixes, new features, breaking changes), you need to add a changeset.

To add a changeset, run the following command in the root of the monorepo:

pnpm changeset add

This will prompt you to:

  1. Select the package(s) that your changes affect (in this case, primarily @defi-wonderland/ai-rules).
  2. Choose the appropriate version bump (patch, minor, or major) for each selected package based on Semantic Versioning.
  3. Write a concise summary of your changes. This summary will be used to generate the changelog.

Commit the generated markdown file (located in the .changeset directory) along with your code changes. This file tells the automated release process what to do when your changes are merged into the main branch. Currently we are publishing on merges to main.

Contributing

See the root README for contribution guidelines, conventional commits, and package creation instructions.

License

The license for this codebase is MIT. See the LICENSE file for details.