From paperless
Download a Paperless-ngx document file by ID to a temp folder. Use when the user wants to download or open a document, says "view document ID N", "download doc N", or asks to open a Paperless file. If invoked from a Telegram channel, uploads the file to Telegram automatically.
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.
Reviews prose for communication issues impeding comprehension, outputs minimal fixes in a three-column table per Microsoft Writing Style Guide. Useful for 'review prose' or 'improve prose' requests.
<quick_start>
/paperless:view-document <document id>
Example: /paperless:view-document 774
</quick_start>
<argument_parsing>
Parse $ARGUMENTS for a document ID (integer). If none provided:
Usage: /paperless:view-document <document id>
Example: /paperless:view-document 774
</argument_parsing>
<workflow> **Fetch metadata:**http --ignore-stdin -b \
GET "${PAPERLESS_URL%/}/api/documents/<ID>/" \
"Authorization:Token $TOKEN" \
"Accept:application/json; version=6"
See <base_dir>/../../references/document-display.md for not-found handling and filename sanitization rules. Extract title, archived_file_name, original_file_name.
Download:
Prefer the archived version. Use curl for binary downloads:
TMPDIR=$(mktemp -d /tmp/paperless-XXXXXX)
FILENAME="${TMPDIR}/<sanitized_title>.pdf"
curl -s -L \
-H "Authorization: Token $TOKEN" \
-o "$FILENAME" \
"${PAPERLESS_URL%/}/api/documents/<ID>/download/"
Verify the file is non-zero size. Pass ?original=true only if the user explicitly requests the original file.
Output:
Read <base_dir>/../../references/document-display.md for Telegram and CLI output format.
</workflow>
<success_criteria>