From paperless
Upload a document to Paperless-ngx. Use when the user wants to add a file to Paperless-ngx, says "upload this document", "add to paperless", or provides a file path to ingest.
npx claudepluginhub cameri/claude-skills --plugin paperlessThis skill is limited to using the following tools:
<objective>
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Generates or updates index.md listing all files and subdirectories in a target folder with 3-10 word descriptions from file contents. Use for indexing documentation directories.
<quick_start>
/paperless:upload-document file=<path>
Example: /paperless:upload-document file=~/Downloads/invoice.pdf title="January Invoice"
</quick_start>
<argument_parsing>
Parse $ARGUMENTS as key=value pairs:
| Key | Description |
|---|---|
file=<path> | Required. Absolute or ~-expanded file path |
title=<text> | Optional title |
created=<date> | Optional date, e.g. 2024-01-15 |
correspondent=<id> | Correspondent ID (integer) |
document_type=<id> | Document type ID (integer) |
tags=<id,id,...> | Comma-separated tag IDs |
asn=<number> | Archive serial number |
If file is missing: "Please provide a file path, e.g. /paperless:upload-document file=~/Downloads/invoice.pdf"
</argument_parsing>
http --ignore-stdin -b \
POST "${PAPERLESS_URL%/}/api/documents/post_document/" \
"Authorization:Token $TOKEN" \
"Accept:application/json; version=6" \
document@"$FILE_PATH" \
[title="$TITLE"] [created="$CREATED"] \
[correspondent="$CORRESPONDENT"] [document_type="$DOCUMENT_TYPE"] \
[archive_serial_number="$ASN"] \
[tags=<id1> tags=<id2> ...]
The response is a task UUID string — strip quotes: echo "$RESPONSE" | tr -d '"'.
Poll GET /api/tasks/?task_id=<uuid> up to 10 times with 5-second delays:
"SUCCESS" → "✓ Uploaded. Document ID: results[0].related_document""FAILURE" → show results[0].result and stop"PENDING" / "STARTED" → keep pollingIf 10 attempts exhaust without terminal state: "Upload queued (task <uuid>). Check later with GET /api/tasks/?task_id=<uuid>."
</workflow>
<success_criteria>