Communitygithub.com

TerminalSkills/skills

>- Sync files and directories with rsync. Use when a user asks to copy files between servers, sync directories, create incremental backups, deploy files to a remote server, or mirror directories efficiently.

Qu'est-ce que skills ?

skills is a Claude Code agent skill that >- Sync files and directories with rsync. Use when a user asks to copy files between servers, sync directories, create incremental backups, deploy files to a remote server, or mirror directories efficiently.

Compatible avec~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/TerminalSkills/skills/tree/HEAD/skills/rsync

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

rsync

Overview

rsync is the standard tool for efficient file synchronization. It only transfers changed parts of files (delta transfer), supports SSH, handles permissions, and works for backups, deployments, and directory mirroring.

Instructions

Step 1: Basic Usage

# Sync local directories
rsync -avz source/ destination/
# -a = archive (preserves permissions, timestamps, symlinks)
# -v = verbose
# -z = compress during transfer

# Sync to remote server
rsync -avz ./dist/ deploy@server:/var/www/myapp/

# Sync from remote
rsync -avz deploy@server:/var/log/myapp/ ./logs/

# Dry run (show what would change without doing it)
rsync -avzn source/ destination/

Step 2: Common Patterns

# Deploy website (delete files on destination that don't exist in source)
rsync -avz --delete ./build/ deploy@server:/var/www/site/

# Backup with exclude
rsync -avz --exclude='node_modules' --exclude='.git' --exclude='.env' \
  /opt/myapp/ /backups/myapp/

# Incremental backup with hard links (space-efficient)
rsync -avz --link-dest=/backups/latest \
  /opt/myapp/ /backups/$(date +%Y%m%d)/
ln -snf /backups/$(date +%Y%m%d) /backups/latest

# Bandwidth limited (useful for large transfers)
rsync -avz --bwlimit=5000 source/ destination/    # 5000 KB/s

Step 3: Deployment Script

#!/bin/bash
# scripts/deploy.sh — Deploy app with rsync
SERVER="[email protected]"
REMOTE_DIR="/var/www/myapp"

echo "Building..."
npm run build

echo "Syncing files..."
rsync -avz --delete \
  --exclude='node_modules' \
  --exclude='.env' \
  --exclude='.git' \
  ./dist/ ${SERVER}:${REMOTE_DIR}/

echo "Restarting service..."
ssh ${SERVER} "sudo systemctl restart myapp"

echo "Deploy complete!"

Guidelines

  • Always use -n (dry run) first when using --delete to avoid accidental data loss.
  • Trailing slash matters: source/ syncs contents, source syncs the directory itself.
  • For large transfers, add --progress to see per-file progress.
  • rsync over SSH is encrypted by default — safe for internet transfers.

Individual skills in this repo

This repo contains 6 individual skills — each has its own dedicated page.

TerminalSkills/skills

>- Self-host customer support with Chatwoot. Use when a user asks to set up open-source customer support, add live chat without SaaS costs, build a multi-channel inbox, or deploy a free Intercom alternative.

TerminalSkills/skills

>- Add live chat and customer support with Crisp. Use when a user asks to add a chat widget, implement live customer support, set up a help desk, create a knowledge base, or add a chatbot to a website.

TerminalSkills/skills

>- Run local SEO from your terminal via the SEOG MCP server — Google Business Profile management, map-pack rank tracking and geo-grid scans, review sync and replies published to Google, competitor intelligence, AI-visibility and citation checks, website + Search Console audits, GBP posts, and PDF reports. Use when: connecting an agent to seog.ai, tracking map-pack rankings, automating local SEO reports, monitoring competitors near a business, replying to Google reviews, publishing Google posts, or when the user mentions "SEOG", "local SEO", "map pack", "Google Business Profile", or "keyword positions" for a physical business.

TerminalSkills/skills

>- Build and customize websites with Tilda — zero-code website builder with advanced customization. Use when someone asks to "build a website with Tilda", "Tilda Publishing", "customize Tilda site", "Tilda API", "landing page builder", "no-code website", "Tilda custom code", or "integrate Tilda with external services". Covers block-based building, custom HTML/CSS/JS, Tilda API, form handling, e-commerce, and integrations.

TerminalSkills/skills

>- Track website analytics with Umami — privacy-focused, open-source Google Analytics alternative. Use when someone asks to "track website analytics", "Umami", "privacy-friendly analytics", "self-hosted analytics", "GDPR analytics", "replace Google Analytics", or "website traffic tracking without cookies". Covers setup, event tracking, custom properties, API, and self-hosting.

TerminalSkills/skills

>- Deploy and configure Xray proxy servers. Use when a user asks to set up VLESS, VMess, Trojan, or Shadowsocks proxies, configure Reality or TLS transport, deploy Xray with XTLS, set up fallback routing, manage multi-user access, configure traffic routing rules, set up CDN-based tunneling, build subscription links for client apps, monitor Xray traffic, or bypass network restrictions. Covers all major Xray protocols, transports, and deployment patterns.

Skills associés