brain-file-delivery

Delivers newly written brain files as attachments to Telegram and Slack.

1|Updated Jun 21, 2026
One-click install
npx skills add https://github.com/tapway/shogun-os --skill brain-file-delivery-tapway
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: brain-file-delivery
Source: https://github.com/tapway/shogun-os/tree/main/skills/gbrain/brain-file-delivery
Command: npx skills add https://github.com/tapway/shogun-os --skill brain-file-delivery-tapway

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When brain files are created or modified, recipients often receive only file paths or links instead of the actual document. This Skill enforces a mandatory rule: every brain file write is followed by delivering the real file as an attachment to both Telegram and Slack, eliminating broken links and missed deliveries. ## Core Features & Use Cases - Telegram attachment delivery: Include a MEDIA:/absolute/path line in the response so the Telegram gateway sends the file as a native attachment (supports .md, .png, .pdf, .csv, and more). - Slack 3-step upload flow: Uses files.getUploadURLExternal, raw byte upload, and files.completeUploadExternal since the legacy files.upload API is deprecated. - Edge case handling: Skips Slack for files over 20MB (offers a GDrive link instead), falls back to Telegram-only delivery when the Slack token is missing, and supports multiple files per operation. - Use Case: After writing a new person page via mcp_gbrain_put_page, the agent automatically attaches the Markdown file to the Telegram chat and uploads it to the Slack Admin DM, confirming both deliveries. ## Quick Start After writing any brain file, attach it to Telegram with a MEDIA: line and upload it to Slack using the slack-upload-brain-file.py script with the file path and channel ID.

Frequently Asked Questions about brain-file-delivery

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I send a file as an attachment to Slack with the API?

Use the 3-step upload flow: call files.getUploadURLExternal with the filename and size, POST the raw bytes to the returned upload URL, then call files.completeUploadExternal with the file ID and channel_id. The legacy files.upload endpoint is deprecated and returns method_deprecated.

How do I attach files in Telegram bot responses?

Include a MEDIA:/absolute/path/to/file line in your response text. The Telegram gateway auto-detects the prefix and sends the file as a native attachment. It supports .md, .png, .jpg, .webp, .ogg, .mp4, .pdf, .txt, .json, and .csv files.

Why does Slack files.upload return method_deprecated?

Slack retired the files.upload endpoint, so it now returns a method_deprecated error. Migrate to the external upload flow using files.getUploadURLExternal and files.completeUploadExternal, which this Skill's Python script implements.

Can I use the MEDIA: prefix to send files to Slack?

No, the MEDIA: prefix is Telegram-only. Slack renders it as broken raw text. For Slack you must upload the file through the 3-step API with a valid SLACK_BOT_TOKEN and the target channel_id.

What happens when a brain file exceeds the Slack file size limit?

Files over 20MB skip the Slack upload entirely. The delivery notes the size limit and offers a GDrive link instead, while Telegram delivery proceeds normally.