Skip to content

Comments

feat: add support for repositories with individual SKILL.md files#3

Merged
trieloff merged 2 commits intomainfrom
feature/skill-md-support
Oct 29, 2025
Merged

feat: add support for repositories with individual SKILL.md files#3
trieloff merged 2 commits intomainfrom
feature/skill-md-support

Conversation

@trieloff
Copy link
Owner

Summary

This PR enhances upskill to support repositories like anthropics/skills that organize skills as individual SKILL.md files instead of using a .claude/skills directory structure.

Key Changes

  • Auto-detection: Automatically detects whether a repository uses .claude/skills or individual SKILL.md files
  • List skills: New --list flag to display available skills before installing
  • Selective installation: New --skill <name> flag (can be used multiple times) to install specific skills
  • Bulk installation: New --all flag to install all discovered skills from SKILL.md files
  • Backward compatible: Repositories with .claude/skills directory continue to work as before

New Workflow for SKILL.md Repositories

When a repository doesn't have a .claude/skills directory:

  1. Tool discovers all SKILL.md files recursively in the repository
  2. Extracts skill name and description from YAML frontmatter (if present)
  3. Prompts user to specify which skills to install using --skill or --all

Examples

List available skills:

upskill anthropics/skills --list

Install specific skills:

upskill anthropics/skills --skill pdf --skill xlsx

Install all skills:

upskill anthropics/skills --all

Implementation Details

  • Uses portable bash constructs (no associative arrays) for broader compatibility
  • Properly handles skill names with spaces using null-delimited find
  • Maintains existing behavior for repositories with .claude/skills directory
  • Includes validation to ensure mutually exclusive flags don't conflict

Test plan

  • Tested --list with anthropics/skills repository
  • Tested installing single skill with --skill pdf
  • Tested installing multiple skills with --skill pdf --skill xlsx
  • Verified backward compatibility with existing .claude/skills repositories
  • Shellcheck passes with no warnings
  • Help text updated with new options
  • CI tests pass (to be verified)

🤖 Generated with Claude Code

This enhancement allows upskill to work with repositories like anthropics/skills
that organize skills as individual SKILL.md files instead of using a .claude/skills
directory structure.

New features:
- Auto-detect whether repo uses .claude/skills or individual SKILL.md files
- --list flag to display available skills before installing
- --skill flag (multi-use) to selectively install specific skills
- --all flag to install all discovered skills from SKILL.md files
- Backward compatible: repos with .claude/skills work as before

For repos without .claude/skills:
- Discovers all SKILL.md files recursively
- Extracts skill name and description from YAML frontmatter
- Allows selective installation by skill name
- Prompts user to choose skills when neither --skill nor --all is provided

Examples:
  upskill anthropics/skills --list
  upskill anthropics/skills --skill pdf --skill xlsx
  upskill anthropics/skills --all

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

Co-Authored-By: Claude <noreply@anthropic.com>

Signed-off-by: Lars Trieloff <lars@trieloff.net>
Based on user feedback, this commit improves the skill listing experience:

- Enhanced formatting: bold skill names, cyan relative paths in parentheses
- Smart examples: use actual discovered skill names in usage examples
- Better layout: description on separate line below skill name
- Cleaner paths: show relative paths instead of absolute paths
- Verified temp directory cleanup works correctly (trap already in place)

Example output:
  **pdf** (document-skills/pdf/SKILL.md)
  Comprehensive PDF manipulation toolkit...

  To install specific skills:
    upskill anthropics/skills --skill pdf --skill xlsx

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

Co-Authored-By: Claude <noreply@anthropic.com>

Signed-off-by: Lars Trieloff <lars@trieloff.net>
@trieloff trieloff merged commit a724955 into main Oct 29, 2025
1 check passed
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