sync-skills

Use when syncing skills from local folders, GitHub URLs, or skillsmp.com pages to multiple AI coding tool directories

16 stars

Best use case

sync-skills is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Use when syncing skills from local folders, GitHub URLs, or skillsmp.com pages to multiple AI coding tool directories

Teams using sync-skills should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/sync-skills/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/tools/sync-skills/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/sync-skills/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How sync-skills Compares

Feature / Agentsync-skillsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use when syncing skills from local folders, GitHub URLs, or skillsmp.com pages to multiple AI coding tool directories

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Sync Skills

## Overview
Automatically sync skills from multiple sources to all installed AI coding tool directories. Lists all existing target directories for user confirmation before syncing.

## When to Use

```dot
digraph when_sync {
    "Need to sync skill?" [shape=diamond];
    "Source type?" [shape=diamond];
    "Local folder" [shape=box];
    "GitHub URL" [shape=box];
    "skillsmp.com URL" [shape=box];

    "Need to sync skill?" -> "Source type?";
    "Source type?" -> "Local folder" [label="Local path"];
    "Source type?" -> "GitHub URL" [label="github.com"];
    "Source type?" -> "skillsmp.com URL" [label="skillsmp.com"];
}
```

Use when:
- User provides local skill folder path
- User provides GitHub repository URL
- User provides skillsmp.com skill detail page URL
- Need to distribute skill across multiple AI tools

**How it works:**
1. Auto-detect source type from input
2. Prepare skill content based on source
3. Check all target directories (only existing ones)
4. **List existing targets for user confirmation**
5. Copy/clone to each confirmed target

## Target Directories

Checks these paths in order, only syncs if directory exists:

| Tool | Project Level | User Level |
|------|---------------|------------|
| Claude Code | `.claude/skills` | `~/.claude/skills` |
| GitHub Copilot | `.github/skills` | `~/.copilot/skills` |
| Google Antigravity | `.agent/skills` | `~/.gemini/antigravity/skills` |
| Cursor | `.cursor/skills` | `~/.cursor/skills` |
| OpenCode | `.opencode/skill` | `~/.config/opencode/skill` |
| OpenAI Codex | `.codex/skills` | `~/.codex/skills` |
| Gemini CLI | `.gemini/skills` | `~/.gemini/skills` |
| Windsurf | `.windsurf/skills` | `~/.codeium/windsurf/skills` |
| Qwen Code | `.qwen/skills` | `~/.qwen/skills` |
| Qoder | `.qoder/skills` | `~/.qoder/skills` |
| OpenClaw | `.openclaw/skills` | `~/.openclaw/skills` |

## Quick Reference

**Basic Usage:**
```bash
./sync-skill.sh <source>
```

**Examples:**
```bash
# Local folder
./sync-skill.sh /Users/user/skills/my-skill

# GitHub repository
./sync-skill.sh https://github.com/user/skill-repo

# skillsmp.com page
./sync-skill.sh https://skillsmp.com/skills/skill-name
```

### Source Type Detection

```bash
# Local folder
/Users/user/skills/my-skill
./skills/my-skill
~/skills/my-skill

# GitHub URL
https://github.com/user/skill-repo
https://github.com/user/skill-repo.git
git@github.com:user/skill-repo.git

# skillsmp.com URL
https://skillsmp.com/skills/skill-name
https://www.skillsmp.com/skills/skill-name
```

### Sync Commands by Source Type

**Local folder:**
```bash
cp -r /path/to/skill-name ~/.claude/skills/
cp -r /path/to/skill-name ~/.qoder/skills/
# ... for each existing target
```

**GitHub:**
```bash
# Clone to temp
git clone https://github.com/user/skill-repo.git /tmp/skill-sync

# Copy skill folder (might be in subdirectory)
cp -r /tmp/skill-sync/skill-name ~/.claude/skills/
# ... for each existing target

# Cleanup
rm -rf /tmp/skill-sync
```

**skillsmp.com:**
```bash
# Fetch page content
curl -s https://skillsmp.com/skills/skill-name > /tmp/skill-page.html

# Parse and download skill files
# Extract skill content from page
# Create skill directory structure
# Copy to each target
```

## Implementation

**Executable script:** See `sync-skill.sh` in this skill directory.

**Features:**
- Auto-detects source type (local, GitHub, skillsmp.com)
- Checks all target directories for existence
- **Lists existing targets and waits for user confirmation before syncing**
- Only syncs to user-confirmed directories
- Overwrites existing skills without prompting
- Cleans up temporary files after use
- Provides clear output with emoji indicators

**Exit codes:**
- 0: Success
- 1: Error (missing source, clone failure, etc.)

**Using from AI assistant:**
When user asks to sync a skill, invoke the script with appropriate source:

```bash
# User says: "Sync the skill at /path/to/my-skill"
./sync-skill.sh /path/to/my-skill

# User says: "Sync this GitHub repo: https://github.com/user/skill"
./sync-skill.sh https://github.com/user/skill
```

### Source Detection

```javascript
function detectSource(input) {
  // Local folder
  if (input.startsWith('/') || input.startsWith('./') || input.startsWith('~')) {
    return { type: 'local', path: input };
  }

  // GitHub URL
  if (input.includes('github.com')) {
    const url = input.replace(/\.git$/, '');
    return { type: 'github', url };
  }

  // skillsmp.com URL
  if (input.includes('skillsmp.com')) {
    return { type: 'skillsmp', url: input };
  }

  throw new Error(`Unknown source type: ${input}`);
}
```

### Directory Existence Check and Confirmation

```bash
# Check if directory exists and collect for confirmation
check_and_sync() {
  local source=$1
  local skill_name=$2

  # Array of all target directories
  local targets=(
    "$HOME/.claude/skills"
    "$HOME/.qoder/skills"
    "$HOME/.copilot/skills"
    # ... all others
  )

  local existing_targets=()

  # First pass: collect existing directories
  for target in "${targets[@]}"; do
    if [ -d "$target" ]; then
      existing_targets+=("$target")
    fi
  done

  # List existing targets and ask for confirmation
  if [ ${#existing_targets[@]} -eq 0 ]; then
    echo "❌ No target directories found. Please install at least one AI coding tool."
    exit 1
  fi

  echo "📋 Found ${#existing_targets[@]} existing target directory(s):"
  echo ""
  for i in "${!existing_targets[@]}"; do
    echo "  $((i+1)). ${existing_targets[$i]}"
  done
  echo ""
  read -p "✅ Sync to these directories? (y/N): " confirm

  if [[ ! "$confirm" =~ ^[Yy]$ ]]; then
    echo "❌ Sync cancelled by user."
    exit 1
  fi

  echo ""
  echo "🚀 Starting sync..."

  # Second pass: sync to confirmed targets
  for target in "${existing_targets[@]}"; do
    echo "  → Syncing to $target..."
    # Perform sync
  done
}
```

### GitHub Repository Handling

```bash
# Clone to temp directory
git clone https://github.com/user/repo.git /tmp/skill-sync-XXXXX

# Find skill folder (might be root or subdirectory)
if [ -f /tmp/skill-sync-XXXXX/SKILL.md ]; then
  skill_folder="/tmp/skill-sync-XXXXX"
elif [ -d /tmp/skill-sync-XXXXx/skills/* ]; then
  skill_folder="/tmp/skill-sync-XXXXx/skills/*"
fi

# Copy to each existing target
for target in "${existing_targets[@]}"; do
  cp -r "$skill_folder" "$target/"
done

# Cleanup
rm -rf /tmp/skill-sync-XXXXX
```

### skillsmp.com Page Handling

```bash
# Fetch page
url="https://skillsmp.com/skills/skill-name"
curl -s "$url" > /tmp/skill-page.html

# Extract skill name and files
skill_name=$(grep -o '<h1[^>]*>.*</h1>' /tmp/skill-page.html | sed 's/<[^>]*>//g')

# Download or extract skill content
# This depends on skillsmp.com's structure
# Might need to parse JSON, download files, etc.

# Create skill directory
mkdir -p "/tmp/$skill_name"

# Save content to SKILL.md
# ... parsing logic ...

# Sync to targets
for target in "${existing_targets[@]}"; do
  cp -r "/tmp/$skill_name" "$target/"
done
```

## Common Mistakes

| Mistake | Fix |
|---------|-----|
| Syncing without user confirmation | Always list targets and wait for `y/N` confirmation |
| Syncing to non-existent directories | Always check `-d` before copying |
| Leaving temp files | Always cleanup `/tmp/skill-sync-*` after use |
| GitHub subdirectory confusion | Check for SKILL.md in root and subdirectories |
| Not handling .git suffix | Strip `.git` from URLs before cloning |
| skillsmp.com parsing failures | Inspect page structure first, adapt parsing |
| Forgetting to show skill name | Always display skill name in confirmation prompt |

## Conflict Handling

**Policy: Always overwrite existing skills**

If a skill with the same name exists in a target directory:
- Overwrite without prompting
- Log what was overwritten: `"Overwriting existing skill at $target/$skill_name"`
- No backup (user should use git if they need history)

**Rationale:** Sync operations are expected to update content. If user wants to preserve local changes, they should manage version control separately.

Related Skills

using-skills

16
from diegosouzapw/awesome-omni-skill

Provides sub agents important information on how to use skills

use-skills-npm-package

16
from diegosouzapw/awesome-omni-skill

CLI tool for discovering, installing, and managing reusable agent skills across multiple coding agents. Enables efficient skill discovery from repositories, local sources, and community repositories. Essential resource for discovering new Flutter/Dart skills.

tooluniverse-install-skills

16
from diegosouzapw/awesome-omni-skill

Detect and auto-install missing ToolUniverse research skills by checking common client skill directories and cloning from GitHub if absent. Use when ToolUniverse specialized skills are not installed, when setting up a new project, or when the tooluniverse router skill needs to bootstrap its sub-skills before routing.

sync-rules

16
from diegosouzapw/awesome-omni-skill

Synchronize shared rules into agent context files and headers.

skills-scaffolding

16
from diegosouzapw/awesome-omni-skill

Guide for creating effective Claude Code skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.

self-learning-skills

16
from diegosouzapw/awesome-omni-skill

Memory sidecar for agent work: recall before tasks, record learnings after tasks, review recommendations, optional backport bundles.

sc-pull-request-skills

16
from diegosouzapw/awesome-omni-skill

GitHub PR workflow automation including fetching unresolved comments, resolving review threads, and parallel comment resolution. Use this skill when working with PR reviews, addressing reviewer feedback, or automating PR comment workflows.

reflect-codex-skills

16
from diegosouzapw/awesome-omni-skill

Generate reflections for past Codex session histories using the Reflection CLI. Use when asked to summarize or reflect on previous Codex conversations, list projects/sessions, filter by date or session id, or refresh cached reflections from ~/.codex/sessions.

portable-skills-and-rules

16
from diegosouzapw/awesome-omni-skill

Defines SKILL.md structure, valid frontmatter fields, and cross-tool setup for Claude Code, Cursor, OpenCode, and Cline. ALWAYS read before creating or editing any SKILL.md file. This skill should be used when "writing a skill", "creating a skill", "editing a skill", "skill frontmatter", "SKILL.md format", "AGENTS.md", "CLAUDE.md", or setting up skills across multiple AI tools.

hap-skills-updater

16
from diegosouzapw/awesome-omni-skill

HAP Skills Collection 技能更新和维护技能。当用户提到"更新技能"、"维护技能"、"更新 hap-skills"、"更新 skill"等需求时使用。帮助用户更新和维护 HAP Skills Collection 中的 4 个核心技能。

developing-skills

16
from diegosouzapw/awesome-omni-skill

MUST be loaded before working with any Skill. Covers creating, building, reviewing, assessing, checking, auditing, evaluating, updating, modifying, and improving skills. Invoke PROACTIVELY before writing or changing any SKILL.md file. Provides structure, workflows, and validation for skill development. Supports both personal skills and standalone distributable skills (GitHub repos). (user)

async-sync-advisor

16
from diegosouzapw/awesome-omni-skill

Guides users on choosing between async and sync patterns for Lambda functions, including when to use tokio, rayon, and spawn_blocking. Activates when users write Lambda handlers with mixed workloads.