mininglamp-oss/octo-cli/octo-files
Claude Code and agent skill by mininglamp-oss/octo-cli
- community
Checking that the SKILL.md file is still in the repository.
File operations (upload/download, presigned S3 credentials) plus bot housekeeping (register, set-commands, user-info, space-members, typing, heartbeat). Load after octo-shared.
Install
npx vskill@latest install mininglamp-oss/octo-cli/octo-filesSKILL.md
octo-files — file I/O and bot housekeeping
Two small domains are covered here because they share a base URL ($OCTO_API_BASE_URL/v1/bot/*) and are usually needed together:
file— 4 ops, no bot-kind restrictionsbot— 6 ops, no bot-kind restrictions
1. File operations
upload — multipart form
Unlike most commands, file upload sends a multipart multipart/form-data body, not JSON. The --file flag is required and names a local path. --type (default chat) and --path are query parameters; they are not multipart form fields. The multipart body carries the file and any promoted body fields declared in the spec as text fields.
The maximum size and allowed/blocked extensions follow the current backend file policy. Multipart uploads and presigned URL issuance check that policy, including the configured file-size cap. The STS file credentials endpoint checks the filename/extension but has no size input or size check in the inspected backend; external COS enforcement for those credentials is unverified, so do not assume STS bypasses the file-size policy. There is no fixed 100 MB ceiling guaranteed by the CLI.
The response envelope carries the returned file descriptor under data — use it to build attachment references in message send.
download — returns a presigned URL
file download <path> issues a GET. The backend responds with a 302 redirect to the storage tier. The CLI does not stream raw bytes — instead it returns a JSON envelope containing the presigned URL:
To actually fetch the file, use the URL from the response:
Direct-to-S3 uploads
For the direct-to-S3 workflow, request a presigned target from the backend:
file presigned requires `--fileSize` (bytes) — the size is signed into the PUT Content-Length, so the upload must carry exactly that many bytes. A missing or non-positive value is rejected; a value above the current file-size cap is rejected as file_too_large (HTTP 400). It returns {method, uploadUrl, downloadUrl, contentType, [contentDisposition], key, expiresIn, expiredTime, maxFileSize} — a one-shot signed URL (echo contentDisposition verbatim on the PUT if present). file credentials returns STS-style temporary credentials ({bucket, region, key, credentials:{tmpSecretId, tmpSecretKey, sessionToken}, startTime, expiredTime, cdnBaseUrl}) for SDK-driven uploads; their external COS size enforcement is not established.
2. Bot housekeeping
bot space-members uses a one-based --page (defaults to 1; capped at 1,000,000) and a --limit (defaults to 50; maximum 200). Request later pages by incrementing --page yourself; this operation does not provide --page-all.
bot register — special auth
register is the only operation not behind the authBot middleware. The backend routes it by token prefix: app_* → registerAppBot, bf_* → registerUserBot. You still supply the normal environment credential (OCTO_TOKEN, or legacy alias OCTO_BOT_TOKEN); the CLI treats the call like any other.
For CLI housekeeping, run bot register during publish to capture owner_uid for caching; then use bot set-commands to advertise slash-command metadata. Registration is repeatable, not an exactly-once backend rule: a runtime may call it again to retrieve current connection information, and User Bots can re-register to recover after disconnection.
The optional agent-platform, agent-version, plugin-version, and agent-hosting fields report runtime metadata. Only User Bot (bf_*) registration persists agent metadata; App Bot (app_*) ignores it. agent-hosting is normalized by the backend to an open-vocabulary lowercase ASCII slug (starts with a letter, then letters/digits/underscores; at most 64 bytes). none retracts the marker, while empty or omitted means unchanged. Invalid metadata is ignored without failing registration. These fields are metadata, not a replacement for the bot token.
Get the owner_uid from bot register
bot user-info needs --uid and returns only {uid, name, avatar} — it does not carry owner_uid. The bot's owner_uid comes from bot register; cache it as CLI housekeeping (for example, in env/config) when later commands need it. This recommendation does not prevent a runtime from registering again for current connection information or recovery:
Use this raw owner UID as creator_uid only where the operation schema requires the bot owner. Inspect an active operation with octo-cli schema <operation-id>.
typing and heartbeat
Both are fire-and-forget. typing signals an "…is typing" UI state in DM channels. heartbeat refreshes bot liveness — call it on a long-running poll loop so the platform knows the bot is alive.
3. Common pattern: message attachment end-to-end
4. Error recovery
| Symptom | Fix | |
|---|---|---|
upload → file_too_large (HTTP 400) | The configured file-size policy was exceeded. Reduce the file or ask an administrator about the policy; presigned URL issuance checks the same cap. | |
payload_too_large / PAYLOAD_TOO_LARGE (HTTP 413) | A distinct request-payload-size response, not the file-policy file_too_large error. Follow the affected endpoint's limit; do not assume presigned or STS upload bypasses it. | |
upload → validation "--file is required" | Path is empty or unreadable; check permissions and absolute path. | |
download returns JSON instead of bytes | Expected; extract .data.url and fetch with curl/wget. | |
bot typing returns 200 but no UI update | Channel type must be 1 and the DM must exist. | |
bot register rejected with UNAUTHORIZED | Token prefix/env mismatch — confirm with octo-cli config show. |
5. Schema lookup
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/octo-files/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/mininglamp-oss/octo-cli/octo-files)