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

wits-spec-generator

v1.1.6

Published

MCP工具调用与规格文档生成器 - 根据MCP返回的模块树数据生成规格文档

Readme

MCP规格文档生成器

通过devOpsMcp获取模块树数据,在当前目录下生成规格文档。

安装

npm install -g wits-spec-generator

使用方法

基本命令

wits-spec-generator <systemCode> [--overwrite]

参数说明:

| 参数 | 说明 | |------|------| | <systemCode> | 系统标识,支持 system_id(纯数字)或 system_code(如 devp) | | [--overwrite] | 可选,覆盖已存在的规格文档 |

systemCode 格式

支持两种 MCP 资源 URI 格式:

| 格式 | 示例 | 说明 | |------|------|------| | system_id | 1625134176272015363 | 纯数字系统ID | | system_code | devpstaff | 系统代码 |

使用示例

# 使用 system_code 生成规格文档
wits-spec-generator devp

# 使用 system_id 生成规格文档
wits-spec-generator 1625134176272015363

# 覆盖已存在的文档重新生成
wits-spec-generator devp --overwrite

# 生成员工系统规格
wits-spec-generator staff --overwrite

常见系统代码

| system_code | 系统 | |-------------|------| | devp | 开发平台 | | staff | 资源中心 |

生成的文档结构

当前目录/
└── {根模块code}_spec/                # 规格文档目录
    ├── {根模块code}_tree_overview.md # 模块树概览文档
    └── {根模块code}/                 # 根模块目录
        ├── {根模块code}_spec.md     # 根模块规格文档
        └── {子模块code}/            # 子模块目录
            └── {子模块code}_spec.md

示例

D:\Project\
└── staff_spec/                       # 自动根据根模块code命名
    ├── staff_tree_overview.md
    └── staff/
        ├── staff_spec.md
        ├── base/
        │   └── base_spec.md
        └── emp/
            └── emp_spec.md

生成的规格文档格式

# {模块名称}

**生成时间**: 2026-04-22 15:30:00
**说明**: 本文档仅包含描述完整的功能,描述不完整的功能已记录到问题清单。

---

# 一、功能清单
| 序号  | 功能描述                                         | 完成状态 |
| ---- | ------------------------------------------------ | -------- |
| 1    | [功能待补充] | 未完成   |

---

# 二、处理过程

{处理过程内容}

工作流程

  1. 连接 devOpsMcp 服务器
  2. 获取模块树数据
  3. 根据根模块code自动命名规格文档目录 {code}_spec
  4. 递归创建目录并生成规格文档
  5. 生成模块树概览文档

故障排查

MCP连接失败

检查 devOpsMcp 服务是否正常运行

无模块数据返回

  • 确认 systemCode 对应的系统有模块数据
  • 尝试使用另一种格式(system_id 或 system_code)

文档生成失败

  • 检查当前目录是否存在且可写
  • 确认模块数据中包含必要字段(code、name)