
Opensrc
- 783 installs
- 2.9k repo stars
- Updated June 23, 2026
- vercel-labs/opensrc
The opensrc skill enables agents to fetch dependency source code into a global cache at ~/.
About
The opensrc skill enables agents to fetch dependency source code into a global cache at ~/.opensrc for reading implementations beyond types and docs. opensrc path resolves installed versions from lockfiles with --cwd support, supports npm, pypi:, crates:, and owner/repo refs with version pins, and prints absolute paths for ripgrep and cat workflows. Cache management includes list, remove, and clean subcommands per ecosystem. Agents should fetch source when debugging unexpected library behavior, verifying edge cases, or learning internal patterns, not for simple API questions answerable from docs. Bash tool scope is opensrc:* commands.
- opensrc path auto-fetches and caches dependency source.
- Supports npm, PyPI, crates.io, and GitHub repos.
- Lockfile-aware version resolution with --cwd.
- Global cache at ~/.opensrc with list and clean commands.
- Enables rg and cat against real implementation files.
Opensrc by the numbers
- 783 all-time installs (skills.sh)
- +26 installs in the week ending Jul 27, 2026 (Skillselion tracking)
- Ranked #103 of 560 CLI & Terminal skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Jul 28, 2026 (Skillselion catalog sync)
opensrc capabilities & compatibility
- Capabilities
- opensrc path auto fetches and caches dependency · supports npm, pypi, crates.io, and github repos. · lockfile aware version resolution with cwd. · global cache at ~/.opensrc with list and clean c
- Use cases
- debugging · code review
npx skills add https://github.com/vercel-labs/opensrc --skill opensrcAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 783 |
|---|---|
| repo stars | ★ 2.9k |
| Security audit | 2 / 3 scanners passed |
| Last updated | June 23, 2026 |
| Repository | vercel-labs/opensrc ↗ |
How do I apply opensrc using the workflow in its SKILL.md?
Fetch and cache npm, PyPI, crates.io, or GitHub dependency source for deep implementation debugging.
Who is it for?
Developers following the opensrc skill for the tasks it documents.
Skip if: Tasks outside the opensrc scope described in SKILL.md.
When should I use this skill?
User mentions opensrc or related triggers from the skill description.
What you get
Working opensrc setup aligned with the documented patterns and constraints.
- cached source tree at ~/.opensrc/
- opensrc path references
- implementation inspection notes
By the numbers
- Supports 4 package sources: npm, PyPI, crates.io, GitHub
- Caches clones globally at ~/.opensrc/
Files
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#mainVersion 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/projectFor 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 packagesWhen 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.
Related skills
How it compares
Pick opensrc over reading node_modules blindly when you need version-pinned source from any registry with a single CLI path.
FAQ
What does opensrc do?
Fetch and cache npm, PyPI, crates.io, or GitHub dependency source for deep implementation debugging.
When should I use opensrc?
Invoke when Fetch and cache npm, PyPI, crates.io, or GitHub dependency source for deep implementation debugging.
Is opensrc safe to install?
Review the Security Audits panel on this page before installing in production.