feat: Support new owner/repo/skill install format with REST-first #36
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
This PR implements support for the NEW install format
owner/repo/skillas the primary format while maintaining backwards compatibility with the LEGACY formatowner_repo/skill.Changes Made
🔧 Core API Client Updates (
src/skilz/api_client.py)parse_skill_id()to support THREE formats:owner/repo/skill(2 slashes) - Primary formatowner_repo/skill(1 slash with underscore) - Backwards compatibleowner__repo__skill(double underscores) - Direct Firestore doc IDis_marketplace_skill_id()to recognize all three formatsget_skill_id_format()to detect format type📊 Enhanced Logging (
src/skilz/installer.py)✅ Comprehensive Tests (
tests/test_api_client.py)TestParseSkillIdNewFormat- Tests NEW format parsingTestParseSkillIdSlugFormat- Tests SLUG format parsingTestIsMarketplaceSkillIdFormats- Tests format recognitionTestGetSkillIdFormat- Tests format detectionFormat Support Matrix
skilz install owner/repo/skillskilz install owner_repo/skillskilz install owner__repo__skillskilz install -g https://...Verbose Output Examples
NEW Format
LEGACY Format
Invalid Format
$ skilz -v install invalid-format --agent claude [INFO] Skill ID format: UNKNOWN # No REST API attempt for unknown formatsTesting Results
✅ All 633 tests passing
✅ 25 new API client tests added
✅ Linting and type checking clean
✅ Manual testing verified for all formats
Backwards Compatibility
owner_repo/skill) continues to work unchangedResolution Flow
Success Criteria Met
src/skilz/api_client.pyhas been MODIFIED with new function implementationssrc/skilz/installer.pyhas logging for REST vs GitHub resolutiontests/test_api_client.pyhas new test classes addedCloses SKILZ-FORMAT-001