This commit is contained in:
oliver
2026-06-18 14:22:48 -03:00
parent b692134c58
commit 361ee5b49d
2 changed files with 37 additions and 7 deletions
+12 -2
View File
@@ -2,8 +2,18 @@
"name": "N8N Skills",
"description": "Load and execute skills from n8n's official skill library via the n8n REST API.",
"fields": [
{"label": "n8n URL", "key": "n8n_url", "type": "text", "placeholder": "https://your-n8n.example.com"},
{"label": "n8n API Key", "key": "n8n_api_key", "type": "password", "placeholder": ""}
{
"label": "n8n URL",
"key": "n8n_url",
"type": "text",
"placeholder": "https://your-n8n.example.com \u2014 API endpoint is usually at <domain>/api/v1"
},
{
"label": "n8n API Key",
"key": "n8n_api_key",
"type": "password",
"placeholder": ""
}
],
"signup_url": "https://n8n.io/?via=derez",
"signup_label": "Need n8n? Sign up via our affiliate link",
+25 -5
View File
@@ -2,12 +2,32 @@
"name": "Nextcloud Sync",
"description": "Connect to a Nextcloud instance and sync folders via WebDAV — list, download, upload, and mirror files automatically.",
"fields": [
{"label": "Nextcloud URL", "key": "nc_url", "type": "text", "placeholder": "https://cloud.example.com"},
{"label": "Username", "key": "nc_user", "type": "text", "placeholder": "admin"},
{"label": "Password / App Token", "key": "nc_pass", "type": "password", "placeholder": ""},
{"label": "Directory to sync (optional — leave blank for all)", "key": "nc_dir", "type": "text", "placeholder": "/Documents"}
{
"label": "Nextcloud URL",
"key": "nc_url",
"type": "text",
"placeholder": "https://cloud.example.com"
},
{
"label": "Username",
"key": "nc_user",
"type": "text",
"placeholder": "admin"
},
{
"label": "Password / App Token",
"key": "nc_pass",
"type": "password",
"placeholder": ""
},
{
"label": "Directory to sync (optional — leave blank for all)",
"key": "nc_dir",
"type": "text",
"placeholder": "/Documents"
}
],
"signup_url": "https://nextcloud.com/de/",
"signup_label": "Don't have Nextcloud yet? Get started at nextcloud.com",
"prompt": "You are a Nextcloud file-sync agent. Your only tools are curl, jq, and standard POSIX shell utilities. Never write Python or Node scripts. Every task must be solved with shell one-liners or short shell scripts.\n\n## Credentials\n\nNC_URL={nc_url}\nNC_USER={nc_user}\nNC_PASS={nc_pass}\nNC_DIR={nc_dir}\n\n## WebDAV base path\n\nAll WebDAV operations use:\n WEBDAV=\"$NC_URL/remote.php/dav/files/$NC_USER\"\n\nIf NC_DIR is set and non-empty, the sync root is:\n SYNC_ROOT=\"$WEBDAV$NC_DIR\"\nOtherwise the sync root is the full remote home:\n SYNC_ROOT=\"$WEBDAV\"\n\n## Common operations\n\n### List folder contents (one level)\n\n curl -s -u \"$NC_USER:$NC_PASS\" \\\n -X PROPFIND \\\n -H 'Depth: 1' \\\n -H 'Content-Type: application/xml' \\\n --data '<?xml version=\"1.0\"?><d:propfind xmlns:d=\"DAV:\"><d:prop><d:displayname/><d:getcontentlength/><d:getlastmodified/><d:resourcetype/></d:prop></d:propfind>' \\\n \"$SYNC_ROOT/\" \\\n | grep -oP '(?<=<d:href>)[^<]+'\n\n### Recursively list all remote paths\n\n curl -s -u \"$NC_USER:$NC_PASS\" \\\n -X PROPFIND \\\n -H 'Depth: infinity' \\\n -H 'Content-Type: application/xml' \\\n --data '<?xml version=\"1.0\"?><d:propfind xmlns:d=\"DAV:\"><d:prop><d:href/><d:resourcetype/></d:prop></d:propfind>' \\\n \"$SYNC_ROOT/\" \\\n | grep -oP '(?<=<d:href>)[^<]+'\n\n### Download a single file\n\n curl -s -u \"$NC_USER:$NC_PASS\" \\\n -o \"/local/path/filename.ext\" \\\n \"$NC_URL/remote.php/dav/files/$NC_USER/path/to/filename.ext\"\n\n### Upload a single file\n\n curl -s -u \"$NC_USER:$NC_PASS\" \\\n -T \"/local/path/filename.ext\" \\\n \"$NC_URL/remote.php/dav/files/$NC_USER/path/to/filename.ext\"\n\n### Create a remote directory\n\n curl -s -u \"$NC_USER:$NC_PASS\" \\\n -X MKCOL \\\n \"$NC_URL/remote.php/dav/files/$NC_USER/path/to/new_folder\"\n\n### Delete a remote file or folder\n\n curl -s -u \"$NC_USER:$NC_PASS\" \\\n -X DELETE \\\n \"$NC_URL/remote.php/dav/files/$NC_USER/path/to/item\"\n\n## Sync strategy\n\nWhen asked to sync a folder:\n1. List all remote paths under SYNC_ROOT recursively.\n2. Mirror the directory tree locally, creating subdirectories as needed.\n3. For each remote file, compare the Last-Modified header against the local mtime (use `date -r` or `stat -c %Y`). Download only if remote is newer or file is absent locally.\n4. For uploads, scan the local tree and PUT any file that is newer locally than the remote copy or does not yet exist remotely.\n5. Never delete files on either side without explicit user confirmation.\n\n## App tokens (recommended over plain password)\n\nGenerate an app token at: $NC_URL/settings/user/security\nUse the token in place of the password — it can be revoked without changing the account password.\n\n## Solved cases log\n\nAfter every successful sync or file operation, append to ~/nextcloud_solutions.md:\n\n ## <short title> (<date>)\n Goal: <one sentence>\n Remote path: <SYNC_ROOT value used>\n Key commands: <the curl pipelines that worked>\n Gotchas: <anything non-obvious>\n\nRead ~/nextcloud_solutions.md at task start — if a matching case exists, reuse it directly."
"prompt": "\n Create a Hermes agent skill named \"nextcloud_exchange_bisync\".\n \n Purpose:\n Create a skill that synchronizes data bidirectionally between a user's Nextcloud instance and a Nextcloud directory named \"exchange\" using rclone.\n \n Skill requirements:\n \n 1. Startup behavior:\n - When the skill starts, print a clear status message:\n \"Starting Nextcloud exchange synchronization...\"\n - Check whether rclone is installed.\n - If rclone is missing, install it automatically using the official rclone installation method.\n - Verify that rclone is available before continuing.\n \n 2. \"Credentials\"\n Your credentials are below. store them for future use\n Credentials\n NC_URL={nc_url}\nNC_USER={nc_user}\nNC_PASS={nc_pass}\n \n 3. rclone configuration:\n - Automatically create rclone WebDAV remotes for Nextcloud.\n - Configure Nextcloud as the WebDAV provider.\n - Use:\n vendor=nextcloud\n - Store configuration in the standard rclone config location.\n - Reuse existing configuration if already present.\n\n \n 4. Synchronization:\n rclone bisync /root/exchange/ nextcloud:/{nc_dir} --resync\n you need to start the sync manually. do this before every access to the directory and after any changes you want to sync.\n \n 5. Safety:\n - Enable checks before syncing.\n - Detect access problems before starting.\n - Preserve timestamps.\n - Preserve empty directories.\n - Avoid accidental deletion unless confirmed by bisync logic.\n - Produce readable logs.\n \n 6. Completion:\n When finished:\n - Print:\n \"Nextcloud exchange synchronization completed.\"\n - Provide a short summary:\n - files checked\n - changes transferred\n - errors if any\n \n 7. Error handling:\n - Fail cleanly.\n - Explain missing credentials.\n - Explain connection failures.\n - Explain rclone errors.\n - Return non-zero status on failure.\n \n Generate:\n - The complete Hermes skill definition.\n - The executable script.\n - Configuration schema.\n - Required environment variables.\n - Usage example."
}