opensrc/SKILL.md
Fetch dependency source code to give AI agents deeper implementation context. Use for library internals, dependency debugging, and real implementation review. Skip simple API docs; route multi-repo work to librarian or context7.
npx skillsauth add sanurb/skills opensrcInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Fetch cached dependency source fast, then inspect real implementation files instead of guessing from types or docs.
opensrc path <spec> before reading dependency files. Do not guess cache locations."$(opensrc path ...)" in shell composition so spaces and multiple outputs stay correct.Return these facts in the final answer:
opensrc pathrg 'discriminatedUnion' "$(opensrc path zod --cwd /repo)"
find "$(opensrc path @tanstack/react-query --cwd /repo)" -maxdepth 2 -type f
cat "$(opensrc path vercel/ai)/packages/ai/core/generate-text.ts"
Use opensrc path ... as the composition primitive. It prints the absolute cache path to stdout and sends progress to stderr, so shell composition stays clean.
One spec returns one absolute path. Multiple specs return one absolute path per output line.
Read files, search directories, and join shell pipelines from that path instead of teaching the agent a separate cache layout.
When opensrc-mcp is available as an MCP server, prefer it for batch operations and structural search. The agent sends JS to the server, the server reads cached source locally, and source trees stay out of agent context. Read references/mcp-usage.md for the MCP pattern.
opensrc path zod --cwd /repo
opensrc path [email protected]
opensrc path pypi:[email protected]
opensrc path crates:[email protected]
opensrc path vercel/ai
opensrc path vercel/ai#main
opensrc path react @tanstack/react-query pypi:fastapi
Use @version to pin package versions. Use @tag, @commit, or #branch for direct repo refs.
Run opensrc path <package> --cwd <project> to resolve the installed version from the target project. npm resolution uses the target directory, not the current shell directory.
Resolution order:
node_modules/<pkg>/package.jsonpackage-lock.jsonpnpm-lock.yamlyarn.lockpackage.jsonCache lives in ~/.opensrc/. Override it with OPENSRC_HOME.
opensrc list
opensrc list --json
opensrc remove zod vercel/ai
opensrc clean --packages
opensrc clean --repos
OPENSRC_HOME=/tmp/opensrc opensrc path zod --cwd /repo
Fetch source when:
Do not fetch source when:
Read references/cli-usage.md for command reference, flags, JSON output, and environment variables. Read references/mcp-usage.md for MCP execution, server-side source access, and naming behavior. Read references/architecture.md for cache layout, registry resolution, and failure behavior. Read references/registry-support.md for registry prefixes, repo refs, and host-specific quirks.
development
Sets up an `## Agent skills` block in AGENTS.md/CLAUDE.md and `docs/agents/` so the engineering skills know this repo's issue tracker (GitHub, GitLab, fp, or local markdown), triage label vocabulary, and domain doc layout. Run before first use of `fp-plan`, `fp-implement`, `fp-review`, `to-issues`, `to-prd`, `triage`, `diagnose`, `tdd`, `improve-codebase-architecture`, or `zoom-out` — or if those skills appear to be missing context about the issue tracker, triage labels, or domain docs.
development
Build a throwaway prototype to flush out a design before committing to it. Routes between two branches — a runnable terminal app for state/business-logic questions, or several radically different UI variations toggleable from one route. Use when the user wants to prototype, sanity-check a data model or state machine, mock up a UI, explore design options, or says "prototype this", "let me play with it", "try a few designs".
tools
Control herdr (a terminal-native agent multiplexer) from inside it. Manage workspaces and tabs, split panes, spawn sibling agents, read pane output, and wait for state changes — all via CLI commands that talk to the running herdr instance over a local unix socket. Use when running inside herdr (HERDR_ENV=1). Do not use outside herdr.
documentation
Compact the current conversation into a handoff document for another agent to pick up.