Files
skillshare/website/docs/reference/commands/collect.md
T
Willie 6a94c69e47 docs: update docs and changelog for v0.17.1
Add documentation for new features (UI theme system, init --subdir),
bug fixes (collect .git skip, actionable git errors), and release notes.
Update CHANGELOG.md, website changelog, and 6 doc pages.
2026-03-13 14:09:40 +08:00

2.7 KiB
Raw Blame History

sidebar_position
sidebar_position
1

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

flowchart TD
    CMD["skillshare collect claude"]
    FIND["1. Find local skills in target"]
    CONFIRM["2. Confirm collection"]
    COPY["3. Copy to source"]
    SYMLINK["4. Replace with symlink"]
    CMD --> FIND --> CONFIRM --> COPY --> SYMLINK

:::tip .git/ directories are automatically excluded during collection. If you've git-cloned a skill repo directly into a target directory, only the skill content is copied — repository metadata stays behind. :::

Options

Flag Description
--all, -a Collect from all targets
--force, -f Overwrite existing skills in source
--dry-run, -n Preview without making changes
--json Output as JSON (implies --force, skips confirmation)

JSON Output

skillshare collect claude --json
{
  "pulled": ["new-skill", "another-skill"],
  "skipped": [],
  "failed": {},
  "dry_run": false,
  "duration": "0.123s"
}

Combine with --dry-run to preview without changes:

skillshare collect claude --json --dry-run

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"

See Also

  • sync — Sync from source to targets
  • diff — See local-only skills
  • push — Push to git remote