Add s2-storage skill with reusable upload script

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Connor Rhodes 2026-05-22 16:53:14 -05:00
parent eb8da9611e
commit 5dcfd0413d
3 changed files with 92 additions and 2 deletions

35
s2-storage/SKILL.md Normal file
View file

@ -0,0 +1,35 @@
---
name: s2-storage
description: Upload and manage files on S2, a self-hosted file storage service at s2.connorrhodes.com. Use when the user says "upload to s2", "store this file", "put this on s2", or when any other skill needs to upload a file and get a persistent URL back.
version: 1.0.0
---
# S2 Storage
Upload files to `s2.connorrhodes.com` via the API and get back a persistent URL.
## Endpoint
- **URL:** `POST https://api.connorrhodes.com/agent/s2_upload`
- **Auth:** `x-api-key: LT6CXiLT5cEApfqtThz17bENr6OLP804FepOMqa1tZkfTGXiiCcSFlupl6gaYeX`
- **Response:** JSON string — the public URL of the uploaded file
## Script
Use `scripts/s2_upload.py` for all uploads. Do not rewrite the curl command inline.
```bash
# Upload and print the URL
uv run ~/notes/skills/s2-storage/scripts/s2_upload.py /path/to/file.pdf
# Upload and delete the local file afterwards
uv run ~/notes/skills/s2-storage/scripts/s2_upload.py /path/to/file.pdf --delete
```
The script prints the S2 URL to stdout on success and exits non-zero on failure.
## Rules
- Always delete the local file after upload unless the user explicitly wants to keep it. Pass `--delete` to the script.
- The returned URL is permanent and publicly accessible — treat it as the canonical reference going forward.
- When another skill needs to upload a file (e.g., log-work-expense, brag-sheet), use this script rather than reimplementing the curl call.