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

@yanlaosi/claude-init

v0.1.1

Published

AI-powered project initializer that reads product docs and generates CLAUDE.md

Readme

claude-project-init

AI-powered project initializer: reads your product docs and generates a perfect CLAUDE.md

AI 驱动的项目初始化工具:读取产品文档,自动生成完美的 CLAUDE.md

Features / 功能特性

  • 📄 多格式文档支持 — Markdown、PDF、URL、纯文本
  • 🤖 AI 智能分析 — 自动识别项目类型、架构和技术需求
  • 🛠 交互式技术栈选择 — 根据项目需求推荐并让你选择最佳技术方案
  • 🔌 MCP Servers 自动匹配 — 根据项目特征推荐相关的 MCP 服务器配置
  • Claude Skills 推荐 — 推荐适合项目的 Claude Skills
  • 📋 完整 CLAUDE.md 生成 — 一键生成包含项目规范、技术栈、MCP 配置的 CLAUDE.md

Quick Start / 快速开始

# 使用 npx 直接运行(无需安装)
npx claude-project-init ./docs/prd.md

# 或者全局安装
npm install -g claude-project-init
claude-project-init ./docs/prd.md

Installation / 安装

npm install -g claude-project-init

要求 Node.js >= 18.0.0。

Usage / 使用方式

基本用法

# 从本地 Markdown 文件生成
claude-project-init ./path/to/prd.md

# 从 URL 读取文档
claude-project-init https://example.com/product-spec.html

# 指定输出目录
claude-project-init ./prd.md --output ./my-project

# 跳过交互确认(使用默认推荐)
claude-project-init ./prd.md --yes

# 详细输出模式
claude-project-init ./prd.md --verbose

命令选项

| 选项 | 说明 | 默认值 | |------|------|--------| | <input> | 输入文档路径或 URL | (必填) | | -o, --output <dir> | 输出目录 | 当前目录 | | -y, --yes | 跳过交互确认 | false | | -v, --verbose | 详细输出 | false |

Supported Formats / 支持的文档格式

| 格式 | 扩展名 | 说明 | |------|--------|------| | Markdown | .md, .markdown | 推荐格式,支持标题层级解析 | | PDF | .pdf | 自动提取文本内容 | | HTML | .html, .htm | 支持本地文件和远程 URL | | 纯文本 | .txt | 基础文本解析 |

How It Works / 工作原理

产品文档 → 文档解析 → AI 分析 → 交互式选择 → CLAUDE.md 生成
   │           │          │           │              │
   │      解析文档结构   识别项目类型   用户确认/调整   输出最终文件
   │      提取关键信息   推荐技术栈     选择技术方案
   │                    匹配 MCP      配置 MCP/Skills
   └─ .md/.pdf/.html/.txt
  1. 文档解析: 读取并解析产品需求文档,提取标题、章节和关键信息
  2. AI 分析: 使用 Claude API 分析文档内容,识别项目类型、功能需求和技术要求
  3. 技术栈推荐: 基于分析结果,推荐前端、后端、数据库等技术方案
  4. MCP 匹配: 根据项目类型和技术栈,自动匹配相关的 MCP Servers
  5. 交互式确认: 以交互式界面展示推荐方案,用户可选择或调整
  6. 生成输出: 根据最终配置生成完整的 CLAUDE.md 文件

Example / 示例

输入一个在线书店系统的产品文档:

claude-project-init ./examples/sample-prd.md

生成的 CLAUDE.md 包含:

  • 项目概述和技术栈表格
  • 推荐的项目目录结构
  • 开发规范(代码风格、命名规范、Git 工作流)
  • 核心功能模块说明
  • MCP Servers 配置(JSON 格式,可直接使用)
  • 推荐的 Claude Skills
  • 非功能需求和环境变量模板

查看完整示例: examples/sample-CLAUDE.md

Configuration / 配置

环境变量

# 必需:Anthropic API Key
export ANTHROPIC_API_KEY=your-api-key-here

Anthropic Console 获取 API Key。

Development / 开发

# 克隆项目
git clone https://github.com/anthropics/claude-project-init.git
cd claude-project-init

# 安装依赖
npm install

# 开发模式运行
npm run dev -- ./examples/sample-prd.md

# 构建
npm run build

# 运行测试
npm test

# 代码检查
npm run lint

Project Structure / 项目结构

claude-project-init/
├── src/
│   ├── core/              # 核心模块
│   │   └── document-parser.ts   # 文档解析器
│   ├── matchers/          # 匹配引擎
│   │   └── mcp-matcher.ts      # MCP/Skills 匹配
│   ├── generators/        # 生成器
│   │   └── claude-md-generator.ts  # CLAUDE.md 生成
│   ├── types/             # TypeScript 类型定义
│   │   └── index.ts
│   └── bin/               # CLI 入口
│       └── claude-project-init.ts
├── data/                  # 静态数据
│   └── mcp-registry.json       # MCP 服务器注册表
├── tests/                 # 测试
│   ├── unit/              # 单元测试
│   └── integration/       # 集成测试
├── examples/              # 示例文件
│   ├── sample-prd.md      # 示例产品文档
│   └── sample-CLAUDE.md   # 示例输出
├── package.json
├── tsconfig.json
└── README.md

Contributing / 贡献

欢迎贡献代码!请遵循以下步骤:

  1. Fork 本仓库
  2. 创建功能分支 (git checkout -b feature/amazing-feature)
  3. 提交更改 (git commit -m 'feat: add amazing feature')
  4. 推送到分支 (git push origin feature/amazing-feature)
  5. 创建 Pull Request

开发规范

  • 提交信息遵循 Conventional Commits
  • 确保所有测试通过 (npm test)
  • 新功能需附带测试用例
  • 代码通过 ESLint 检查 (npm run lint)

License / 许可证

MIT