Skip to main content الرئيسية المنشئون impertio-studio nextcloud-claude-skill-package nextcloud-syntax-webdav
nextcloud-syntax-webdav Use when performing file operations via WebDAV, implementing chunked uploads, or querying file properties. Prevents incorrect DAV endpoint paths, missing Destination headers on MOVE/COPY, and broken chunked upload sequences. Covers DAV endpoint structure, file operations (PROPFIND/GET/PUT/MKCOL/MOVE/COPY/DELETE), property namespaces, special headers, chunked upload v2 protocol, and public share DAV access. Keywords: WebDAV, PROPFIND, MKCOL, chunked upload, /remote.php/dav, OC-Chunked, Destination header, WebDAV client, file sync, upload large file, PROPFIND, remote file access..
الانتقال إلى التثبيت سوق المهارات اكتشف واستكشف مهارات الذكاء الاصطناعي التي بناها المجتمع.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
نسخ Promptعرض تفاصيل Prompt يتجاوز الأمر المباشر Prompt المخصّص للمراجعة. افحص المصدر قبل تشغيله.
npx skills add https://github.com/Impertio-Studio/Nextcloud-Claude-Skill-Package --skill nextcloud-syntax-webdavيبقى الأمر في سطر واحد. مرّر أفقيًا لمراجعته كاملًا قبل النسخ.
تفضّل نسخة محلية؟ نزّل الملفات المتاحة حاليًا لدى SkillsMP.
تحميل Zip جاري التحميل... nextcloud-agents-app-scaffolder Use when generating a new Nextcloud app from scratch, scaffolding app features, or creating a complete app template. Prevents incomplete app structures, missing bootstrap registration, and wrong directory conventions. Covers PHP backend with controllers, services, entities and mappers, Vue.js frontend with @nextcloud packages, info.xml manifest, routes.php, database migrations, Application.php bootstrap, webpack configuration, and test infrastructure. Keywords: app generator, scaffold, boilerplate, info.xml, routes.php, Application.php, webpack, app template, create new app, start from scratch, app template, bootstrap app, generate app..
Use when reviewing Nextcloud app code, validating before deployment, or checking for common mistakes. Prevents deploying code with missing security attributes, incorrect DI patterns, and known anti-patterns. Covers controller security attributes, OCS endpoint patterns, database migration integrity, DI patterns, frontend import paths, CSRF handling, file API usage, and known anti-patterns. Keywords: code review, validation, security attributes, anti-pattern, DI check, migration check, CSRF check, deployment, check my code, review before deploy, find mistakes, validate app quality..
nextcloud-core-architecture Use when creating Nextcloud apps, understanding the platform architecture, or configuring dependency injection. Prevents misuse of IBootstrap phases, incorrect DI wiring, and violating the OCP interface contract. Covers PHP backend structure, Vue.js frontend layer, app lifecycle with IBootstrap register/boot phases, dependency injection with auto-wiring, service layer patterns, and key OCP interfaces. Keywords: IBootstrap, register, boot, OCP, dependency injection, auto-wiring, service layer, Application.php, how Nextcloud works, app structure, DI container, lifecycle phases, getting started..
المهن ذات الصلة SOC
استنادا إلى تصنيف SOC المهني
name nextcloud-syntax-webdav description Use when performing file operations via WebDAV, implementing chunked uploads, or querying file properties. Prevents incorrect DAV endpoint paths, missing Destination headers on MOVE/COPY, and broken chunked upload sequences. Covers DAV endpoint structure, file operations (PROPFIND/GET/PUT/MKCOL/MOVE/COPY/DELETE), property namespaces, special headers, chunked upload v2 protocol, and public share DAV access. Keywords: WebDAV, PROPFIND, MKCOL, chunked upload, /remote.php/dav, OC-Chunked, Destination header, WebDAV client, file sync, upload large file, PROPFIND, remote file access..
license MIT compatibility Designed for Claude Code. Requires Nextcloud 28+. metadata {"author":"OpenAEC-Foundation","version":"1.0"}
nextcloud-syntax-webdav
Quick Reference
DAV Endpoint Structure
Endpoint Purpose /remote.php/dav/files/{username}/File operations /remote.php/dav/calendars/{username}/Calendar access (CalDAV) /remote.php/dav/addressbooks/users/{username}/
/remote.php/dav/uploads/{username}/Chunked upload staging
/remote.php/dav/trashbin/{username}/Trash operations
/remote.php/dav/versions/{username}/File version history
/public.php/dav/files/{share_token}/Public share access (NC 29+)
File Operations Method Purpose Required Headers PROPFIND List directory / get properties Depth: 0|1 + XML bodyGET Download file None PUT Upload file Optional: X-OC-MTime, OC-Checksum MKCOL Create directory None MOVE Rename or move Destination (full URL)COPY Duplicate file Destination (full URL)DELETE Remove file or directory None
Property Namespaces URI Prefix Origin DAV:dWebDAV standard (RFC 4918) http://owncloud.org/nsocownCloud legacy properties http://nextcloud.org/nsncNextcloud-specific properties http://open-collaboration-services.org/nsocsOpen Collaboration Services http://open-cloud-mesh.org/nsocmOpen Cloud Mesh
Common Properties Property Namespace Type Description getlastmodifiedddatetime Last modification time getetagdstring Entity tag for caching getcontenttypedstring MIME type getcontentlengthdinteger File size in bytes resourcetypedelement <d:collection/> for directoriesfileidocinteger Nextcloud internal file ID permissionsocstring Permission flags (RGDNVCK) favoriteocinteger 0 or 1 comments-unreadocinteger Unread comment count has-previewncboolean Preview generation available mount-typencstring Storage mount type is-encryptedncinteger End-to-end encryption flag lockncinteger File lock status share-attributesncJSON Share attribute metadata
Special Request Headers Header Purpose Direction X-OC-MTimeSet modification timestamp (Unix epoch) Request X-OC-CTimeSet creation timestamp (Unix epoch) Request OC-ChecksumStore checksum (MD5:xxx, SHA1:xxx, SHA256:xxx) Request X-HashRequest server to compute hash (md5, sha1, sha256) Request X-Hash-MD5 / X-Hash-SHA1 / X-Hash-SHA256Computed hash values Response OC-EtagFile etag on create/move/copy Response OC-FileIdFile identifier (padded-id + instance-id) Response OC-Total-LengthTotal file size for quota checks Request X-NC-WebDAV-AutoMkcolAuto-create parent directories (set to 1) Request OverwriteT (overwrite) or F (fail if exists) on MOVE/COPYRequest
Depth Header Values (PROPFIND) Value Behavior 0Target resource only 1Target + immediate children infinityRecursive (may be disabled on server)
Critical Warnings NEVER omit the Destination header on MOVE or COPY requests -- the server returns 400 Bad Request.
NEVER use Depth: infinity on large directories -- the server may time out or reject the request. ALWAYS use Depth: 1 and paginate manually.
NEVER skip checksum verification on important uploads -- ALWAYS send the OC-Checksum header with format ALGO:HASH (e.g., SHA256:abc123).
NEVER assume chunk assembly order -- chunks are assembled in numeric filename order regardless of upload sequence.
NEVER use relative paths in the Destination header -- ALWAYS use the full absolute URL including scheme and host.
ALWAYS authenticate WebDAV requests with basic auth (username + app password) or bearer token.
ALWAYS include the XML namespace declarations in PROPFIND request bodies -- omitting them causes property resolution failures.
ALWAYS use Depth: 1 as the default for directory listings -- it is the most common and safest option.
Essential Patterns
Pattern 1: List Directory Contents (PROPFIND) curl 'https://cloud.example.com/remote.php/dav/files/username/Documents' \
--user "$USER :$APP_PASSWORD " \
--request PROPFIND \
--header 'Depth: 1' \
--data '<?xml version="1.0" encoding="UTF-8"?>
<d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
<d:prop>
<d:getlastmodified/>
<d:getcontentlength/>
<d:getcontenttype/>
<d:resourcetype/>
<d:getetag/>
<oc:fileid/>
<oc:permissions/>
</d:prop>
</d:propfind>'
Response is a 207 Multi-Status XML with one <d:response> per item. The first response is the directory itself.
Pattern 2: Upload File with Metadata curl 'https://cloud.example.com/remote.php/dav/files/username/report.pdf' \
--user "$USER :$APP_PASSWORD " \
--request PUT \
--upload-file ./report.pdf \
--header 'X-OC-MTime: 1700000000' \
--header 'OC-Checksum: SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' \
--header 'X-NC-WebDAV-AutoMkcol: 1'
The X-NC-WebDAV-AutoMkcol: 1 header auto-creates any missing parent directories.
Pattern 3: Move/Rename a File curl 'https://cloud.example.com/remote.php/dav/files/username/old-name.txt' \
--user "$USER :$APP_PASSWORD " \
--request MOVE \
--header 'Destination: https://cloud.example.com/remote.php/dav/files/username/subfolder/new-name.txt' \
--header 'Overwrite: F'
Overwrite: F prevents overwriting an existing file at the destination. Use Overwrite: T (default) to allow it.
Pattern 4: Chunked Upload v2 (Large Files) Three-step protocol for reliable large file uploads:
Step 1: Create upload directory
curl -X MKCOL --user "$USER :$APP_PASSWORD " \
'https://cloud.example.com/remote.php/dav/uploads/username/myapp-unique-upload-id' \
--header 'Destination: https://cloud.example.com/remote.php/dav/files/username/dest/largefile.zip'
Step 2: Upload chunks (5MB-5GB each)
curl -X PUT --user "$USER :$APP_PASSWORD " \
'https://cloud.example.com/remote.php/dav/uploads/username/myapp-unique-upload-id/00001' \
--data-binary @chunk1.bin \
--header 'Destination: https://cloud.example.com/remote.php/dav/files/username/dest/largefile.zip' \
--header 'OC-Total-Length: 52428800'
curl -X PUT --user "$USER :$APP_PASSWORD " \
'https://cloud.example.com/remote.php/dav/uploads/username/myapp-unique-upload-id/00002' \
--data-binary @chunk2.bin \
--header 'Destination: https://cloud.example.com/remote.php/dav/files/username/dest/largefile.zip' \
--header 'OC-Total-Length: 52428800'
Step 3: Assemble file (MOVE .file)
curl -X MOVE --user "$USER :$APP_PASSWORD " \
'https://cloud.example.com/remote.php/dav/uploads/username/myapp-unique-upload-id/.file' \
--header 'Destination: https://cloud.example.com/remote.php/dav/files/username/dest/largefile.zip' \
--header 'OC-Total-Length: 52428800' \
--header 'X-OC-MTime: 1700000000'
Constraints : Chunk names must be numbers 1-10000. Final chunk can be smaller than 5MB. Upload directory expires after 24 hours of inactivity. OC-Total-Length triggers quota validation (returns 507 Insufficient Storage if exceeded). To abort: DELETE the upload directory.
Pattern 5: Public Share Access (NC 29+)
curl 'https://cloud.example.com/public.php/dav/files/SHARE_TOKEN/' \
--request PROPFIND \
--header 'Depth: 1' \
--data '<?xml version="1.0"?><d:propfind xmlns:d="DAV:"><d:prop><d:resourcetype/></d:prop></d:propfind>'
curl 'https://cloud.example.com/public.php/dav/files/SHARE_TOKEN/' \
--user 'anonymous:' \
--request PROPFIND \
--header 'Depth: 1' \
--data '<?xml version="1.0"?><d:propfind xmlns:d="DAV:"><d:prop><d:resourcetype/></d:prop></d:propfind>'
Password-protected shares use basic auth with username anonymous and the share password as the password.
Pattern 6: Download Folder as ZIP curl 'https://cloud.example.com/remote.php/dav/files/username/ProjectFolder' \
--user "$USER :$APP_PASSWORD " \
--header 'Accept: application/zip' \
--output project.zip
Optionally filter which files to include using the X-NC-Files header or files query parameter (JSON array of filenames).
Chunked Upload Decision Tree File size > 5MB?
├── YES → Use chunked upload v2
│ ├── Generate unique upload ID (UUID recommended)
│ ├── MKCOL → create upload directory
│ ├── Split file into 5MB-5GB chunks
│ ├── PUT each chunk (numbered 00001-10000)
│ ├── MOVE .file → assemble at destination
│ └── On failure → DELETE upload directory to clean up
└── NO → Use simple PUT
├── Include OC-Checksum for integrity
└── Include X-OC-MTime to preserve timestamp
Permission Flags (oc:permissions) Flag Meaning RRead (Shareable) GRead (not shareable) DDelete NRename/Move (NV = move into) VMove from CCreate (new files/folders) KCreate (new files only, not folders) WWrite (update content)
Reference Links
Official Sources