一键导入
opensrc
Fetch npm package source code for implementation analysis. Use when types/docs aren't enough and you need to understand HOW a library works internally.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Fetch npm package source code for implementation analysis. Use when types/docs aren't enough and you need to understand HOW a library works internally.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | opensrc |
| description | Fetch npm package source code for implementation analysis. Use when types/docs aren't enough and you need to understand HOW a library works internally. |
| allowed-tools | ["Bash","Read","Glob","Grep"] |
Fetch npm package source code locally when you need to understand implementation details.
# Fetch package(s)
npx opensrc <package>
npx opensrc ai zod @anthropic-ai/sdk
# Check what's fetched
cat opensrc/sources.json
# Clean up when done
rm -rf opensrc/<package>
# 1. Fetch
npx opensrc ai
# 2. Check structure (many are monorepos)
ls opensrc/ai/packages/
# 3. Find what you need
grep -r "functionName" opensrc/ai/src/
# 4. Read the implementation
# (use Read tool)
# 5. Clean up
rm -rf opensrc/ai
sources.json first - don't re-fetch what's already therepackages/ directory for subpackages| Package | Structure |
|---|---|
ai | Monorepo: packages/anthropic/, packages/openai/, etc. |
@anthropic-ai/sdk | Single package: src/ |
zod | Single package: src/types/ |