upload-case
БесплатноБез исполняемых скриптовНе проверенUse when uploading PDF documents as new cases to Stream Claims, when user says "upload", "create a case", "submit this PDF", or references files to upload to…
от FDU-INS★ 84 звезды на GitHubОб этом скилле
Upload Case
Upload one or more PDFs as a new case to Stream Claims.
Parameters
Gather these from the user before starting. Ask for anything missing.
| Parameter | Required | Default | Notes |
|---|---|---|---|
| PDF path(s) | Yes | - | Absolute path(s) on local filesystem or S3 URI |
| Case ID | Yes | - | Identifier for the new case |
| LOB | No | WC | WC (Workers' Comp) or BI (Bodily Injury) |
| First Name | No | "John" | Auto-extracted from real PDFs when using browser flow |
| Last Name | No | "Doe" | Auto-extracted from real PDFs when using browser flow |
| Environment | No | eilamdev | URL prefix: {env}.dev.stream.claims |
| AWS Profile | No | default | AWS CLI profile for S3 operations |
Approach Selection
Two approaches exist. Choose based on file size and source:
| Scenario | Approach |
|---|---|
| PDF on local disk or S3 (any size) | Hybrid API (recommended) |
| Small PDF (<500KB) on local disk, need AI extraction | Browser automation (fallback) |
The hybrid API approach is strongly recommended. It bypasses browser limitations with large files and Tailscale routing issues that block cross-origin requests.
Prerequisites: Browser Authentication
This skill requires chrome-in-chrome (the Claude browser extension) for authenticated API calls. Before starting:
- Load the extension:
ToolSearch: select:mcp__claude-in-chrome__tabs_context_mcp - Call
tabs_context_mcp(createIfEmpty: true)
If chrome-in-chrome returns "Browser extension is not connected":
- STOP. Do NOT attempt workarounds (no Cognito admin auth, no password changes, no modifying auth flows).
- Flag to the user: "Chrome-in-chrome extension isn't connected. Please make sure the Claude browser extension is running in Chrome and you're logged into claude.ai, then try again."
- The S3 download/upload steps can proceed independently, but the API calls (presigned URL + case creation) require the authenticated browser session.
Do NOT use chrome-devtools as a fallback — it opens a separate browser without the user's session cookies.
Approach 1: Hybrid API (Recommended)
Uses browser JS for authenticated same-origin API calls + AWS CLI for S3 upload. This works reliably for files of any size.
1. Determine the S3 bucket for the target environment
The masterbucket follows the naming convention: {stackname}-masterbucket{suffix}-{hash} (the suffix varies per environment)
# For eilamdev (default profile):
aws s3 ls --profile default | grep masterbucket
# Example: eilamdevstack-masterbucket7c03eada-chzxxwprmgbe
# For other environments, use the appropriate profile
2. Get PDF page count
# If the file is local:
python3 -c "
import subprocess
result = subprocess.run(['mdls', '-name', 'kMDItemNumberOfPages', '/path/to/file.pdf'], capture_output=True, text=True)
print(result.stdout)
"
# Or with PyPDF2/pikepdf if available:
python3 -c "
from pypdf import PdfReader
r = PdfReader('/path/to/file.pdf')
print(len(r.pages))
"
# If the file is on S3, download it first to /tmp
3. Get browser context
IMPORTANT: You MUST load chrome tools via ToolSearch before using them.
ToolSearch: select:mcp__claude-in-chrome__tabs_context_mcp
tabs_context_mcp(createIfEmpty: true)
ToolSearch: select:mcp__claude-in-chrome__tabs_create_mcp
tabs_create_mcp() // always create a fresh tab
Navigate via JavaScript (regular navigate fails for internal domains):
ToolSearch: select:mcp__claude-in-chrome__javascript_tool
javascript_tool(action: "javascript_exec", tabId: TAB_ID,
text: "window.location.href = 'https://{env}.dev.stream.claims'")
Wait 5s for page load, then screenshot to confirm the Cases dashboard loaded.
4. Get presigned S3 URL via browser JS
The browser has an authenticated session (via chrome-in-chrome). Use it to call the same-origin API:
const caseId = 'YOUR_CASE_ID';
const fileName = 'your-file.pdf';
const response = await fetch(`/case/${encodeURIComponent(caseId)}/presigned_url_case`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ file_names: [fileName] })
});
const data = await response.json();
// Returns: { presignedUrls: [{ fileName, url, fields: { key, ... } }] }
JSON.stringify(data);
Extract the fields.key value from the first entry — this is the S3 key where the file should be uploaded.
5. Upload file to S3 via AWS CLI
Use the S3 key from step 4 to upload directly to the environment's masterbucket:
# From local file:
aws s3 cp /path/to/file.pdf "s3://MASTERBUCKET/upload/CASE_ID/FILENAME.pdf" --profile PROFILE
# From another S3 bucket (cross-account copy):
aws s3 cp "s3://SOURCE_BUCKET/path/to/file.pdf" /tmp/temp-file.pdf --profile source_profile
aws s3 cp /tmp/temp-file.pdf "s3://DEST_BUCKET/upload/CASE_ID/FILENAME.pdf" --profile dest_profile
6. Create case via browser JS
Установить upload-case в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл upload-case?
Use when uploading PDF documents as new cases to Stream Claims, when user says "upload", "create a case", "submit this PDF", or references files to upload to the platform
Как установить скилл upload-case?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл upload-case запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic