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

interview-prep

v2.3.1

Published

面试准备助手 - 搜索和抓取面试经验的 Claude Code Skill

Readme

面试准备助手 (Interview Prep)

Claude Code Skill - 智能搜索和抓取面试经验

NPM version License Python Claude Code

📖 简介

这是一个强大的 Claude Code Skill,能够自动搜索面试经验(面经),并批量抓取详细内容。支持智能分析模式和批量导出模式,是面试准备的好帮手!

✨ 核心功能

  • 🔍 智能搜索 - 根据关键词自动搜索面经
  • 📥 批量抓取 - 多线程并发抓取,支持断点续传
  • 🎯 智能模式 - 自动分析高频考点和面试问题
  • 💾 多格式导出 - 支持 Markdown、JSON、CSV 三种格式
  • 🔄 断点续传 - 中断后可继续,不会重复抓取
  • 🛡️ 反爬虫增强 - 随机延迟、请求头轮换、自动重试
  • 📊 进度追踪 - 实时显示抓取进度和统计信息

🚀 快速开始

方式一:通过 npm 安装(推荐)✨

# 1. 全局安装(自动安装 CLI 命令 + Claude Code Skill)
npm install -g interview-prep

# 2. 安装 Python 依赖(系统级安装)
pip install requests beautifulsoup4 lxml tqdm chardet

安装完成后,你可以:

  • ✅ 在终端使用 interview-prep 命令
  • ✅ 在 Claude Code 中直接使用 Skill(已自动安装到 ~/.claude/skills/interview-prep/

验证安装:

# 查看命令帮助
interview-prep --help

# 检查 Skill 是否已安装
ls ~/.claude/skills/interview-prep/

方式二:通过 Git 克隆

# 1. 克隆仓库
git clone https://github.com/Xmind0/interview-prep.git

# 2. 进入项目目录
cd interview-prep

# 3. 复制到 Claude Code skills 目录
cp -r skills/interviewer ~/.claude/skills/interview-prep

# 4. 安装 Python 依赖
pip install -r skills/interviewer/scripts/requirements.txt

方式三:手动安装

# 1. 下载 ZIP 并解压
unzip interview-prep.zip
cd interview-prep

# 2. 复制文件夹到 skills 目录
cp -r skills/interviewer ~/.claude/skills/interview-prep

# 3. 安装依赖
pip install -r skills/interviewer/scripts/requirements.txt

📖 使用方法

在 Claude Code 中使用

安装完成后,直接在 Claude Code 对话中使用:

帮我搜索 Java 后端面经
批量抓取 Python 面试经验,保存为 CSV 格式
分析 Go 语言的高频面试题

命令行使用(npm 安装方式)

如果你通过 npm 全局安装,可以直接使用 interview-prep 命令:

# 搜索并抓取面经
interview-prep -k "Java 面经" -p 2 -o results.md

# 搜索并导出为 JSON
interview-prep -k "Python" -o results.json --format json

# 搜索并导出为 CSV
interview-prep -k "Go 语言" -o results.csv --format csv

# 不记录日志
interview-prep -k "C++ 面经" -o results.md --no-log

注意interview-prep 命令集成了搜索和抓取功能,一步完成!

命令行使用(Git/手动安装方式)

如果你通过 Git 克隆或手动安装,可以直接运行 Python 脚本:

# 进入脚本目录
cd ~/.claude/skills/interview-prep/scripts

# 搜索面经
python search.py -k "Java 面经" -p 2 -o results.md

# 抓取内容
python scraper.py -i results.md -o interview_posts.md -t 10

# 导出为 JSON
python search.py -k "Python" -o results.json --format json

# 导出为 CSV
python scraper.py -i results.md -o posts.csv --format csv

🎯 工作模式

智能模式(Smart Mode)

适用于需要快速了解面试重点的场景:

  1. 搜索相关面经
  2. 筛选 5-10 个最相关的链接
  3. 抓取内容并深度分析
  4. 总结高频考点、具体问题和难度

示例

分析 Java 并发编程的面试重点

批量模式(Batch Mode)

适用于需要保存大量面经原文的场景:

  1. 搜索面经
  2. 批量抓取所有结果
  3. 直接导出,不进行分析

示例

批量抓取 C++ 面经,保存为 markdown

📦 依赖要求

Python 环境

  • Python >= 3.7
  • pip 包管理器

Python 依赖

requests >= 2.31.0
beautifulsoup4 >= 4.12.0
lxml >= 4.9.0
tqdm >= 4.65.0
chardet >= 5.0.0

安装命令:

pip install -r requirements.txt

🔧 高级配置

配置文件

scripts/config.json 中可以自定义配置:

{
  "search": {
    "default_pages": 2,
    "default_format": "md",
    "delay_min": 2,
    "delay_max": 5,
    "timeout": 15
  },
  "scraper": {
    "default_threads": 10,
    "default_format": "md",
    "default_retry": 3,
    "timeout": 20
  }
}

命令行参数

search.py 参数

  • -k, --keywords: 搜索关键词(支持多个)
  • -p, --pages: 搜索页数(默认 1)
  • -o, --output: 输出文件路径
  • --format: 输出格式 (md/json/csv)
  • --no-log: 禁用日志文件

scraper.py 参数

  • -i, --input: 输入文件路径
  • -o, --output: 输出文件路径
  • -t, --threads: 并发线程数(默认 10)
  • --format: 输出格式 (md/json/csv)
  • --retry: 失败重试次数(默认 3)
  • --clear-cache: 清空缓存重新开始

🛡️ 反爬虫机制

本工具内置了多重反爬虫机制:

  • ⏱️ 随机延迟:每次请求间隔 2-5 秒
  • 🎭 UA 轮换:5 种不同浏览器 User-Agent 随机切换
  • 🔄 自动重试:失败自动重试,最多 3 次
  • ⏸️ 超时控制:可配置的超时时间

注意事项

  • 避免短时间内频繁请求
  • 如果遇到验证码,请等待一段时间后再试
  • 不要同时运行多个实例

📊 输出示例

Markdown 格式

# 网页内容抓取结果

## Java 并发编程面试经验

*作者: 张三 | 发布时间: 2024-01-15*

**URL**: https://www.nowcoder.com/discuss/123456

(这里是抓取的面经内容...)

---

JSON 格式

{
  "metadata": {
    "scraped_at": "2024-01-15 10:30:00",
    "total_count": 50,
    "success_count": 48
  },
  "results": [...]
}

🐛 故障排查

问题 1: 未找到任何结果

  • 检查关键词是否正确
  • 尝试减少搜索页数
  • 查看日志文件了解详细错误

问题 2: 大量请求失败

  • 检查网络连接
  • 可能遇到反爬验证,等待一段时间后再试
  • 减少 --threads 参数值

问题 3: 依赖安装失败

# 升级 pip
python -m pip install --upgrade pip

# 使用国内镜像源
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

📝 更新日志

v2.3.0 (2025-01-24)

  • 添加 CLI 命令行工具 - interview-prep 全局命令
  • 自动安装 Skill - npm install 后自动安装到 Claude Code 目录
  • 🔧 跨平台支持(Windows/macOS/Linux)
  • 📝 优化安装文档和说明

v2.2.0 (2025-01-24)

  • ✨ 添加 CLI 命令行工具支持
  • 📦 添加 bin/interview-prep.js 入口文件
  • 🔧 优化包结构和配置

v2.0.0 (2025-01-24)

  • ✨ 添加随机延迟和请求头轮换
  • ✨ 完善日志记录系统
  • ✨ 添加重试机制和断点续传
  • ✨ 支持多种导出格式(MD/JSON/CSV)
  • ✨ 添加配置文件支持
  • ✨ 优化错误处理和 URL 验证
  • 📝 完善文档和注释

v1.0.0 (2024-12-01)

  • 🎉 初始版本发布
  • ✨ 基础搜索和抓取功能
  • ✨ 支持 Markdown 导出

🤝 贡献指南

欢迎提交 Issue 和 Pull Request!

  1. Fork 本仓库
  2. 创建特性分支 (git checkout -b feature/AmazingFeature)
  3. 提交更改 (git commit -m 'Add some AmazingFeature')
  4. 推送到分支 (git push origin feature/AmazingFeature)
  5. 开启 Pull Request

📄 开源协议

本项目采用 MIT License 开源协议。

🙏 致谢

  • 感谢各大面试交流平台提供的优质内容
  • 感谢 Claude Code 提供强大的 AI 辅助工具
  • 感谢所有贡献者的支持

📮 联系方式

⭐ Star History

如果这个项目对你有帮助,请给个 Star 支持一下!


Made with ❤️ by Claude Code

⬆ 返回顶部