syncthing
Skill2 starsChanged 8 months agoMITView on GitHub
Manage Syncthing file synchronization via the REST API and CLI. Use when the user wants to add/remove devices or folders, check sync status, configure versioning or ignore patterns, monitor connections, manage pending devices, pause/resume sync, troubleshoot sync issues, or automate Syncthing administration. Triggers on mentions of Syncthing, file sync, peer-to-peer sync, device pairing, .stignore, block exchange protocol, or syncthing REST API. Even if the user just says "check sync status" or "add a device" in a Syncthing context, this skill should be used.
- Reads credentials
- Installs packages
- Sends data out
In this repository12 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- 1password-cliSkill
- awscliSkill
- gandi-cliSkill
- iterm2-automationSkill
- iterm2-profilesSkill
- iterm2-shell-setupSkill
- pbcopySkill
- synology-cliSkill
- tailscale-cliSkill
- textual-tuiSkill
- your-skill-nameSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 1 is distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
Default API address: http://127.0.0.1:8384
- Very specific: line 60
All REST API calls (except /rest/noauth/*) require authentication:
- Very specific: line 328
Check if Syncthing is running: curl http://127.0.0.1:8384/rest/noauth/health
- Very specific: line 329
Verify connections: GET /rest/system/connections — look for connected: true
- Distinctive: line 330
If using relay (slow): check NAT/firewall, configure port forwarding for port 22000
- Very specific: line 334
Check folder status: GET /rest/db/status?folder=ID — look at state field
- Very specific: line 335
Check for errors: GET /rest/folder/errors?folder=ID
- Very specific: line 337
Check needed files: GET /rest/db/need?folder=ID
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Syncthing Administration
Help users manage Syncthing file synchronization via the REST API and CLI.
Prerequisites
- Syncthing running on the target machine
- API key available (from config.xml or the web GUI)
- Default API address:
http://127.0.0.1:8384
macOS Paths
The macOS app (syncthing-macos) stores data at:
~/Library/Application Support/Syncthing/
├── config.xml # Main configuration
├── syncthing.log # Log file
├── cert.pem / key.pem # TLS certificates
└── index-v0.14.0.db/ # DatabasePreferences bundle ID: com.github.xor-gate.syncthing-macosx
# View macOS app preferences
defaults read com.github.xor-gate.syncthing-macosx
# Auto-start on login
defaults write com.github.xor-gate.syncthing-macosx StartAtLogin 1Homebrew Installation
brew install syncthing
# Or just the macOS GUI wrapper:
brew install --cask syncthing-appAuthentication
All REST API calls (except /rest/noauth/*) require authentication:
# API key header (preferred)
curl -H "X-API-Key: YOUR_API_KEY" http://127.0.0.1:8384/rest/system/status
# Bearer token
curl -H "Authorization: Bearer YOUR_API_KEY" http://127.0.0.1:8384/rest/system/statusThe API key is in config.xml at configuration/gui/apikey, or visible in the web GUI under Settings > API Key.
Common Operations
Check System Status
# System status (device ID, uptime, memory usage)
curl -s -H "X-API-Key: $KEY" http://127.0.0.1:8384/rest/system/status | jq .
# Version info
curl -s -H "X-API-Key: $KEY" http://127.0.0.1:8384/rest/system/version | jq .
# Health check (no auth needed)
curl -s http://127.0.0.1:8384/rest/noauth/health
# Connection status for all devices
curl -s -H "X-API-Key: $KEY" http://127.0.0.1:8384/rest/system/connections | jq .Device Management
# List all configured devices
curl -s -H "X-API-Key: $KEY" http://127.0.0.1:8384/rest/config/devices | jq .
# Add a new device
curl -s -X POST -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
http://127.0.0.1:8384/rest/config/devices \
-d '{
"deviceID": "DEVICE-ID-HERE",
"name": "My Phone",
"addresses": ["dynamic"],
"compression": "metadata",
"autoAcceptFolders": false
}'
# Get a specific device
curl -s -H "X-API-Key: $KEY" http://127.0.0.1:8384/rest/config/devices/DEVICE-ID | jq .
# Update device (partial update)
curl -s -X PATCH -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
http://127.0.0.1:8384/rest/config/devices/DEVICE-ID \
-d '{"paused": true}'
# Delete a device
curl -s -X DELETE -H "X-API-Key: $KEY" http://127.0.0.1:8384/rest/config/devices/DEVICE-ID
# View pending devices (awaiting acceptance)
curl -s -H "X-API-Key: $KEY" http://127.0.0.1:8384/rest/cluster/pending/devices | jq .
# Dismiss a pending device
curl -s -X DELETE -H "X-API-Key: $KEY" \
"http://127.0.0.1:8384/rest/cluster/pending/devices?device=DEVICE-ID"Folder Management
# List all folders
curl -s -H "X-API-Key: $KEY" http://127.0.0.1:8384/rest/config/folders | jq .
# Add a new folder shared with a device
curl -s -X POST -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
http://127.0.0.1:8384/rest/config/folders \
-d '{
"id": "my-documents",
"label": "My Documents",
"path": "/Users/kyle/Documents/Sync",
"type": "sendreceive",
"devices": [
{"deviceID": "LOCAL-DEVICE-ID"},
{"deviceID": "REMOTE-DEVICE-ID"}
],
"rescanIntervalS": 3600,
"fsWatcherEnabled": true
}'
# Update folder (partial)
curl -s -X PATCH -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
http://127.0.0.1:8384/rest/config/folders/my-documents \
-d '{"paused": false}'
# Delete a folder
curl -s -X DELETE -H "X-API-Key: $KEY" http://127.0.0.1:8384/rest/config/folders/my-documents
# View pending folders
curl -s -H "X-API-Key: $KEY" \
"http://127.0.0.1:8384/rest/cluster/pending/folders?device=DEVICE-ID" | jq .Folder types:
sendreceive— Bidirectional sync (default)sendonly— Push local changes only, ignore remotereceiveonly— Accept remote changes only, ignore localreceiveencrypted— Receive encrypted data (for untrusted devices)
Sync Status & Progress
# Folder sync status
curl -s -H "X-API-Key: $KEY" \
"http://127.0.0.1:8384/rest/db/status?folder=my-documents" | jq .
# Sync completion percentage (overall or per device)
curl -s -H "X-API-Key: $KEY" \
"http://127.0.0.1:8384/rest/db/completion?folder=my-documents" | jq .
# Per-device completion
curl -s -H "X-API-Key: $KEY" \
"http://127.0.0.1:8384/rest/db/completion?folder=my-documents&device=DEVICE-ID" | jq .
# Files that need syncing
curl -s -H "X-API-Key: $KEY" \
"http://127.0.0.1:8384/rest/db/need?folder=my-documents" | jq .
# Folder errors
curl -s -H "X-API-Key: $KEY" \
"http://127.0.0.1:8384/rest/folder/errors?folder=my-documents" | jq .Pause / Resume
# Pause all devices
curl -s -X POST -H "X-API-Key: $KEY" http://127.0.0.1:8384/rest/system/pause
# Resume all devices
curl -s -X POST -H "X-API-Key: $KEY" http://127.0.0.1:8384/rest/system/resume
# Pause a specific device
curl -s -X POST -H "X-API-Key: $KEY" \
"http://127.0.0.1:8384/rest/system/pause?device=DEVICE-ID"
# Pause a specific folder (via config patch)
curl -s -X PATCH -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
http://127.0.0.1:8384/rest/config/folders/my-documents \
-d '{"paused": true}'Ignore Patterns
# Get ignore patterns for a folder
curl -s -H "X-API-Key: $KEY" \
"http://127.0.0.1:8384/rest/db/ignores?folder=my-documents" | jq .
# Set ignore patterns
curl -s -X POST -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
"http://127.0.0.1:8384/rest/db/ignores?folder=my-documents" \
-d '{"ignore": ["*.tmp", ".DS_Store", "node_modules", "(?i)thumbs.db"]}'Ignore pattern syntax:
*.tmp— Glob matching!important.tmp— Negation (un-ignore)(?i)pattern— Case-insensitive/pattern— Current directory only**/pattern— Any subdirectory
Scan & Override
# Trigger a rescan of a folder
curl -s -X POST -H "X-API-Key: $KEY" \
"http://127.0.0.1:8384/rest/db/scan?folder=my-documents"
# Rescan a specific subdirectory
curl -s -X POST -H "X-API-Key: $KEY" \
"http://127.0.0.1:8384/rest/db/scan?folder=my-documents&sub=subfolder/path"
# Override remote changes (send-only folders)
curl -s -X POST -H "X-API-Key: $KEY" \
"http://127.0.0.1:8384/rest/db/override?folder=my-documents"
# Revert local changes (receive-only folders)
curl -s -X POST -H "X-API-Key: $KEY" \
"http://127.0.0.1:8384/rest/db/revert?folder=my-documents"Logs & Errors
# View system logs
curl -s -H "X-API-Key: $KEY" http://127.0.0.1:8384/rest/system/log | jq .
# View system errors
curl -s -H "X-API-Key: $KEY" http://127.0.0.1:8384/rest/system/error | jq .
# Clear errors
curl -s -X POST -H "X-API-Key: $KEY" http://127.0.0.1:8384/rest/system/error/clearRestart & Shutdown
# Restart Syncthing
curl -s -X POST -H "X-API-Key: $KEY" http://127.0.0.1:8384/rest/system/restart
# Shutdown Syncthing
curl -s -X POST -H "X-API-Key: $KEY" http://127.0.0.1:8384/rest/system/shutdown
# Check if restart is needed after config changes
curl -s -H "X-API-Key: $KEY" http://127.0.0.1:8384/rest/config/restart-required | jq .Versioning Configuration
Configure file versioning when adding or updating a folder. Four strategies are available:
Trash Can — Moves old files to .stversions, single copy per file:
{"type": "trashcan", "params": {"cleanoutDays": "30"}}Simple — Keeps N timestamped copies:
{"type": "simple", "params": {"keep": "5", "cleanoutDays": "0"}}Staggered — Tiered retention (hourly/daily/weekly buckets):
{"type": "staggered", "params": {"maxAge": "365"}}External — Delegates to a custom script:
{"type": "external", "params": {"command": "/path/to/script %FOLDER_PATH% %FILE_PATH%"}}Apply versioning via folder config PATCH:
curl -s -X PATCH -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
http://127.0.0.1:8384/rest/config/folders/my-documents \
-d '{"versioning": {"type": "staggered", "params": {"maxAge": "365"}}}'Event Streaming
Subscribe to real-time events via long-polling:
# Get all events (long-poll, blocks until events arrive)
curl -s -H "X-API-Key: $KEY" "http://127.0.0.1:8384/rest/events?since=0&limit=10" | jq .
# Only disk events
curl -s -H "X-API-Key: $KEY" "http://127.0.0.1:8384/rest/events/disk?since=0" | jq .
# Filter by event type
curl -s -H "X-API-Key: $KEY" \
"http://127.0.0.1:8384/rest/events?events=DeviceConnected,DeviceDisconnected&since=0" | jq .Key event types: DeviceConnected, DeviceDisconnected, FolderCompletion, FolderErrors, ItemFinished, StateChanged, LocalChangeDetected, RemoteChangeDetected, ConfigSaved, StartupComplete.
Troubleshooting
Connection Issues
- Check if Syncthing is running:
curl http://127.0.0.1:8384/rest/noauth/health - Verify connections:
GET /rest/system/connections— look forconnected: true - If using relay (slow): check NAT/firewall, configure port forwarding for port 22000
- Pending devices not appearing: both sides must add each other's device ID
Sync Not Progressing
- Check folder status:
GET /rest/db/status?folder=ID— look atstatefield - Check for errors:
GET /rest/folder/errors?folder=ID - Trigger manual rescan:
POST /rest/db/scan?folder=ID - Check needed files:
GET /rest/db/need?folder=ID
Performance
- Relay connections are much slower than direct — check connection type in
/rest/system/connections - Reduce scan frequency with
rescanIntervalSfor large folders (use filesystem watcher instead) - Set bandwidth limits via options:
GET/PATCH /rest/config/options—maxSendKbps,maxRecvKbps
Reference Documentation
For detailed endpoint lists and configuration options, read these reference files:
reference/rest-api.md— Complete REST API endpoint reference with all parametersreference/config.md— Configuration structure: folders, devices, GUI, options, versioning, ignore patternsreference/cli.md— CLI commands, flags, environment variables, and macOS-specific details
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

