opensrc

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

19|3|Updated Feb 4, 2021
One-click install
npx skills add https://github.com/laulauland/dotfiles --skill opensrc-laulauland
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opensrc
Source: https://github.com/laulauland/dotfiles/tree/main/shared/.claude/skills/opensrc
Command: npx skills add https://github.com/laulauland/dotfiles --skill opensrc-laulauland

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This tool fetches source code for npm, PyPI, crates.io packages and GitHub/GitLab repositories to provide AI agents with implementation context beyond types and docs. Use when you need to understand how a library works internally, debug dependency issues, or explore package implementations.

Core Features & Use Cases

  • Understand internal implementations of libraries and dependencies for deeper reasoning.
  • Debug and verify behavior by inspecting actual source code and repo structure.
  • Use cases include investigating a package’s design, tracing implementation details, or fetching repo code for context in AI prompts.

Quick Start

Install opensrc globally or via npx, then fetch a package or repository to retrieve its source code for AI agent context.

Frequently Asked Questions about opensrc

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

FAQPage Schema
How do I fetch npm or PyPI package source code for AI context?

To fetch package source code for AI context, retrieve npm, PyPI, or crates.io packages directly by name. The tool handles version detection and repository resolution to extract the exact implementation files needed.

Can I get source code from a specific GitHub repository version?

Yes, you can fetch source code from a specific GitHub repository version. The tool performs shallow cloning and tag resolution to fetch the exact code state you need for debugging or dependency auditing.

Why do I need package source code instead of just types and docs?

Fetching package source code provides implementation context beyond types and docs, allowing you to understand internal library design, trace implementation details, and verify actual behavior during dependency debugging.

Does this tool support fetching code from GitLab repositories?

Yes, fetching source code from GitLab repositories is supported alongside GitHub. It resolves repository structures and performs shallow cloning to give AI agents safe, structured access to the implementation code.

What is the best way to inspect a library's internal implementation for an AI prompt?

The best way to inspect a library's internal implementation is to fetch its source code directly into your AI prompt context. This allows the agent to analyze the actual repository structure and code logic rather than relying solely on documentation.

How does version detection work when fetching crates.io packages?

When fetching crates.io packages, version detection and tag resolution automatically identify the correct release. This ensures you retrieve the exact source code matching the dependency version you are auditing or debugging.