opensrc
Skill8 starsChanged 2 months agoMITView on GitHub
Fetch source code for npm, PyPI, or crates.io packages and GitHub/GitLab repos to provide AI agents with implementation context beyond types and docs. Use when needing to understand how a library works internally, debug dependency issues, or explore package implementations.
- Installs packages
9 other projects use a version of this.
Adopted by
Most recently taken up by
- umararshad4/honey-stacktheir own version, first seen Nov 1, 2026
- deadlock-mod-manager/deadlock-mod-managerword for word, first seen Oct 8, 2026
- remorses/kimakitheir own version, first seen Oct 8, 2026
- dork-labs/dorkostheir own version, first seen Sep 26, 2026
- canvascoding/canvas-notebooktheir own version, first seen Aug 27, 2026
- nitikeshq/skillstheir own version, first seen May 22, 2026
Other versions9 projects use a version of this.
Word for word · 1
- deadlock-mod-manager/deadlock-mod-manager★ 584100% same
Edited · 0
None found.
Wrote their own version · 8
- vercel-labs/opensrc★ 3ksame name
- remorses/kimaki★ 1.4ksame name
- s-hiraoku/synapse-a2a★ 17same name
- canvascoding/canvas-notebook★ 12same name
- dork-labs/dorkos★ 11same name
- umararshad4/honey-stack★ 5same name
- huangzida/skills★ 2same name
- nitikeshq/skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository33 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .deepsec/AGENTS.mdAGENTS.md
- .cursor/rules/010-workflow.mdcCursor rule
- .cursor/rules/020-codebase-structure.mdcCursor rule
- .cursor/rules/030-coding-style.mdcCursor rule
- .cursor/rules/031-never-use-any.mdcCursor rule
- .cursor/rules/032-import-rules.mdcCursor rule
- .cursor/rules/050-testing.mdcCursor rule
- .cursor/rules/070-comments-defensive-programming.mdcCursor rule
- .cursor/rules/080-ai-interaction.mdcCursor rule
- .cursor/rules/090-changesets.mdcCursor rule
- .cursor/rules/095-calldiff.mdcCursor rule
- .cursor/rules/990-cursor-rule-editing-workaround.mdcCursor rule
- .cursor/rules/999-mdc-format.mdcCursor rule
- adversarial-reviewSkill
- agent-browserSkill
- calldiffSkill
- changesetSkill
- commitSkill
- deslopSkill
- fix-prSkill
- git-conventionsSkill
- humanizerSkill
- improve-codebase-architectureSkill
- logging-best-practicesSkill
- rebaseSkill
- recomposing-commitsSkill
- security-reviewSkill
- show-meSkill
- simplifySkill
- thermo-nuclear-code-quality-reviewSkill
- wait-whatSkill
- writing-for-agentsSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 51
After fetching, sources stored in opensrc/ directory:
- Very specific: line 71
Use --modify or --modify=false to skip prompt.
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
opensrc
CLI tool to fetch source code for packages/repos, giving AI coding agents deeper implementation context.
When to Use
- Need to understand how a library/package works internally (not just its interface)
- Debugging issues where types alone are insufficient
- Exploring implementation patterns in dependencies
- Agent needs to reference actual source code of a package
Quick Start
# Install globally or use npx
npm install -g opensrc
# Fetch npm package (auto-detects installed version from lockfile)
npx opensrc zod
# Fetch from other registries
npx opensrc pypi:requests # Python/PyPI
npx opensrc crates:serde # Rust/crates.io
# Fetch GitHub repo directly
npx opensrc vercel/ai # owner/repo shorthand
npx opensrc github:owner/repo # explicit prefix
npx opensrc https://github.com/colinhacks/zod # full URL
# Fetch specific version/ref
npx opensrc zod@3.22.0
npx opensrc owner/repo@v1.0.0Commands
| Command | Description |
opensrc <packages...> | Fetch source for packages/repos |
opensrc list | List all fetched sources |
opensrc remove <name> | Remove specific source |
opensrc clean | Remove all sources |
Output Structure
After fetching, sources stored in opensrc/ directory:
opensrc/
├── settings.json # User preferences
├── sources.json # Index of fetched packages/repos
└── repos/
└── github.com/
└── owner/
└── repo/ # Cloned source codeFile Modifications
On first run, opensrc prompts to modify:
.gitignore- addsopensrc/to ignore listtsconfig.json- excludesopensrc/from compilationAGENTS.md- adds section pointing agents to source code
Use --modify or --modify=false to skip prompt.
Key Behaviors
- Version Detection - For npm, auto-detects installed version from
node_modules,package-lock.json,pnpm-lock.yaml, oryarn.lock - Repository Resolution - Resolves package to its git repo via registry API, clones at matching tag
- Monorepo Support - Handles packages in monorepos via
repository.directoryfield - Shallow Clone - Uses
--depth 1for efficient cloning, removes.gitafter clone - Tag Fallback - Tries
v{version},{version}, then default branch if tag not found
Common Workflows
Fetching a Package
# Agent needs to understand zod's implementation
npx opensrc zod
# → Detects version from lockfile
# → Finds repo URL from npm registry
# → Clones at matching git tag
# → Source available at opensrc/repos/github.com/colinhacks/zod/Updating Sources
# Re-run same command to update to currently installed version
npx opensrc zod
# → Checks if version changed
# → Re-clones if neededMultiple Sources
# Fetch multiple at once
npx opensrc react react-dom next
npx opensrc zod pypi:pydantic vercel/aiReferences
For detailed information:
- CLI Usage & Options - Full command reference
- Architecture - Code structure and extension
- Registry Support - npm, PyPI, crates.io details
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

