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

cursor-rules-template-generator

v1.0.20

Published

A tool to generate .cursor directory with rules

Readme

cursor-rules-template-generator

一个简单的命令行工具,用于自动化生成 .cursor/rules 目录及其规则文件(必须搭配 cursor 使用),仅支持M8跨端框架,兼容VUE3版本。

安装

npm install -g cursor-rules-template-generator

使用方法

  • 在项目根目录下运行:
cursor-rules-template

这个命令会:

  1. 创建 .cursor/rules 目录
  2. 生成以下规则文件:
    • M8.mdc (M8跨端框架通用方法)
    • ajax.mdc (AJAX请求规范)
    • vue.mdc (Vue3规范)
    • common.mdc (通用编码规范)
    • css.mdc (CSS样式规范)

使用规则

  • cursor 中选择 composer,使用 agent 模式输入提示词即可生成符合我们指定规则的代码,兼容 M8 跨端框架
  • 如果想更准确的生成的效果,可以输入更详细的提示词比如:请使用 em-form 结合 em-field 创建一个表单页面,并使用 em-button 组件作为提交按钮
  • 在输入提示词的时候输入@,选择 Cursor Rules,然后选择我们预设的规则文件,即可生成符合我们预设规则的代码

规则内容

  • M8.mdc: 包含M8跨端框架的常用方法、路由操作、EJSAPI使用示例、字符串验证等
  • ajax.mdc: 包含普通AJAX请求和文件上传类请求示例
  • vue.mdc: 包含Vue2和Vue3兼容性规则、UI组件使用规范、状态管理、路由配置等
  • common.mdc: 包含文件命名规范、项目资源规范、通用编码规范等
  • css.mdc: 包含CSS样式规范和最佳实践

功能

  • 自动创建 .cursor/rules 目录结构
  • 生成预定义的规则文件模板
  • 提供清晰的命令行输出
  • 支持M8跨端框架和Vue3开发

要求

  • Node.js 12.0 或更高版本
  • Cursor编辑器

补充&重要

  • 附规则生成链接:https://cursorrules.agnt.one/chat
  • 该命令行工具仅供内部开发使用,请不要再下载!如有需要请联系QQ:2394533940 提供通用规则工具,谢谢

贡献

  • 如果有需要补充的规则或者问题,请咨询前端研发5部:@lipeng