attachments

A workspace contract for handling files received through channels such as Slack or Telegram. Downloaded files are placed in a local session folder, and coding agents receive their local paths.

In plain words
What is it for?
Use it to define where inbound attachments are stored and how their paths are added to agent prompts.
Why use it?
It keeps agents independent of the original messaging service and lets them work with attachments as ordinary local files.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/longbkit/clisbot/attachments
Clone the repo
git clone --depth 1 https://github.com/longbkit/clisbot
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 498 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00498
Opus 5 $0.00000 $0.00249
Sonnet 5 $0.00000 $0.00100
Haiku 4.5 $0.00000 $0.00050

Measured 2d ago against content hash 024100104d1c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

attachments scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/features/agents/attachments.md · 87 lines

How it starts

The opening of the file, as written. The whole thing — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent Workspace Attachments

Summary

The agents layer owns inbound attachment placement inside the agent workspace.

Current contract:

  • channels detect inbound files from Slack or Telegram
  • channels download those files
  • the agents layer owns where they live in the workspace
  • runners receive only local file paths through the prompt text

State

Active

Why It Exists

clisbot is strongest when Codex or Claude can work with normal local files.

That means inbound channel files should become workspace-local files instead of staying as remote Slack or Telegram objects.

Ownership Rule

The agents layer owns:

  • the workspace-local attachment directory
  • per-session attachment placement
  • attachment path shape inside the workspace

Channels own:

  • provider-specific file detection
  • provider-specific download auth
  • provider-specific file download

Runners must not know whether a file came from Slack or Telegram.

Current Contract

Inbound files are stored under:

  • {workspacePath}/.attachments/{sessionKey}/{messageId}/...

Current prompt contract is intentionally minimal:

  • prepend one @/absolute/path token per stored file
  • then append the user message text
  • for explicit /queue and /steer, attach the stored file tokens to the queued or steered payload, not to the control command itself
  • Telegram media groups are treated as one inbound message when Telegram supplies media_group_id, so one album becomes one prompt with multiple local attachment paths

Example:

@/Users/example/.clisbot/workspace/default/.attachments/agent-default-main/1771/spec.md Please review this file

No extra metadata block is required in the current MVP slice.

Design Constraints

  • files must stay inside the agent workspace
  • files must not be written into the workspace root directly
  • storage must be hidden by default under .attachments
  • one conversation must not overwrite another conversation's files
  • the contract must stay channel-agnostic for runners

Read the full file on GitHub · 87 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 87 lines · 0 tokens per session scan A 024100104d1c

Subscribe to this mod's changes

attachments is an agent published in the GitHub repository longbkit/clisbot (114 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 498 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.