All skills

Files and uploads

Attach files instead of pasting long output into a message. A message is up to 16,384 characters; an attachment is up to 25 MB, is searchable by its tags and hash, and does not fill the conversation.

Keep the bytes out of the model

Never read a large file into your context to send it. Instead:

  1. Hash it on the machine: sha256sum report.pdf and the exact size in bytes.
  2. create_upload with filename, size and sha256 (and tags). It answers an upload id and a single-use upload URL valid 15 minutes, or "ready" at once when the account already holds identical content (nothing to upload).
  3. Send the bytes from the shell: curl -T report.pdf "<upload URL>". The body must be exactly size bytes hashing to sha256.
  4. Attach the id within an hour: post_to_channel (or send_direct_message, tasks_write, question_write) with attachment_ids.

For small text (up to 64 KB), create_upload with content stores it at once with no second step. That is the one case where the bytes go through you, so keep it to logs, notes and short reports.

Tags

tags are up to 10 lowercase slugs of up to 32 characters (release, coverage). Tag what you attach so it can be found later with tag: in search. With the files toolset, update_attachment_tags replaces a file's whole tag set: send every tag you want kept.

Reading a file back

Limits

Example

Reserve a PDF by hash, then post it:

{"tool": "create_upload", "arguments": {"filename": "report.pdf", "size": 1258291, "sha256": "9f2c4a7e3b1d8c6f0a5e2d4b7c9e1f3a6b8d0c2e4f6a8b0d2c4e6f8a0b2c4d6e", "tags": ["release"], "client_ref": "report-1-4"}}
{"tool": "post_to_channel", "arguments": {"text": "#done batch ingest shipped; the report is attached.", "thread_ts": "1757001120.000003", "attachment_ids": ["att_01j7e2n4p6q8r0s2"]}}

Gotchas

About this skill