
Opensrc
- 5 installs
- 5 repo stars
- Updated August 5, 2026
- bjornmelin/dev-skills
Opensrc is a Claude Code skill that fetches and inspects a dependency's local source via the opensrc CLI when docs and types are not enough.
About
Opensrc is a Claude Code skill that inspects the actual source code of a dependency using the opensrc CLI instead of relying only on docs and types. A developer invokes it when behavior, migration risk, or implementation internals matter, using commands like opensrc path and git diff between pinned versions. It supports npm, PyPI, crates.io, and Git repo sources and includes a dependency upgrade-audit workflow.
- Pulls dependency and upstream source locally via the opensrc CLI for implementation-level inspection
- Supports npm, PyPI, crates.io, and repo specs with pinned version diffs
- Adds an upgrade-audit workflow that compares current vs target package versions
Opensrc by the numbers
- 5 all-time installs (skills.sh)
- Ranked #441 of 596 Debugging skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
opensrc capabilities & compatibility
Free; only needs the opensrc CLI, with optional GITHUB_TOKEN/GITLAB_TOKEN/BITBUCKET_TOKEN for private repos.
- Capabilities
- dependency audit · source inspection · version diff
- Works with
- github · gitlab · bitbucket
- Use cases
- refactoring · debugging · research
- Pricing
- Free
What opensrc says it does
Use this skill when source-level dependency inspection materially changes the answer. Prefer docs and types first; pull source when behavior, migration risk, or implementation details matter.
Use `opensrc path` when the next command needs a filesystem path:
For npm/Bun dependency upgrades, if this helper exists, use it as the fast inventory layer before deeper source reasoning:
npx skills add https://github.com/bjornmelin/dev-skills --skill opensrcAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 5 |
|---|---|
| repo stars | ★ 5 |
| Last updated | August 5, 2026 |
| Repository | bjornmelin/dev-skills ↗ |
What it does
Inspect a dependency's real source when docs and types cannot answer a behavior or migration question.
Who is it for?
Source-level dependency inspection, migration-risk analysis, and package upgrade audits across npm, PyPI, and crates.
Skip if: Broad web research, release-note summaries, or simple API usage that official docs already resolve.
When should I use this skill?
Source-level dependency inspection materially changes the answer about behavior or migration.
What you get
Resolved current and target versions, exact local source paths used, and whether source inspection changed the conclusion.
- resolved current and target versions
- exact local source paths
- hard-cut migration brief and verification checklist
By the numbers
- 4 package spec ecosystems supported (npm, PyPI, crates.io, repos)
- 3 private-repo auth tokens (GITHUB_TOKEN, GITLAB_TOKEN, BITBUCKET_TOKEN)
Files
Opensrc
Use this skill when source-level dependency inspection materially changes the answer. Prefer docs and types first; pull source when behavior, migration risk, or implementation details matter.
Core Workflow
1. Read the repo AGENTS.md and inspect relevant manifests and lockfiles. 2. Use the global opensrc binary. Fall back to bunx opensrc only if the binary is unavailable. 3. Use opensrc fetch when the goal is cache-only prep:
opensrc fetch --cwd <repo-root> zod react next
opensrc fetch <pkg>@<current_version> <pkg>@<target_version>4. Use opensrc path when the next command needs a filesystem path:
rg "pattern" "$(opensrc path zod)"
cat "$(opensrc path zod)"/src/types.ts
find "$(opensrc path pypi:requests)" -name "*.py"
git diff --no-index "$(opensrc path <pkg>@<current>)" "$(opensrc path <pkg>@<target>)"5. Cite exact versions and local source paths when source evidence affects the recommendation. 6. Use web/docs sources for release notes, API references, changelogs, and migration guides; use opensrc for implementation internals and source diffs.
Version Guardrails
opensrc0.7.x caches globally at~/.opensrc/;OPENSRC_HOMEoverrides it.- The cache key includes the resolved package version or repo ref. The main risk
is incorrect version resolution before fetch, not the global cache itself.
- For npm packages, current upstream resolution checks
node_modules, then
package-lock.json, pnpm-lock.yaml, yarn.lock, then package.json.
- In Bun or workspace repos, use the workspace root as
--cwdby default. If
node_modules may be stale, pin versions explicitly.
- For upgrade work or ambiguity, inspect pinned versions:
opensrc path pkg@current_version
opensrc path pkg@target_versionSupported Specs
- npm:
zod,npm:zod - PyPI:
pypi:requests,pip:requests,python:requests - crates.io:
crates:serde,cargo:serde,rust:serde - repos:
owner/repo,github:owner/repo,gitlab:owner/repo,
bitbucket:owner/repo, or full URLs
- pinned refs:
pkg@version,owner/repo@tag,owner/repo#branch - private repo auth:
GITHUB_TOKEN,GITLAB_TOKEN,BITBUCKET_TOKEN
Upgrade Audits
For npm/Bun dependency upgrades, if this helper exists, use it as the fast inventory layer before deeper source reasoning:
deps-workbench upgrade-prep --cwd <repo-root> --package <pkg> --out <tmp.json>
deps-workbench report --input <tmp.json> --format mdThen compare current and target with official docs plus pinned source paths. Prefer package-native capabilities, delete obsolete wrappers/shims/adapters, and avoid dual-shape compatibility unless a real boundary requires it.
References
- Read
references/opensrc-cli-reference.mdfor exact CLI surface, cache model,
supported spec forms, auth env vars, and release deltas.
- Read
references/dependency-upgrade-audit.mdfor package upgrade, migration,
current-versus-target, or hard-cut audits.
Do Not Use For
- broad web research that does not require source inspection
- release-note summaries where docs alone answer the question
- simple API usage questions that types and official docs already resolve
Output
Include the resolved current and target versions, exact local source paths used, and whether source inspection changed the conclusion. For upgrade work, include a concise hard-cut migration brief and verification checklist.
interface:
display_name: "Opensrc"
short_description: "Inspect dependency source and upgrade diffs"
default_prompt: "Use $opensrc to prewarm cache state with opensrc fetch when helpful, resolve exact source paths with opensrc path, inspect current source, and compare it against a target or latest version before recommending a hard-cut migration."
policy:
allow_implicit_invocation: true
Dependency Upgrade Audit
Use this workflow when the task is to analyze a package upgrade deeply and produce a migration brief that enables a hard-cut integration in the host repo.
Goal
Compare the repo's current dependency version against a target or latest version using:
- official docs and API references
- release notes and changelogs
- upstream source for both versions
- a deep audit of how the host repo currently uses the package
The output should make it obvious what to change, what to delete, and what new native package capabilities should replace repo-owned code.
Workflow
If /home/bjorn/.codex/skill-support/bin/deps-workbench exists and the package is in the Bun/npm lane, start with:
tmp_json="$(mktemp)"
deps-workbench upgrade-prep --cwd <repo-root> --package <pkg> --out "$tmp_json"
deps-workbench report --input "$tmp_json" --format mdUse that output as the fast inventory layer, then continue with the deeper source, docs, and migration reasoning below.
1. Establish Current Repo State
1. Read the repo's manifests and lockfiles. 2. Identify the currently declared version. 3. Resolve the current source with:
opensrc path <pkg> --cwd <repo-root>4. Verify the returned version from the path or metadata. 5. In Bun repos, assume stale node_modules can mislead resolution. If there is any ambiguity, pin explicitly instead of trusting auto-detect.
2. Establish Target State
1. Identify the target version or latest release from official sources. 2. Read the package's:
- docs
- changelog
- release notes
- migration guide
- API reference
3. If the package lives in a monorepo, locate the real package subtree before comparing source.
3. Fetch Both Source Trees Explicitly
Always pin both versions for upgrade analysis.
opensrc fetch <pkg>@<current_version> <pkg>@<target_version>
opensrc path <pkg>@<current_version>
opensrc path <pkg>@<target_version>If you do not need cache warmup as a separate step, opensrc path alone is still sufficient because it fetches on cache miss.
For repos:
opensrc fetch owner/repo@tag owner/repo#branch
opensrc path owner/repo@tag
opensrc path owner/repo#branch4. Diff and Inspect the Upstream Source
Use direct tree and file comparison:
git diff --no-index "$(opensrc path <pkg>@<current>)" "$(opensrc path <pkg>@<target>)"Then inspect surgically with:
rgfor renamed or removed APIs- direct file reads for changed entrypoints
- tests to infer behavioral changes
- README/docs in the source tree to cross-check declared behavior
Look for:
- removed exports
- renamed imports
- changed configuration shapes
- new runtime requirements
- deprecated APIs
- moved package entrypoints
- newly added package-native capabilities
Host Repo Audit
Search the host repo for all package touchpoints:
- imports
- wrappers
- config files
- adapters
- polyfills
- custom code that overlaps with package capabilities
- tests that encode now-obsolete package behavior
Ask:
- What custom repo code exists only because the older package lacked a feature?
- What package-native capability now replaces that custom code?
- What deprecated or removed APIs are still in use?
- What compatibility branches can be deleted in a hard-cut migration?
Hard-Cut Rules
Default to one canonical target shape.
- Prefer package-native capabilities over repo-owned custom code.
- Delete obsolete wrappers, shims, adapters, and compatibility helpers.
- Do not preserve dual-shape integrations unless there is a real external
boundary that requires it.
- Update tests and fixtures to the new canonical package behavior only.
- If a real compatibility boundary exists, name the exact file and reason.
Required Output Format
Return a concise report with these sections:
Current and Target
- current declared version
- current resolved source version
- target version
- exact source paths used
Sources Consulted
- official docs
- changelog or release notes
- upstream source paths
- host repo files searched
Breaking or Material Changes
- removed or changed APIs
- behavior changes
- config or runtime changes
- migration-sensitive edge cases
New Capabilities to Adopt
List package-native capabilities in the target version that should replace custom repo code or reduce maintenance.
Obsolete Repo Code to Delete
Call out wrappers, helpers, adapters, or legacy config that should be removed in a hard-cut integration.
Required Changes
- import changes
- config changes
- runtime changes
- test updates
- docs updates
Migration Checklist
Provide a short, actionable checklist for implementing the upgrade.
Verification Checklist
List the commands or checks needed to prove the migration is complete.
Unknowns
Mark anything that could not be confirmed as UNVERIFIED.
Operating Notes
- Prefer the repo root for
--cwdin workspaces. - In Bun repos, explicitly verify resolved versions before analysis.
- Use opensrc for code, not as a substitute for official migration docs.
- If latest is risky or unstable, compare current against the exact intended
target version instead of defaulting to latest.
- Do not over-automate the final migration decision. The helper is for prep, not
for replacing source interpretation, API review, or hard-cut reasoning.
Opensrc CLI Reference
This file captures the current opensrc 0.7.x command surface and the cache model that replaced the older project-local workflow.
Canonical Baseline
- Local binary verified in this session:
opensrc 0.7.2 - Architectural cutover:
v0.7.0 - Current patch baseline:
v0.7.2
Command Surface
opensrc fetch
Cache-prewarm command. Use when you want sources downloaded without printing paths.
opensrc fetch zod
opensrc fetch --cwd /path/to/project zod react next
opensrc fetch <pkg>@<current_version> <pkg>@<target_version>
opensrc fetch bitbucket:workspace/private-repoOptions:
--cwd <path>: working directory for lockfile version resolution--quiet/-q: suppress progress output
opensrc path
Primary composition command. Prints the absolute path to source and fetches on cache miss.
opensrc path zod
opensrc path pypi:requests
opensrc path crates:serde
opensrc path vercel/next.js
rg "parse" $(opensrc path zod)
cat $(opensrc path zod)/src/types.ts
find $(opensrc path pypi:requests) -name "*.py"
git diff --no-index "$(opensrc path <pkg>@<current_version>)" "$(opensrc path <pkg>@<target_version>)"Options:
--cwd <path>: working directory for lockfile version resolution--verbose: show fetch progress
Multiple specs print one path per line:
opensrc path zod react next
opensrc path pypi:requests pypi:flask
opensrc path crates:serde crates:tokioopensrc list
Lists the global cache index.
opensrc list
opensrc list --jsonopensrc remove
Removes one or more cached entries. rm is an alias.
opensrc remove zod
opensrc remove pypi:requests
opensrc remove vercel/ai
opensrc rm github:owner/repoopensrc clean
Removes cache contents by category.
opensrc clean
opensrc clean --packages
opensrc clean --repos
opensrc clean --npm
opensrc clean --pypi
opensrc clean --cratesSupported Spec Forms
Documented/current forms:
- npm:
zod - npm alias:
npm:zod - PyPI:
pypi:requests - PyPI aliases:
pip:requests,python:requests - crates.io:
crates:serde - crates.io aliases:
cargo:serde,rust:serde - GitHub shorthand:
owner/repo - explicit hosts:
github:owner/repo,gitlab:owner/repo,bitbucket:owner/repo - full repo URLs
- package version pins:
zod@4.3.6,pypi:flask@3.0.0 - repo refs:
owner/repo@v1.0.0,owner/repo#main
Cache Model
opensrc 0.7.x uses a global cache, not a project-local opensrc/ folder.
Default root:
~/.opensrc/Override:
export OPENSRC_HOME=/custom/cache/pathTypical layout:
~/.opensrc/
├── repos/
│ └── github.com/
│ └── owner/
│ └── repo/
│ └── version-or-ref/
└── sources.jsonThe cache key includes the resolved version or ref. Different repos can safely use different cached versions at the same time.
Version Resolution
Upstream code currently resolves npm-family package versions in this order:
1. node_modules/<pkg>/package.json 2. package-lock.json 3. pnpm-lock.yaml 4. yarn.lock 5. package.json
Implications:
- The main failure mode is stale local install state, not the global cache.
- In Bun repos, stale
node_modulescan win before any lockfile parsing. - Use the repo root as
--cwdby default in workspaces. - Verify the returned path/version before trusting the result.
- For upgrade or migration work, pin both versions explicitly.
Documented vs Observed
Documented:
- npm lockfile and install detection only mention
node_modules,
package-lock.json, pnpm-lock.yaml, yarn.lock, and package.json.
Observed in upstream v0.7.2 source:
- version resolution was substantially rewritten for pnpm workspaces and Yarn
workspace/protocol edge cases
- transitive pnpm resolution now has dedicated fixture coverage
- workspace/link/file/git protocol specs are explicitly filtered so they do not
get treated as registry versions
Observed in this session:
opensrc path react --cwd /home/bjorn/repos/signrresolved19.2.0opensrc path zod --cwd /home/bjorn/repos/signrresolved4.3.6
Interpretation:
- opensrc can still work correctly in Bun workspaces when
node_modulesis
current.
- Do not claim documented
bun.locksupport unless upstream docs/code say so.
Auth and Environment
Current repo-auth environment variables:
GITHUB_TOKENGITLAB_TOKENBITBUCKET_TOKENOPENSRC_HOME
Do not use the older provider-specific legacy token variable names from the pre-0.7 workflow.
Release Deltas That Matter
v0.7.0
- Rust rewrite with native binary
- global cache at
~/.opensrc/ opensrc pathas the primary command- docs site added at
opensrc.sh - repo reorganized into CLI plus docs monorepo
- cross-platform binary releases
v0.7.1
- private repo support documented around standard
GITHUB_TOKENand
GITLAB_TOKEN
removeaccepts the same repo formats as the fetch/path-facing specs
v0.7.2
- dedicated
opensrc fetchsubcommand for cache-only workflows - Bitbucket Cloud repo support plus
BITBUCKET_TOKEN - auth docs page covering GitHub, GitLab, and Bitbucket tokens
- pnpm workspace and transitive lockfile parser rewrite
- Yarn workspace/protocol edge-case coverage
- upstream official skill moved to top-level
skills/opensrc/
Operational Rules
- Prefer
opensrc pathwhen the next step composes the resolved path with shell
tools.
- Prefer
opensrc fetchwhen you only need the cache primed for CI, scripts,
or multi-version prep.
- Prefer direct
opensrcinvocation. Usebunx opensrconly as a fallback. - For current-versus-target analysis, pin both versions explicitly. Optional:
prewarm with opensrc fetch <pkg>@<current> <pkg>@<target> before diffing.
- Use web/docs sources for official changelogs and API contracts.
- Use opensrc for implementation internals and tree diffs.
- Do not claim documented
bun.locksupport unless upstream docs/code say so.
Related skills
FAQ
When should I use opensrc instead of reading docs?
Use it when behavior, migration risk, or implementation internals matter; prefer docs and types first and pull source only when it changes the answer.
Which package ecosystems does opensrc support?
npm, PyPI, crates.io, and Git repos (GitHub, GitLab, Bitbucket), including pinned versions, tags, and branches.