Skip to main content

collect

Collect local skills from targets back to source.

skillshare collect claude           # From specific target
skillshare collect --all # From all targets
skillshare collect claude --dry-run # Preview

When to Use

Use collect when you've created or edited skills directly in a target directory (e.g., ~/.claude/skills/) and want to:

  1. Add them to your source for sharing
  2. Sync them to other AI CLIs
  3. Back them up with git

What Happens

┌─────────────────────────────────────────────────────────────────┐
│ skillshare collect claude │
└─────────────────────────────────────────────────────────────────┘


┌─────────────────────────────────────────────────────────────────┐
│ 1. Find local skills (not symlinks) in target │
│ → Found: new-skill, another-skill │
└─────────────────────────────────────────────────────────────────┘


┌─────────────────────────────────────────────────────────────────┐
│ 2. Confirm collection │
│ → "Collect these skills to source? [y/N]" │
└─────────────────────────────────────────────────────────────────┘


┌─────────────────────────────────────────────────────────────────┐
│ 3. Copy to source │
│ ~/.claude/skills/new-skill → │
│ ~/.config/skillshare/skills/new-skill │
└─────────────────────────────────────────────────────────────────┘


┌─────────────────────────────────────────────────────────────────┐
│ 4. Replace with symlink (optional, via sync) │
│ → Run 'skillshare sync' to distribute to all targets │
└─────────────────────────────────────────────────────────────────┘

Options

FlagDescription
--all, -aCollect from all targets
--force, -fOverwrite existing skills in source
--dry-run, -nPreview without making changes

Example Output

$ skillshare collect claude

Local skills found
ℹ new-skill [claude] ~/.claude/skills/new-skill
ℹ another-skill [claude] ~/.claude/skills/another-skill

Collect these skills to source? [y/N]: y

Collecting skills
✓ new-skill: copied to source
✓ another-skill: copied to source

Run 'skillshare sync' to distribute to all targets

Handling Conflicts

If a skill already exists in source:

$ skillshare collect claude

Collecting skills
⚠ my-skill: skipped (already exists in source, use --force to overwrite)

# To overwrite:
$ skillshare collect claude --force

Workflow

Typical workflow after creating a skill in a target:

# 1. Create skill in Claude
# (edit ~/.claude/skills/my-new-skill/SKILL.md)

# 2. Collect to source
skillshare collect claude

# 3. Sync to all other targets
skillshare sync

# 4. Commit to git (optional)
skillshare push -m "Add my-new-skill"
  • sync — Sync from source to targets
  • diff — See local-only skills
  • push — Push to git remote