/nord-skills:nextcloud-collectivesfrom nord-skills
Manages Nextcloud Collectives wikis via OCS API and WebDAV: create collectives, add/edit/find wiki articles, manage page trees, templates, tags, attachments, emoji, trash, and page versions.
Ships in nord-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A skill for full management of Nextcloud Collectives via the OCS REST API and WebDAV. All operations are done with curl from a terminal.
If the task is not about the wiki but about regular files, shares, users, groups or instance apps, use the nextcloud-admin skill.
Collectives has two layers, and this shapes every action:
| Layer | Protocol | What it does |
|---|---|---|
| Structure | OCS API (/ocs/v2.php/apps/collectives/api/v1.0/) | Collectives, page tree, metadata (emoji, order, tags), search, shares, trash |
| Content | WebDAV (/remote.php/dav/files/) | Reading and writing page markdown content |
OCS responses contain no page content — only metadata (PageInfo). To read or change an article's text you need a second step via WebDAV to the page's .md file.
Configuration comes from environment variables (compatible with nextcloud-admin):
| Variable | Purpose |
|---|---|
NEXTCLOUD_URL | Instance base URL (e.g. https://cloud.example.com) |
NEXTCLOUD_USER | Username |
NEXTCLOUD_TOKEN | App token (Settings → Security → Devices & sessions) |
Check the variables before any operation:
if [ -z "$NEXTCLOUD_URL" ] || [ -z "$NEXTCLOUD_USER" ] || [ -z "$NEXTCLOUD_TOKEN" ]; then
echo "ERROR: Set NEXTCLOUD_URL, NEXTCLOUD_USER, NEXTCLOUD_TOKEN env vars"
exit 1
fi
The Collectives app must be enabled on the server, and the user must be a member of the collective's team (team/circle). Creating a collective requires the collectives and circles (Teams) apps on the server.
NEXTCLOUD_URL; never send the token to unverified hosts.NEXTCLOUD_TOKEN in logs or final answers.nc_urlencode() { jq -nr --arg v "$1" '$v|@uri'; }
id, name, emoji.PageInfo object: id, title, parentId, fileName, filePath, collectivePath, emoji, subpageOrder, timestamp, lastUserId.parentId; parentId: 0 means the collective root.Readme.md.*.md files. A page with subpages becomes a folder: its content lives in <Title>/Readme.md, and the children sit next to it inside the folder. Details and path building: references/webdav-content.md.COLL_API="$NEXTCLOUD_URL/ocs/v2.php/apps/collectives/api/v1.0"
-H "OCS-APIRequest: true".?format=json.-H "Content-Type: application/json" -d '{...}'.-u "$NEXTCLOUD_USER:$NEXTCLOUD_TOKEN"..ocs.data; successful statuscode is 200. Data is under the keys collectives, collective, pages, page, attachments, attachment (shares return the share object directly).The recipes below use jq; if it is not installed, parse the same envelope with python3:
curl -sf ... | python3 -c "
import json,sys
d=json.load(sys.stdin)
for c in d['ocs']['data']['collectives']:
print(c['id'], c['name'])"
curl -sf -u "$NEXTCLOUD_USER:$NEXTCLOUD_TOKEN" \
-H "OCS-APIRequest: true" \
"$COLL_API/collectives?format=json" | jq '.ocs.data.collectives[] | {id, name, emoji, canEdit, pageMode}'
curl -sf -u "$NEXTCLOUD_USER:$NEXTCLOUD_TOKEN" \
-H "OCS-APIRequest: true" -H "Content-Type: application/json" \
-d '{"name": "Team Wiki", "emoji": "📚"}' \
"$COLL_API/collectives?format=json" | jq '.ocs.data.collective'
# Emoji
curl -sf -u "$NEXTCLOUD_USER:$NEXTCLOUD_TOKEN" -X PUT \
-H "OCS-APIRequest: true" -H "Content-Type: application/json" \
-d '{"emoji": "🚀"}' \
"$COLL_API/collectives/{id}?format=json"
# To trash (pages can be restored from trash)
curl -sf -u "$NEXTCLOUD_USER:$NEXTCLOUD_TOKEN" -X DELETE \
-H "OCS-APIRequest: true" \
"$COLL_API/collectives/{id}?format=json"
# List
curl -sf -u "$NEXTCLOUD_USER:$NEXTCLOUD_TOKEN" -H "OCS-APIRequest: true" \
"$COLL_API/collectives/trash?format=json" | jq '.ocs.data'
# Restore
curl -sf -u "$NEXTCLOUD_USER:$NEXTCLOUD_TOKEN" -X PATCH \
-H "OCS-APIRequest: true" "$COLL_API/collectives/trash/{id}?format=json"
# Delete permanently (circle=true also deletes the team)
curl -sf -u "$NEXTCLOUD_USER:$NEXTCLOUD_TOKEN" -X DELETE \
-H "OCS-APIRequest: true" "$COLL_API/collectives/trash/{id}?circle=true&format=json"
editLevel/shareLevel — who may edit/share: 1 — all members, 4 — moderators and above, 8 — team admins only.
curl -sf -u "$NEXTCLOUD_USER:$NEXTCLOUD_TOKEN" -X PUT \
-H "OCS-APIRequest: true" -H "Content-Type: application/json" \
-d '{"level": 4}' "$COLL_API/collectives/{id}/editLevel?format=json"
pageMode: 0 — view mode by default, 1 — edit mode:
curl -sf -u "$NEXTCLOUD_USER:$NEXTCLOUD_TOKEN" -X PUT \
-H "OCS-APIRequest: true" -H "Content-Type: application/json" \
-d '{"mode": 1}' "$COLL_API/collectives/{id}/pageMode?format=json"
curl -sf -u "$NEXTCLOUD_USER:$NEXTCLOUD_TOKEN" -H "OCS-APIRequest: true" \
"$COLL_API/collectives/{collectiveId}/pages?format=json" \
| jq '.ocs.data.pages[] | {id, title, parentId, emoji, fileName}'
curl -sf -u "$NEXTCLOUD_USER:$NEXTCLOUD_TOKEN" -H "OCS-APIRequest: true" \
"$COLL_API/collectives/{collectiveId}/pages?format=json" \
| jq '[.ocs.data.pages[] | {id, title, parentId}]'
# Top-level pages: parentId == 0 (plus the Readme landing page).
# Children of page X: all pages with parentId == X.id.
# Child order: subpageOrder of page X (JSON array of ids), the rest by title/timestamp.
# 1. Page metadata
page=$(curl -sf -u "$NEXTCLOUD_USER:$NEXTCLOUD_TOKEN" -H "OCS-APIRequest: true" \
"$COLL_API/collectives/{collectiveId}/pages/{pageId}?format=json" \
| jq '.ocs.data.page')
collective_path=$(jq -rn --argjson p "$page" '$p.collectivePath // ""')
file_path=$(jq -rn --argjson p "$page" '$p.filePath // ""')
file_name=$(jq -rn --argjson p "$page" '$p.fileName')
# 2. WebDAV URL. Note: @uri also encodes slashes (%2F), while collectivePath/filePath
# use slashes as separators — restore them with gsub.
page_dav=$(jq -rn --arg v "$collective_path/${file_path:+$file_path/}$file_name" \
'$v|@uri|gsub("%2F"; "/")')
curl -sf -u "$NEXTCLOUD_USER:$NEXTCLOUD_TOKEN" \
"$NEXTCLOUD_URL/remote.php/dav/files/$NEXTCLOUD_USER/$page_dav"
Never build the DAV path by hand from the collective name — the path must be built from the collectivePath, filePath and fileName fields of the PageInfo object.
# 1. Create the page in the structure (parentId=0 — top level)
page=$(curl -sf -u "$NEXTCLOUD_USER:$NEXTCLOUD_TOKEN" \
-H "OCS-APIRequest: true" -H "Content-Type: application/json" \
-d '{"title": "My article"}' \
"$COLL_API/collectives/{collectiveId}/pages/0?format=json" | jq '.ocs.data.page')
page_id=$(jq -r '.id' <<< "$page")
# 2. Build the WebDAV path from the response fields and write the content
cp_=$(jq -r '.collectivePath' <<< "$page")
fp_=$(jq -r '.filePath // ""' <<< "$page")
fn_=$(jq -r '.fileName' <<< "$page")
page_dav=$(jq -rn --arg v "$cp_/${fp_:+$fp_/}$fn_" '$v|@uri|gsub("%2F"; "/")')
printf '# My article\n\nArticle text.' | curl -sf -u "$NEXTCLOUD_USER:$NEXTCLOUD_TOKEN" \
-X PUT -H "Content-Type: text/markdown" --data-binary @- \
"$NEXTCLOUD_URL/remote.php/dav/files/$NEXTCLOUD_USER/$page_dav"
parentId = the parent page id.title must be unique among the parent's children; the server resolves collisions with a suffix.{"title": "...", "templateId": 123}.Editing = read the file, change it, write it back whole (PUT overwrites the entire file):
# 1. Download the content
curl -sf -u "$NEXTCLOUD_USER:$NEXTCLOUD_TOKEN" -o page.md \
"$NEXTCLOUD_URL/remote.php/dav/files/$NEXTCLOUD_USER/...path..."
# 2. Edit page.md (by hand, script or sed)
# 3. Write it back
curl -sf -u "$NEXTCLOUD_USER:$NEXTCLOUD_TOKEN" -X PUT \
-H "Content-Type: text/markdown" -T page.md \
"$NEXTCLOUD_URL/remote.php/dav/files/$NEXTCLOUD_USER/...path..."
If the page is being edited in the browser's Text editor at the same time, PUT overwrites those edits: re-read the file first, make changes quickly, and after writing warn the user about possible edit conflicts.
# Rename
curl -sf -u "$NEXTCLOUD_USER:$NEXTCLOUD_TOKEN" -X PUT \
-H "OCS-APIRequest: true" -H "Content-Type: application/json" \
-d '{"title": "New title"}' \
"$COLL_API/collectives/{cid}/pages/{id}?format=json"
# Move under another parent
-d '{"parentId": 42}'
# Copy
-d '{"title": "Copy", "copy": true}'
# To trash
curl -sf -u "$NEXTCLOUD_USER:$NEXTCLOUD_TOKEN" -X DELETE -H "OCS-APIRequest: true" \
"$COLL_API/collectives/{cid}/pages/{id}?format=json"
# Pages trash
curl -sf -u "$NEXTCLOUD_USER:$NEXTCLOUD_TOKEN" -H "OCS-APIRequest: true" \
"$COLL_API/collectives/{cid}/pages/trash?format=json"
# Restore
curl -sf -u "$NEXTCLOUD_USER:$NEXTCLOUD_TOKEN" -X PATCH -H "OCS-APIRequest: true" \
"$COLL_API/collectives/{cid}/pages/trash/{id}?format=json"
# Delete permanently
curl -sf -u "$NEXTCLOUD_USER:$NEXTCLOUD_TOKEN" -X DELETE -H "OCS-APIRequest: true" \
"$COLL_API/collectives/{cid}/pages/trash/{id}?format=json"
# Emoji (null — reset)
-d '{"emoji": "🔧"}' → PUT "$COLL_API/collectives/{cid}/pages/{id}/emoji?format=json"
# Manual child order (JSON string with an array of ids)
-d '{"subpageOrder": "[12,7,3]"}' → PUT ".../pages/{id}/subpageOrder?format=json"
# Full-width mode
-d '{"fullWidth": true}' → PUT ".../pages/{id}/fullWidth?format=json"
# Search a collective's page content
curl -sf -u "$NEXTCLOUD_USER:$NEXTCLOUD_TOKEN" -H "OCS-APIRequest: true" \
"$COLL_API/collectives/{cid}/search?searchString=deploy&format=json" \
| jq '.ocs.data.pages[] | {id, title, parentId}'
# Recent pages across all collectives (limit up to 100)
curl -sf -u "$NEXTCLOUD_USER:$NEXTCLOUD_TOKEN" -H "OCS-APIRequest: true" \
"$COLL_API/collectives/search/recent?query=wiki&limit=10&format=json" \
| jq '.ocs.data.pages[] | {id, title, collectivePath}'
For an exact search within a collective it is more reliable to download the pages via WebDAV and grep the files than to rely on the server's full-text search.
# List templates
curl -sf ... "$COLL_API/collectives/{cid}/pages/templates?format=json"
# Create a template (parentId — parent template id, 0 = top level)
-d '{"title": "Meeting template", "parentId": 0}' → POST ".../pages/templates/0?format=json"
# Rename (PUT), delete (DELETE) — on ".../pages/templates/{id}"
# List / create
curl -sf ... "$COLL_API/collectives/{cid}/tags?format=json"
-d '{"name": "important", "color": "FF0000"}' → POST ".../tags?format=json"
# Update (PUT) / delete (DELETE) — ".../tags/{id}"
# Add/remove a tag on a page
curl -sf ... -X PUT "$COLL_API/collectives/{cid}/pages/{pageId}/tags/{tagId}?format=json"
curl -sf ... -X DELETE "$COLL_API/collectives/{cid}/pages/{pageId}/tags/{tagId}?format=json"
# List a page's attachments
curl -sf ... "$COLL_API/collectives/{cid}/pages/{pageId}/attachments?format=json" \
| jq '.ocs.data.attachments[] | {id, name, filesize, mimetype}'
# Upload an attachment (multipart, field file)
curl -sf -u "$NEXTCLOUD_USER:$NEXTCLOUD_TOKEN" \
-H "OCS-APIRequest: true" -F "file=@./schema.png" \
"$COLL_API/collectives/{cid}/pages/{pageId}/attachments?format=json"
# Rename: PUT ".../attachments/{attachmentId}" -d '{"name": "new.png"}'
# Delete: DELETE ".../attachments/{attachmentId}"
# From trash: PATCH ".../attachments/trash/{attachmentId}"
# Create a public link to the whole collective
curl -sf -u "$NEXTCLOUD_USER:$NEXTCLOUD_TOKEN" \
-H "OCS-APIRequest: true" -H "Content-Type: application/json" \
-d '{"password": "..."}' \
"$COLL_API/collectives/{cid}/shares?format=json" | jq '.ocs.data'
# Link to a single page
curl -sf ... -d '{}' "$COLL_API/collectives/{cid}/pages/{pageId}/shares?format=json"
# Update: editability and password
-d '{"editable": false, "password": "..."}' → PUT ".../shares/{token}?format=json"
# Delete a link
curl -sf ... -X DELETE "$COLL_API/collectives/{cid}/shares/{token}?format=json"
# All shares of the collective
curl -sf ... "$COLL_API/collectives/{cid}/shares?format=json"
Public unauthenticated access to a shared page: GET /ocs/v2.php/apps/collectives/api/v1.0/p/collectives/{token}/pages (OCS-APIRequest required) or the web URL /apps/collectives/p/{token}.
# Page list sorting: 0=byOrder, 1=byTimeAsc, 2=byTitleAsc, 3=byTimeDesc, 4=byTitleDesc
-d '{"pageOrder": 2}' → PUT "$COLL_API/collectives/{cid}/userSettings/pageOrder?format=json"
# Notifications: 0=off, 1=mentions only, 2=all changes
-d '{"notify": 2}' → PUT "$COLL_API/collectives/{cid}/userSettings/notify?format=json"
# Favorite pages (JSON string with an array of ids)
-d '{"favoritePages": "[12,7]"}' → PUT ".../userSettings/favoritePages?format=json"
Page version history is standard Nextcloud Files versioning via WebDAV: how to get a page's fileId and download an old version — references/webdav-content.md.
| Problem | Cause | Fix |
|---|---|---|
| 997 / CSRF check failed | Missing header | -H "OCS-APIRequest: true" |
| 401 Unauthorized | Wrong token | Use an app token instead of the password, check NEXTCLOUD_TOKEN |
| 404 on pages | Wrong collectiveId or no access | First GET /collectives, take id from there |
| 403 on POST/PUT | Insufficient rights | Team level is below the collective's editLevel |
| 404 on a WebDAV path | Path built by hand | Build the path only from collectivePath/filePath/fileName |
| App unavailable | collectives (or circles) not enabled | Install/enable the apps on the server |
| Empty content after creation | WebDAV PUT step skipped | Creating a page does not set content — write the .md separately |
references/api-reference.md — full v1.0 endpoint catalog (incl. public /p/), body and response formats, PageInfo/Collective/PageAttachment/CollectiveShare/Tag schemas.references/webdav-content.md — on-disk layout of a collective, building WebDAV paths, PROPFIND, page versions, collaborative editing safety.nextcloud-admin — the same instance from the files side: regular shares, users, groups, quotas, app tokens, apps.Russian version: references/README.ru.md.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub nordz0r/skills --plugin all-skills28 skills in this plugin
/administering-linuxHands-on Linux administration of a systemd host: journalctl, systemctl, unit, drop-in, failed-service after reboot, OOM, df, ssh, Ubuntu Debian. Not Docker and not Ansible. Triggers: journalctl, unit file, drop-in, oom killer, disk full, sshd, ubuntu server, failed unit, vendor unit, host troubleshooting, сервер, диск заполнен, служба не стартует, логи, линукс./agency-database-optimizerDatabase design, migration safety, indexing, EXPLAIN analysis, query tuning, connection management, and production-safe PostgreSQL or MySQL changes. Use whenever the user mentions Postgres, PostgreSQL, MySQL, MariaDB, slow queries, schema design, migrations, locking risk, indexing, SQL plans, or wants to move an app between database engines safely./Other plugins' skills for the same job
2 plugins in one repository ship this exact skill · first indexed Nov 15, 2026