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

@longjiang666/change-impact-analyzer

v1.2.4

Published

Git branch change impact analyzer — AI-powered regression test scope generation for Claude Code

Downloads

696

Readme

@longjiang666/change-impact-analyzer

Git 分支变更影响分析工具,自动识别功能模块,AI 生成回归测试范围文档。

功能特性

  • 变更范围分析:提取分支所有 commits,统计变更文件与代码量
  • 模块自动识别:优先读取 .change-analyzer.yml 配置映射,无配置时按目录结构自动推断
  • AI 驱动分析:调用 Claude API 理解变更语义,生成精准的测试点
  • 风险等级评估:自动判断每个模块的回归风险(高/中/低)
  • Markdown 报告:输出标准化回归测试文档,含可勾选 checklist

安装(Claude Code)

在终端执行一条命令注册为全局 MCP 工具:

claude mcp add change-impact --scope user -- npx -y @longjiang666/change-impact-analyzer

注册后重启 Claude Code 会话,通过 /mcp 确认出现 change-impact 即为成功。

使用方式

在 Claude Code 中调用

注册成功后,直接在对话中说:

请调用 analyze_branch_changes 工具,分析 feature/payment 分支的变更,仓库路径是 /path/to/repo

作为 CLI 工具

# 基本用法
change-impact --branch feature/payment

# 指定基准分支和输出文件
change-impact --branch feature/payment --base develop --output report.md

# 指定仓库路径
change-impact --branch feature/payment --repo /path/to/repo

配置文件

在仓库根目录创建 .change-analyzer.yml 自定义模块映射(可选):

baseBranch: main

modules:
  - name: 用户中心
    description: 用户注册、登录、个人信息管理
    patterns:
      - src/user/**
      - src/auth/**

  - name: 支付流程
    patterns:
      - src/payment/**
      - api/payment/**

未命中任何规则的文件将按目录结构自动推断模块名。

完整示例见 example.change-analyzer.yml

环境变量

| 变量 | 说明 | 默认值 | |------|------|--------| | ANTHROPIC_API_KEY | Anthropic API 密钥 | — | | ANTHROPIC_MODEL | 使用的模型 | claude-sonnet-4-6 | | ANTHROPIC_PLATFORM | 设为 bedrock 使用 AWS Bedrock | — |

报告示例

# 回归测试范围报告

> 分支: `feature/payment` ← `main`
> 生成时间: 2026/3/13 10:00:00

## 概览

| 项目 | 数据 |
|------|------|
| 提交数量 | 12 个 |
| 变更文件 | 23 个 |
| 代码行数 | +456 / -123 |
| 影响模块 | 支付流程、用户中心、订单管理 |

## 🔴 支付流程

**风险等级:** 🔴 高

**测试点:**

- [ ] 正常支付流程(微信/支付宝/银行卡)
- [ ] 支付超时处理
- [ ] 重复支付拦截
- [ ] 退款申请与到账

License

MIT