Skip to content

Conversation

@RichardHightower
Copy link
Contributor

Summary

This PR implements support for the NEW install format owner/repo/skill as the primary format while maintaining backwards compatibility with the LEGACY format owner_repo/skill.

Changes Made

🔧 Core API Client Updates (src/skilz/api_client.py)

  • Replaced parse_skill_id() to support THREE formats:
    • NEW: owner/repo/skill (2 slashes) - Primary format
    • LEGACY: owner_repo/skill (1 slash with underscore) - Backwards compatible
    • SLUG: owner__repo__skill (double underscores) - Direct Firestore doc ID
  • Updated is_marketplace_skill_id() to recognize all three formats
  • Added get_skill_id_format() to detect format type

📊 Enhanced Logging (src/skilz/installer.py)

  • Added verbose logging to show skill ID format detection
  • Added logging for REST API attempts and success
  • Shows whether REST API or GitHub fallback was used

Comprehensive Tests (tests/test_api_client.py)

  • Added TestParseSkillIdNewFormat - Tests NEW format parsing
  • Added TestParseSkillIdSlugFormat - Tests SLUG format parsing
  • Added TestIsMarketplaceSkillIdFormats - Tests format recognition
  • Added TestGetSkillIdFormat - Tests format detection
  • Fixed existing test for updated error messages

Format Support Matrix

Format Example Resolution Method
NEW skilz install owner/repo/skill REST API FIRST → GitHub fallback
LEGACY skilz install owner_repo/skill REST API first → GitHub fallback
SLUG skilz install owner__repo__skill REST API first → GitHub fallback
Git URL skilz install -g https://... Direct GitHub clone (no REST)

Verbose Output Examples

NEW Format

$ skilz -v install davila7/claude-code-templates/slack-gif-creator --agent claude
Using specified agent: Claude Code
Looking up skill: davila7/claude-code-templates/slack-gif-creator
  [INFO] Skill ID format: NEW
  [INFO] Attempting REST API lookup at skillzwave.ai...
  [SUCCESS] REST API resolved skill: davila7/claude-code-templates/slack-gif-creator

LEGACY Format

$ skilz -v install davila7_claude-code-templates/slack-gif-creator --agent claude
  [INFO] Skill ID format: LEGACY
  [INFO] Attempting REST API lookup at skillzwave.ai...
  [SUCCESS] REST API resolved skill: davila7_claude-code-templates/slack-gif-creator

Invalid Format

$ skilz -v install invalid-format --agent claude
  [INFO] Skill ID format: UNKNOWN
  # No REST API attempt for unknown formats

Testing Results

All 633 tests passing
25 new API client tests added
Linting and type checking clean
Manual testing verified for all formats

Backwards Compatibility

  • LEGACY format (owner_repo/skill) continues to work unchanged
  • Existing installations remain functional
  • All existing tests continue to pass

Resolution Flow

User: skilz install owner/repo/skill --verbose

1. Detect format → "NEW" 
2. Log: "[INFO] Skill ID format: NEW"
3. Log: "[INFO] Attempting REST API lookup at skillzwave.ai..."
4. Call: GET /api/skills/byname?repoFullName=owner/repo&name=skill
   ├─ 200 OK → Log: "[SUCCESS] REST API resolved skill" → Install
   ├─ 404 Not Found → Log: "[WARN] REST API failed, falling back to GitHub..."
   └─ 400 Bad Request → Log: "[ERROR] Invalid skill identifier format" → Exit

Success Criteria Met

  • src/skilz/api_client.py has been MODIFIED with new function implementations
  • src/skilz/installer.py has logging for REST vs GitHub resolution
  • tests/test_api_client.py has new test classes added
  • All tests pass (633/633)
  • NEW format resolves correctly via REST API
  • LEGACY format resolves correctly via REST API
  • SLUG format resolves correctly via REST API
  • Verbose output shows whether REST or GitHub was used
  • Quality checks pass (linting, type checking)

Closes SKILZ-FORMAT-001

RichardHightower and others added 3 commits January 8, 2026 19:29
- Add support for NEW format: owner/repo/skill (2 slashes)
- Maintain backwards compatibility with LEGACY format: owner_repo/skill
- Add support for direct SLUG format: owner__repo__skill
- NEW format uses REST API first, GitHub fallback second
- Add verbose logging to show REST vs GitHub resolution
- Add get_skill_id_format() to detect format type
- Add comprehensive tests for all three formats

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Test marketplace format parsing and detection
- Test API endpoint reachability
- Test registry fallback to API logic
- Verify verbose output shows API calls
- Add prominent section explaining NEW format (owner/repo/skill) vs LEGACY format (owner_repo/skill)
- Update Quick Start examples to show NEW format as primary
- Add comprehensive E2E test script for REST marketplace validation
- Both formats work identically and resolve to same skills
@RichardHightower RichardHightower merged commit 2112917 into main Jan 9, 2026
1 check passed
@RichardHightower RichardHightower deleted the feature/new-install-format branch January 9, 2026 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants