feat(skills): support loading skills from GitHub/Git URLs#2091
Open
dgallitelli wants to merge 2 commits intostrands-agents:mainfrom
Open
feat(skills): support loading skills from GitHub/Git URLs#2091dgallitelli wants to merge 2 commits intostrands-agents:mainfrom
dgallitelli wants to merge 2 commits intostrands-agents:mainfrom
Conversation
Add support for remote Git repository URLs as skill sources in AgentSkills, enabling teams to share and reference skills directly from GitHub without manual cloning. Closes strands-agents#2090 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Parse GitHub web URLs like /tree/<ref>/path to extract the clone URL, branch, and subdirectory path. This enables loading skills from subdirectories within mono-repos. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #2090
AgentSkillsandSkill.from_url()https://,git@, andssh://URLs with optional@refsuffix for branch/tag pinning (e.g.,https://github.com/org/skill@v1.0.0)--depth 1) and cached locally at~/.cache/strands/skills/(configurable viacache_dirparameter)Usage
Changes
_url_loader.py(new)skill.pySkill.from_url()classmethodagent_skills.py_resolve_skills()to detect URL strings; addedcache_dirparametertest_url_loader.py(new)test_skill.pySkill.from_url()test_agent_skills.pyAgentSkillsDesign decisions
gitwhich is universally available. Handles auth naturally (SSH keys, credential helpers, tokens).--depth 1minimizes bandwidth and disk for skill repos.sha256(url + ref)[:16]as cache directory name. Repeated loads are instant.subprocess,hashlib,shutil).Test plan
@hookdecorator typing)aws-data-agent-skill)obra/superpowers/brainstorming)