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.
npx skills add EthanYoQ/Skill-hub --skill coze-file-sendgit clone --depth 1 https://github.com/EthanYoQ/Skill-hubWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/ethanyoq/skill-hub/coze-file-send)<a href="https://agentmods.dev/skills/ethanyoq/skill-hub/coze-file-send"><img src="https://agentmods.dev/badge/skills/ethanyoq/skill-hub/coze-file-send/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/ethanyoq/skill-hub/coze-file-send"><img src="https://agentmods.dev/badge/skills/ethanyoq/skill-hub/coze-file-send.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00191 | $0.03444 |
| Opus 5.5 | $0.00076 | $0.01378 |
| Sonnet 5.5 | $0.00038 | $0.00689 |
| Haiku 4.5 | $0.00019 | $0.00344 |
Grade A, and why
coze-file-send 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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 231 lines — stays where its author put it; the contents beside it link to each section on GitHub.
coze-file-send: 把文件 / 图片发给用户
你跟用户在 coze 平台聊天, 对话默认纯文本。生成的图片 / PDF / 报告 / 图表等文件用户不会自动看到 — 必须用 coze-bridge send 主动发, 用户才能在聊天界面看到。
先决条件: 从 <coze-context> 提取身份 ID
每条用户消息开头云端会注入一段身份上下文块。Coze 有两种聊天形态, 上下文块格式不同:
单聊消息:
<coze-context>
单聊消息
account_id: 7639...001
agent_id: 7639...571
session_id: 7639...999
</coze-context>
群聊消息 (多了 group_id):
<coze-context>
群聊消息
account_id: 7639...001
agent_id: 7639...571
session_id: 7639...999
group_id: 7639...888
</coze-context>
调 coze-bridge send 时必须用 --agent-id 和 --session-id flag 把对应 ID 带上。命令无状态, 每次调用都要带, 不带会 exit 4。
两种模式: 决策树
你要发的文件在哪里?
├─ 本地 (你刚生成 / cp 来的) → 模式 A (本地文件)
└─ 已在群文件里 (你从 coze agent 拿到 path) → 模式 B (群文件)
需要群聊上下文, 单聊场景没有这种 path
关键差异:
| 维度 | 模式 A: 本地文件 | 模式 B: 群文件 |
|---|---|---|
| 适用场景 | 单聊 / 群聊均可 | 仅群聊 (需要 group_id 来源) |
<path> 含义 |
本地文件路径 | 群文件路径 (原样透传) |
| 是否上传 | 是 (走 HTTP API) | 否 (直接 WS 通知 IM) |
--mime |
自动探测 (忽略) | 必填 |
| 大小限制 | ≤ 50MB | 无 (云端管) |
命令调用规范
永远用固定路径 ~/.coze/bridge/bin/coze-bridge 调用 CLI, 不要用裸 coze-bridge — 不同 framework 的 bash tool 继承 PATH 不一致, 裸命令可能 exit 127。固定路径是 daemon 启动时一定写好的 shim, 跨 framework / 跨平台都解析得到。
(注: 这里指 CLI 二进制本身的路径; 传给 CLI 的文件 <path> 参数另说, 见各模式。)
模式 A: 本地文件 (单聊 / 群聊都可用)
# 图片
~/.coze/bridge/bin/coze-bridge send image <localPath> \
--agent-id <agent_id> --session-id <session_id> \
[--caption "说明文字"]
# 通用文件
~/.coze/bridge/bin/coze-bridge send file <localPath> \
--agent-id <agent_id> --session-id <session_id> \
[--caption "..."] [--name "report.pdf"]
参数:
image: 图片 (png / jpeg / webp / gif), 聊天界面直接渲染file: 通用文件 (pdf / text / markdown 等), 显示为附件<localPath>: 本地文件路径 (相对当前目录或绝对路径)--agent-id/--session-id: 从<coze-context>抄过来 (必填)--caption: 一行说明 (可选, 但强烈推荐 — 用户体验好十倍)--name: 用户看到的文件名 (默认从 path 取 basename)
典型用法:
生成 + 发 (必须 && 串行 — 文件没写完时 send 会读到残缺):
python3 plot.py && ~/.coze/bridge/bin/coze-bridge send image plot.png \
--agent-id <agent_id> --session-id <session_id> \
--caption "训练曲线 (epoch 1-100)"
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.
- 2mo ago First seen · 231 lines · 191 tokens per session scan A c0f5ce83f647
coze-file-send is a skill published in the GitHub repository EthanYoQ/Skill-hub (12 stars, last pushed 2d ago), licensed MIT. It adds 191 tokens to every session and 3,444 once invoked, about $0.0008 per session on Opus 5.5. 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-09-13.
coze-file-send compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| coze-file-sendEthanYoQ/Skill-hub | Skill | 12 | 2d ago | MIT | A | 191 | Claude Code, Codex |
| document-processorvignesh2027/Claude-Agentic-Skills2.0-version | Skill | 4 | 3mo ago | MIT | A | 65 | Claude Code, Codex |
| form-fillerinbharatai/claude-skills | Skill | 44 | 8mo ago | MIT | A | 22 | Claude Code, Codex |
| invoice-creatorinbharatai/claude-skills | Skill | 44 | 8mo ago | MIT | A | 23 | Claude Code, Codex |
| latex-writerinbharatai/claude-skills | Skill | 44 | 8mo ago | MIT | A | 28 | Claude Code, Codex |
| pdfinbharatai/claude-skills | Skill | 44 | 8mo ago | MIT | A | 30 | Claude Code, Codex |
| mvpHarmeet10000/skills | Skill | 8 | 6mo ago | MIT | A | 0 | Claude Code, Codex |