计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
lov-sync-with-synology【效率与协作】Upload local files to a Synology NAS through QuickConnect or DSM HTTPS, verify remote size and MD5, then move the local copy to a reversible trash directory.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when the user wants to move local files to Synology, QuickConnect, DSM File Station, or a Synology Drive target directory, and expects the local source to be cleaned up only after a verified upload.
Activate for requests such as:
~/Music/MP3 到群晖”trash, not unlink. Files are moved under the configured trash directory and can be restored.--delete-mode unlink only when the user explicitly asks for irreversible deletion.--dry-run first for a new source directory.--base-url (DDNS, VPN, Tailscale, or LAN address).SYNO_PASSWORD for a one-off run.The deterministic CLI is installed at:
~/.local/bin/synology-cli
The source implementation and runtime live inside this skill:
~/.agents/skills/lov-sync-with-synology/scripts/synology_cli.py
~/.agents/skills/lov-sync-with-synology/.venv
synology-cli config
synology-cli doctor
synology-cli run \
--source ~/Music/MP3 \
--remote-dir /home/Music/MP3 \
--dry-run \
--json
trash mode is reversible:synology-cli run \
--source ~/Music/MP3 \
--remote-dir /home/Music/MP3 \
--delete-mode trash \
--json
If the user explicitly requires irreversible local deletion after a successful upload and verification, use --delete-mode unlink instead. Do not silently upgrade a request from “清理” to unlink without confirming that the local copy is no longer needed.
ok is false or failed is non-zero.The default config path is:
~/.config/synology-cli/config.json
Key fields:
quickconnect_id, quickconnect_domainbase_url as an optional direct fallbackusernameremote_dircert_verifydsm_versiondelete_mode, verify_md5, recursiveaudit_logThe password is read from macOS Keychain by default:
security add-generic-password \
-a "$USER" \
-s synology-cli \
-w 'REPLACE_WITH_DSM_PASSWORD' \
-U
SYNO_PASSWORD is accepted for one-off automation, but it must never be written to a file or printed.
Use the repository-local fake DSM to test the full HTTPS API flow without touching a real NAS:
~/.agents/skills/lov-sync-with-synology/scripts/test_e2e.sh
See references/operations.md for the exact safety checks, exit behavior, and recovery procedure.