opensrc

Fetches and caches installed package source code for local grep and read inspection.

Updated May 5, 2026
One-click install
npx skills add https://github.com/josippapez/ai-setup --skill opensrc-josippapez
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opensrc
Source: https://github.com/josippapez/ai-setup/tree/main/claude/plugins/dev-core/skills/opensrc
Command: npx skills add https://github.com/josippapez/ai-setup --skill opensrc-josippapez

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires opensrc.

What problem does it solve? Documentation often describes a newer version than the one installed in your project, and docs rarely reveal internal implementation details. This Skill resolves the exact installed version of an npm, PyPI, crates.io, or GitHub package to a local cached directory so you can read the real source code instead of guessing. ## Core Features & Use Cases - Version-Exact Source Lookup: Runs npx opensrc path <pkg> to download and cache the source matching the installed version, returning a local path. - Multi-Registry Support: Works with npm packages, PyPI (pypi:), crates.io (crates:), and GitHub repos (github:). - Local Exploration: Once cached, use grep -r, find, cat, or ls on the path to inspect hooks, events, option shapes, and type definitions. - Use Case: A TanStack Table option behaves unexpectedly — run grep -r "getCoreRowModel" inside the cached source path to see exactly how the installed version handles it. ## Quick Start Ask the AI to read the actual installed source of a library, for example: check how the installed version of zod implements a specific validation option using opensrc.

Frequently Asked Questions about opensrc

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I read the source code of an installed npm package?

Run `npx opensrc path <package>` to fetch and cache the source matching your installed version, which returns a local directory path. Then use grep, find, or cat on that path to inspect the implementation directly.

How to check if a library feature exists in my installed version?

Fetch the exact installed version's source with `npx opensrc path <pkg>`, then grep the returned path for the option, hook, or API name. This verifies against your version rather than newer documentation online.

Does opensrc support PyPI and crates.io packages?

Yes, opensrc supports PyPI via `npx opensrc path pypi:<package>` and crates.io via `npx opensrc path crates:<crate>`. It also supports GitHub repositories using the `github:<owner>/<repo>` prefix.

opensrc vs context7 for library documentation?

context7 provides documentation, while opensrc fetches the actual source code of the exact installed version. Prefer opensrc when you need source-level detail like internal hooks, event handling, or option shapes that docs omit.

Why suppress stderr when using opensrc in a subshell?

The npx command prints install noise to stderr, which can pollute command substitution output. Append `2>/dev/null` inside `$()` so only the clean cached path is captured for use in grep or ls commands.