opensrc

Fetch source code for npm, PyPI, and crates.io packages and GitHub/GitLab repositories.

Updated Jan 9, 2026
One-click install
npx skills add https://github.com/maplin-co/ai-course --skill opensrc-maplin-co
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opensrc
Source: https://github.com/maplin-co/ai-course/tree/main/.opencode/skill/opensrc
Command: npx skills add https://github.com/maplin-co/ai-course --skill opensrc-maplin-co

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides AI agents with direct access to the source code of software packages and repositories, enabling deeper understanding and debugging beyond just documentation.

Core Features & Use Cases

  • Source Code Retrieval: Fetches code for npm, PyPI, and crates.io packages, as well as GitHub/GitLab repositories.
  • Contextual Understanding: Helps agents understand internal library logic, debug dependency issues, and explore implementation patterns.
  • Use Case: An AI agent needs to debug a complex issue in a third-party JavaScript library. It uses opensrc to fetch the library's source code, allowing it to trace the execution flow and pinpoint the bug.

Quick Start

Use the opensrc skill to fetch the source code for the 'zod' npm package.

Frequently Asked Questions about opensrc

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

FAQPage Schema
How do I fetch source code for an npm or PyPI package to debug a dependency issue?

To fetch source code for an npm or PyPI package, use this Skill to resolve the repository URL and perform a shallow Git clone. This retrieves the actual implementation files, allowing you to trace execution flows and debug dependency issues directly.

Can I retrieve source code from GitHub and GitLab repositories using shallow clones?

Yes, you can retrieve source code from GitHub and GitLab repositories. The Skill parses repository specifications, resolves the URLs, and executes shallow Git clones to provide direct access to the repository's implementation files.

What is the best way to understand internal library logic when documentation is not enough?

The best way to understand internal library logic beyond documentation is fetching the source code directly. This Skill retrieves package implementations from npm, PyPI, and crates.io, providing the full context needed to explore implementation patterns.

Does this source code retrieval approach work with Rust crates from crates.io?

Yes, this source code retrieval approach works with Rust crates from crates.io. It parses the package specification, resolves the repository URL, and clones the source files to help you explore the package's internal workings.

What are the limitations of using shallow Git clones to fetch package source code?

A limitation of using shallow Git clones to fetch package source code is that it retrieves only a snapshot of the repository history. This means you may lack full commit context for tracing older dependency issues, though the current implementation files remain fully accessible.