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

claude-plugin-project-standards

v1.0.4

Published

让 Claude Code AI 助手自动遵循项目规范。支持全局和模块级规范,会话启动时自动加载,开发过程中智能应用,并提供代码规范检查功能。

Downloads

32

Readme

Project Standards for Claude Code

Claude Code

让 Claude Code AI 助手自动遵循项目特定的研发规范。

功能特性

  • 🚀 自动加载:会话启动时自动加载全局规范
  • 📁 模块化:支持全局和模块级规范分层
  • 🔍 智能检测:根据工作目录自动加载相关模块规范
  • 代码检查:内置代码规范校验功能
  • 🌍 中文支持:默认提供中文模板
  • ⚙️ 可定制:轻松定制符合团队需求的规范

安装

方式一:添加 Marketplace(推荐)

在 Claude Code 中运行:

/marketplace add https://github.com/wandoupeas/project-standards-plugin

或手动编辑 ~/.claude/plugins/known_marketplaces.json

{
  "project-standards-plugin": {
    "source": {
      "source": "github",
      "repo": "wandoupeas/project-standards-plugin"
    },
    "autoUpdate": true
  }
}

然后重启 Claude Code,skill 会显示在 /skills 列表中。

快速开始

1. 初始化规范目录

python ~/.claude/plugins/marketplaces/project-standards-plugin/skills/project-standards/scripts/init_standards.py

这会在项目根目录创建:

docs/standards/
├── global/              # 全局规范(自动加载)
│   ├── coding-style.md
│   ├── architecture.md
│   ├── tech-stack.md
│   ├── git-workflow.md
│   ├── testing.md
│   ├── security.md
│   └── project-requirements.md
└── modules/             # 模块规范(按需加载)
    └── README.md

2. 定制规范

根据项目需求编辑 docs/standards/global/ 下的规范文件。

3. 添加模块规范(可选)

docs/standards/modules/ 下添加特定模块的规范文件,如 auth-service.mdpayment-module.md

4. 使用 Skill

重启 Claude Code 后,skill 会自动在工作时应用规范。

使用方法

自动触发

Skill 会在以下情况自动加载规范:

| 触发场景 | 加载内容 | |----------|----------| | 新会话开始 | 全局规范 | | compact/clear 后 | 全局规范 | | 检测到开发关键词 | 全局 + 对应模块规范 |

开发关键词:开发、实现、添加、新增、创建、编写、修改、更新、优化、重构、修复、解决、功能、接口、代码等

手动命令

/standards              # 重新加载全局规范
/standards [模块名]     # 加载指定模块规范
/standards list         # 列出所有可用规范
/standards check        # 检查代码是否符合规范

代码规范检查

# 检查整个项目
python ~/.claude/plugins/marketplaces/project-standards-plugin/skills/project-standards/scripts/check_compliance.py

# 检查单个文件
python ~/.claude/plugins/marketplaces/project-standards-plugin/skills/project-standards/scripts/check_compliance.py src/auth/service.ts

# 输出 JSON 格式报告
python ~/.claude/plugins/marketplaces/project-standards-plugin/skills/project-standards/scripts/check_compliance.py --format json

检查内容包括:

  • 代码风格(命名、格式、行长度)
  • 安全问题(硬编码凭据)
  • 架构规范(分层、依赖)

项目结构

project-standards-plugin/
├── .claude-plugin/
│   └── marketplace.json          # Marketplace 配置
├── skills/                       # Skills 目录
│   └── project-standards/
│       ├── SKILL.md              # Skill 主文件
│       ├── scripts/
│       │   ├── init_standards.py     # 初始化脚本
│       │   ├── detect_module.py      # 模块检测脚本
│       │   └── check_compliance.py   # 代码检查脚本
│       └── references/
│           └── skill-usage-guide.md  # 使用指南
├── package.json
├── README.md
└── LICENSE

规范文件格式

每个规范文件应遵循以下结构:

# [规范名称]

## 适用范围
描述该规范适用的场景或模块。

## 核心规则
- 规则 1(必须遵守)
- 规则 2(必须遵守)

## 示例
符合规范的示例代码或配置。

## 检查清单
- [ ] 检查项 1
- [ ] 检查项 2

工作原理

  1. 全局规范加载:会话启动时读取 docs/standards/global/ 下所有文件
  2. 模块规范加载:根据当前工作目录匹配 docs/standards/modules/ 中的文件
  3. 智能应用:AI 在开发时自动应用相关规范
  4. 代码检查:运行脚本检查现有代码是否符合规范

模块匹配规则

| 工作目录 | 匹配的规范文件 | |----------|----------------| | src/auth/ | modules/auth-service.md | | src/payment/ | modules/payment-module.md | | src/user/ | modules/user-service.md |

示例

完整的使用示例请参考:standards 项目

License

MIT License

作者

wandoupeas

链接