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

@routerhub/agent-rules

v1.4.10

Published

Shared Copilot agent rules and guidelines for RouterHub projects

Readme

@routerhub/agent-rules 中文说明

@routerhub/agent-rules 用来把通用规则和项目私有规则合并成项目中可直接使用的规则文件。

它主要提供两类能力:

  1. 生成项目可用的 AGENTS.md.github/copilot-instructions.md
  2. 监听 AGENTS.private.md 变更并自动同步

安装

在目标项目中安装:

pnpm add -D concurrently @routerhub/agent-rules

初始化

如果项目里还没有 AGENTS.private.md,可以执行:

pnpm exec agent-rules init

执行后会在项目根目录生成一份可编辑的私有规则模板。

同步规则

将基础规则与项目私有规则合并为 AGENTS.md.github/copilot-instructions.md

pnpm exec agent-rules sync

适合以下场景:

  • 首次接入后生成规则文件
  • 修改了 AGENTS.private.md 后手动重建
  • CI 或脚本中显式同步规则

监听模式

开发时建议通过监听模式自动保持规则文件最新:

{
  "scripts": {
    "dev": "concurrently \"next dev\" \"agent-rules watch\""
  }
}

监听模式会:

  • 先执行一次同步,生成最新的 AGENTS.md.github/copilot-instructions.md
  • 持续监听项目根目录下的 AGENTS.private.md
  • 在文件变更后自动重新同步

规则来源

  • AGENTS.base.md:规则包内置的通用基础规则
  • AGENTS.private.md:项目自己的私有规则
  • AGENTS.md:最终合并结果,供项目中的 Agent 使用
  • .github/copilot-instructions.md:最终合并结果,供 GitHub Copilot 强制规则使用

推荐用法

项目接入时推荐保持以下流程:

  1. 安装 @routerhub/agent-rules
  2. 执行 pnpm exec agent-rules init
  3. 根据项目情况编辑 AGENTS.private.md
  4. 使用 pnpm exec agent-rules syncagent-rules watch 生成最终的 AGENTS.md

注意事项

  • 私有规则应只写项目特有的限制、接口地址、组件路径和业务规范
  • 通用规范应维护在规则包的 AGENTS.base.md
  • 若私有规则与基础规则冲突,以项目私有规则为准