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-sdlc

v1.12.0

Published

让 Claude Code 严格按 SDLC 规范开发 — 一条命令安装

Readme


一条命令安装

npx claude-sdlc

安装到指定目录:

npx claude-sdlc ./my-project

安装完成后,在项目目录启动 claude 即可自动加载全部规范。每个项目只需安装一次。

一键卸载:

npx claude-sdlc uninstall

解决什么问题

| 痛点 | 解决方案 | |------|---------| | Claude 不走流程,直接写代码 | 六阶段强制流程:需求 → 设计 → 编码 → 测试 → 审查 → 交付 | | 需要反复输入指令推进 | 自动驱动:确认需求和设计后,编码到交付全自动 | | 规范需要每次手动提醒 | CLAUDE.md + rules/ 自动加载,14 个 Hooks 运行时拦截 | | Claude 自行加减功能 | PRD 驱动:严格按需求清单,每行代码对应 PRD | | UI 设计很丑很土很过时 | ✨ UI/UX Pro Max 强制集成:67 风格+96 配色+57 字体,禁止 Bootstrap 3/jQuery UI | | 每个阶段都要审查太慢 | 只审查一次:P5 综合审查是唯一关卡,P3/P4/P6 完成即推进 | | 长对话后遗忘规范 | 多层防御 + 抗压缩机制,compaction 后自动恢复 | | 单线程开发效率低 | 3 个自定义 Agent 并行编码/测试/审查 | | CLAUDE.md 过长导致遵循率下降 | 精简到 ~44 行,详细规则拆到 rules/ 按需加载 |


工作流程

你说"帮我开发XX系统"
  ↓
P1.1 需求澄清 → 智能补充功能+充分询问
  ↓【关键决策点1:需求确认】✓
P1.2 技术调研 → Context7 + WebSearch 查最新方案
  ↓【关键决策点2:技术栈确认】✓
P1.3 编写 PRD → 基于确认的需求和技术栈
  ↓【关键决策点3:PRD 确认】✓
P1.4 架构设计 → 先询问偏好 → 提供2-3个方案对比
  ↓【关键决策点4:架构确认】✓
P1.5 原型设计 → Chrome 展示(如涉及 UI)
  ↓【关键决策点5:设计确认】✓ 以下全自动
P2 编码 → P3 测试 → P4 综合审查(唯一审查)→ P5 交付 → 完成报告

用户需要在 5 个关键决策点确认,其余全自动。P4 是唯一正式审查关卡(代码质量+测试质量+集成一致性+PRD追溯),未通过自动修复重试,最多 3 次后才请求帮助。

核心特色

  • 智能补充:对简单需求从功能性角度补充(核心功能+扩展功能+相关功能)
  • 充分询问:不限定轮数,Claude 判断是否充分理解后才推进
  • 架构透明:先了解技术偏好和约束,再提供多个方案对比供选择

核心特性

14 个 Hooks — 全生命周期拦截

| Hook | 类型 | 作用 | |------|------|------| | SessionStart | command | 会话启动/恢复时注入 SDLC 上下文 | | SessionEnd | command | 会话结束时归档状态摘要 | | UserPromptSubmit | command | 每次用户输入时注入阶段提醒 | | PreToolUse (Write/Edit) | command | P3 前拦截代码写入 | | PreToolUse (Bash) | command | P4 前拦截测试、P6 前拦截 git | | PostToolUse | command | 文件修改后提醒更新状态(async) | | PostToolUseFailure | command | 工具失败时注入恢复建议 | | Stop | agent | 回复后自检阶段合规性 | | PreCompact | agent | 压缩前自动保存状态 | | SubagentStart | command | 子 Agent 注入 SDLC + PRD 上下文 | | SubagentStop | command | 子 Agent 完成时验证输出质量 | | TaskCompleted | command | 子任务完成时提醒验证合规 | | PermissionRequest | command | 按 SDLC 阶段自动决策权限 | | fileSuggestion | command | @ 文件补全优先显示 SDLC 文件 |

3 个自定义 Agent — 并行开发

| Agent | 阶段 | 核心能力 | |-------|------|---------| | sdlc-coder | P3 | 严格按 PRD 编码,禁止 PRD 外功能 | | sdlc-tester | P4 | 每条 PRD 需求至少一个测试 | | sdlc-reviewer | P5 | PRD 四环追溯(需求→设计→代码→测试) |

✨ UI/UX Pro Max — 现代设计智能(自动安装)

安装 SDLC 规范时自动安装 UI/UX Pro Max Skill 作为依赖:

| 特性 | 内容 | |------|------| | 67 种 UI 风格 | glassmorphism、claymorphism、minimalism、brutalism、neumorphism、bento grid 等 | | 96 个配色方案 | SaaS、电商、医疗、金融、教育等行业专属配色 | | 57 种字体配对 | 精选标题+正文字体组合(集成 Google Fonts)| | 99 条 UX 指南 | 可访问性、交互、性能、布局最佳实践 | | 25 种图表类型 | 数据可视化和仪表板推荐 | | 强制现代化 | ✅ shadcn/ui、Radix、Ant Design 5+   ❌ Bootstrap 3、jQuery UI、90年代风格 |

自动激活:P1 阶段涉及 UI 时自动使用 ui-ux-pro-max skill 调研和设计。

质量保障:P4 自动审查 Lighthouse(可访问性≥90)+ axe-core(0 违规)+ 响应式 + Core Web Vitals。


4 个 Skills — 斜杠命令

| 命令 | 作用 | 增强特性 | |------|------|---------| | /review | P5 综合审查(唯一正式审查) | context: fork 隔离上下文 + 技能级 hooks | | /status | 查看完整项目状态 | !command 动态注入实时状态 | | `/phase` | 阶段管理(查看/推进/回退) | `!`command 动态读取当前阶段 | | /checkpoint | 手动保存状态快照 | — |

声明式权限控制

deny  → .env 文件绝对禁止读写(平台层面强制)
allow → Read/Glob/Grep/git只读/lint 自动放行(减少弹窗)
ask   → rm -rf / git push --force 等危险命令强制弹框确认

更多特性

  • statusLine — 终端底部实时显示 [SDLC P3] 编码实现 ●●●○○○ 任务描述
  • sandbox — 限制网络访问域名白名单
  • env — 声明式注入 SDLC_PROJECT/SDLC_VERSION 环境变量
  • attribution — Git commit 自动署名
  • spinnerVerbs — 自定义中文加载动词(审查中、编码中、测试中...)
  • language — 界面语言设为中文

审查策略

P5 是唯一正式审查关卡,一次性完成所有质量检查:

| 审查维度 | 检查内容 | |---------|---------| | 代码质量 | Lint + Typecheck + Build + 依赖安全 + 编码规范 | | 测试质量 | PRD 测试覆盖 + 通过率 + 覆盖率(行≥80%/关键≥90%/分支≥70%) | | 集成一致性 | PRD 四环追溯 + 全局一致性 + 安全性 + 性能 | | 交付就绪 | 无敏感信息 + Commit 粒度 + 文档更新 |

其他阶段不审查——P1/P2 靠用户确认推进,P3/P4/P6 完成条件满足后直接推进。


安装后的文件结构

your-project/
├── CLAUDE.md                          # 核心控制文件(~44行)
└── .claude/
    ├── settings.json                  # 14 Hooks + Permissions + Settings
    ├── project-state.md               # SDLC 状态存储(活文档)
    ├── rules/                         # 8 个规则文件(按需自动加载)
    │   ├── 01-lifecycle-phases.md     # 六阶段定义 + P5 审查清单
    │   ├── 02-coding-standards.md     # 编码规范
    │   ├── 03-testing-standards.md    # 测试规范
    │   ├── 04-git-workflow.md         # Git 工作流
    │   ├── 05-anti-amnesia.md         # 反遗忘机制
    │   ├── 06-review-tools.md         # 审查工具链
    │   ├── 07-parallel-agents.md      # 多 Agent 并行
    │   └── 08-chrome-integration.md   # Chrome 浏览器集成
    ├── hooks/                         # 14 个 Hook 脚本
    ├── agents/                        # 3 个自定义 Agent
    │   ├── sdlc-coder.md             # P3 编码 Agent
    │   ├── sdlc-tester.md            # P4 测试 Agent
    │   └── sdlc-reviewer.md          # P5 审查 Agent
    ├── skills/                        # 4 个技能命令
    │   ├── phase/SKILL.md            # /phase
    │   ├── status/SKILL.md           # /status
    │   ├── checkpoint/SKILL.md       # /checkpoint
    │   └── review/SKILL.md           # /review(P5 综合审查)
    └── reviews/                       # 审查报告持久化

PermissionRequest 权限决策矩阵

PermissionRequest Hook 根据当前 SDLC 阶段自动决策工具权限:

| 工具 | P0-P2 | P3 | P4 | P5 | P6 | |------|-------|----|----|----|----| | Write/Edit (代码) | deny | allow | allow | allow(修复) | allow(文档) | | Write/Edit (文档) | allow | allow | allow | allow | allow | | Bash (git 只读) | allow | allow | allow | allow | allow | | Bash (测试) | deny | deny | allow | allow | allow | | Bash (git 写入) | deny | deny | deny | deny | allow | | Chrome | P2 allow | deny | allow | deny | deny | | Read/Glob/Grep | allow | allow | allow | allow | allow |


其他安装方式

全局安装

npm install -g claude-sdlc
claude-sdlc

Shell 脚本安装(无需 Node.js)

git clone https://github.com/Muqian-Sun/claude-sdlc.git
cd claude-sdlc
./install.sh /path/to/your-project

前置依赖

  • Node.js >= 16(npx/npm 方式)
  • jq(可选):Hook 脚本优先用 bash 内置字符串操作解析 JSON,无需 jq

自定义

| 需求 | 编辑 | |------|------| | 修改阶段定义 | .claude/rules/01-lifecycle-phases.md | | 修改编码规范 | .claude/rules/02-coding-standards.md | | 添加新规则 | .claude/rules/ 下新增 .md 文件 | | 调整拦截规则 | .claude/hooks/ 下的脚本 | | 修改权限矩阵 | .claude/hooks/permission-request.sh | | 自定义 Agent | .claude/agents/ 下修改 .md 文件 | | 添加技能命令 | .claude/skills/ 下新增目录和 SKILL.md |


常见问题

已有 CLAUDE.md 会被覆盖吗? 会直接覆盖为最新版本。

已有 settings.json 怎么办? 自动智能合并 — hooks 按 matcher 去重升级,permissions 合并不丢失,新增字段仅在用户未设置时写入。

可以跳过阶段吗? 可以,Claude 会先说明风险,确认后记录跳过原因并推进。

从旧版本升级? 直接重新运行 npx claude-sdlc,安装器自动合并新旧配置,不丢失用户自定义。

如何卸载?

npx claude-sdlc uninstall              # 卸载当前目录
npx claude-sdlc uninstall ./my-project # 卸载指定目录

自动清除全部 SDLC 文件(CLAUDE.md、rules/、hooks/、agents/、skills/、reviews/、settings.json 中的 SDLC 配置)。用户自定义的 settings.json 字段保留。


License

MIT