O

opensrc

by @vercel-labsv
4.3(120)

このスキルは opensrc コマンドを使い、npm/PyPI/crates.io パッケージや GitHub リポジトリのソースコードを即座に取得・キャッシュし、AIエージェントが型やドキュメントだけでなく実装の詳細を直接読めるようにします。ライブラリの予期しない動作のデバッグ、エッジケースの検証、有名プロジェクトの設計パターン学習などに最適で、調査時間を大幅に短縮します。

source-codedependencyclicachecode-readingGitHub
インストール方法
npx skills add https://github.com/vercel-labs/opensrc --skill opensrc
compare_arrows

Before / After 効果比較

1 组
使用前

開発者やAIエージェントがライブラリの想定外の動作を調査する際、リポジトリの探索、バージョンタグの確認、アーカイブのダウンロード、ファイルの展開を手作業で行う必要があり、平均約60分かかっていた。バージョン不一致により誤判断するリスクもあった。

使用後

このスキルはロックファイルから正確なバージョンを自動解決し、ソースをキャッシュして、ワンコマンドで正しいパスを返す。実装をすぐに読めるようになり、調査時間は平均10分未満に短縮される。

SKILL.md

Source Code Fetching with opensrc

Fetches dependency source code so agents can read implementations, not just types. Clones repositories at the correct version tag and caches them globally at ~/.opensrc/.

Core Pattern

rg "parse" $(opensrc path zod)
cat $(opensrc path zod)/src/types.ts
find $(opensrc path zod) -name "*.test.ts"

opensrc path <pkg> prints the absolute path to cached source. If not cached, it fetches automatically. Progress goes to stderr, path to stdout, so $(opensrc path ...) works in subshells.

Fetching Source Code

opensrc path zod
opensrc path pypi:requests
opensrc path crates:serde
opensrc path facebook/react

# Multiple packages at once
opensrc path zod react next
opensrc path pypi:requests pypi:flask
opensrc path crates:serde crates:tokio

# Specific versions
opensrc path zod@3.22.0
opensrc path pypi:flask@3.0.0
opensrc path owner/repo@v1.0.0
opensrc path owner/repo#main

Version Resolution

For npm packages, opensrc auto-detects the installed version from lockfiles (package-lock.json, pnpm-lock.yaml, yarn.lock). Use --cwd to resolve from a different project:

opensrc path zod --cwd /path/to/project

For PyPI and crates.io, explicit versions or latest are used. For repos, use @ref or #ref to pin a branch, tag, or commit.

Managing the Cache

Source is cached globally at ~/.opensrc/ (override with OPENSRC_HOME).

opensrc list                     # show all cached sources
opensrc list --json              # JSON output

opensrc remove zod               # remove a package
opensrc remove facebook/react    # remove a repo

opensrc clean                    # remove everything
opensrc clean --npm              # only npm packages
opensrc clean --pypi             # only PyPI packages
opensrc clean --crates           # only crates.io packages
opensrc clean --packages         # all packages, keep repos
opensrc clean --repos            # all repos, keep packages

When to Fetch Source

Fetch source when you need to:

  • Understand internal behavior that types don't reveal
  • Debug unexpected library behavior
  • Learn patterns from well-known implementations
  • Verify how a function handles edge cases

Don't fetch source for simple API usage questions that docs or types can answer.

ユーザーレビュー (0)

レビューを書く

効果
使いやすさ
ドキュメント
互換性

レビューなし

統計データ

インストール数2.1K
評価4.3 / 5.0
バージョン
更新日2026年10月22日
比較事例1 件

ユーザー評価

4.3(120)
5
37%
4
43%
3
13%
2
5%
1
2%

この Skill を評価

0.0

対応プラットフォーム

🤖claude-code

タイムライン

作成2026年9月6日
最終更新2026年10月22日
🎁 Agent 知識カード
アンケート