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

@houserules/api

v0.3.2

Published

houserules plugin contract: the plugin API, action types, module definitions, and the houserules.config.json schema.

Downloads

1,230

Readme

@houserules/api

The contract an houserules plugin codes against: the plugin API, the action types, the module definition, and the houserules.config.json schema.

Depend on this rather than on @houserules/cli. The CLI is the installer, and a plugin has no reason to carry it in its dependency graph.

Install

pnpm add -D @houserules/api
import { definePlugin } from '@houserules/api';
import type { Action, Ctx, ModuleDef, PluginApi } from '@houserules/api';

export default definePlugin((api: PluginApi): ModuleDef[] => [
  {
    id: 'my-rule',
    title: 'My rule (.claude/rules/my-rule.md)',
    group: 'optional',
    hint: () => 'what this rule covers, in one line',
    defaultEnabled: () => false,
    plan: (_ctx: Ctx): Action[] => [
      api.payload.rule('my-rule', 'my-rule', 'why it installs'),
    ],
  },
]);

What a plugin gets

PluginApi carries three things, all bound to the plugin's own package so it resolves no paths of its own: payload, the action builders rooted at this plugin's payload-dist/; packageName and alias, its identity and the id namespace its modules are addressed under; and config, its slice of .claude/houserules.config.json, verbatim and unvalidated.

Validate that config slice yourself and fail loudly. A plugin that silently accepts a typo'd key is a plugin whose config does nothing.

What it deliberately does not give you

Nothing here writes. apply, the filesystem target, and the plan engine are not reachable from this package. A plugin declares actions and houserules decides what they mean against the real tree, which is the invariant the whole dry-run story rests on.

plan() must be pure. It may read the plugin's own package, but it must not touch the target repo, spawn a process, or cache across calls. houserules calls it while computing a plan that may never be applied.

Two entry points

@houserules/api is the plugin contract, and it is the one to import.

@houserules/api/internal exists so the installer can reach shared code across the package boundary. It is not a stable surface and a plugin has no reason to import it. If something you need is only reachable there, that is a gap in the contract worth filing.

Docs

CONVENTIONS.md in @houserules/cli documents the full plugin contract, including how a plugin's payload reaches a shared lib.

Part of houserules

houserules is portable Claude Code infrastructure that keeps the agent's context lean. The package list has the rest.

License

MIT