skills-backup

Automate cross-platform backup and synchronization of OpenCode skills to a Git repository.

7|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/wsxwj123/opencode-skills-backup --skill skills-backup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: skills-backup
Source: https://github.com/wsxwj123/opencode-skills-backup/tree/main/skills-backup
Command: npx skills add https://github.com/wsxwj123/opencode-skills-backup --skill skills-backup

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This skill solves the tedious, error-prone task of keeping a local OpenCode skills directory backed up and in sync across Windows and macOS, automatically handling cross-platform path differences and line endings.

Core Features & Use Cases

  • Cross-platform backup and synchronization of the entire skills directory to a configured Git repository.
  • Automatic OS detection and conflict prevention via .gitattributes to normalize line endings.
  • On-demand and per-skill sync capabilities, with automation for full backups.

Quick Start

Tell OpenCode to back up all skills to the configured Git repository.

Frequently Asked Questions about skills-backup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sync a local skills directory across Windows and macOS using Git?

You can sync a local skills directory across Windows and macOS by automating Git operations like pull --rebase and git stash. This process detects the operating system and resolves cross-platform path and line-ending differences automatically.

Why do line endings cause conflicts when backing up files between Windows and macOS?

Line endings cause backup conflicts between Windows and macOS due to differing encoding formats. Configuring a .gitattributes file normalizes line endings during synchronization, preventing cross-platform merge conflicts.

What is the best way to automate Git backup and synchronization for a directory?

The best way to automate Git backup and synchronization involves running scripts that detect your OS, stash local changes, pull with rebase, and restore changes. This ensures the entire directory stays updated with the remote repository.

Does Git sync work with per-skill files or does it only backup the entire directory?

Git sync works with both per-skill files and the entire directory. You can trigger on-demand synchronization for individual skills or run a full automation backup for the complete skills directory.

Can I use Git stash and rebase to prevent data loss during cross-platform sync?

Yes, using Git stash and pull --rebase prevents data loss during cross-platform sync. The workflow stashes local modifications, rebases onto the remote repository, and pops the stash to cleanly merge updates.

Do I need a .gitattributes file to sync directories between different operating systems?

You need a .gitattributes file to safely sync directories between different operating systems. It normalizes line endings and prevents path conflicts when synchronizing files across Windows and macOS environments.