원클릭으로
attach
Load when the reply should embed a file (generated md/PDF/CSV, chart image, modified upload) — `Write` to disk alone is not delivery.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Load when the reply should embed a file (generated md/PDF/CSV, chart image, modified upload) — `Write` to disk alone is not delivery.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Load when reading or writing project notes, weekly/monthly summaries, or journal/agent.md. Owns GET/PATCH for context files except today.md and roadmap.md, which use their dedicated skills.
Load when the user wants an ongoing task on a fixed cadence (every morning, each Monday, hourly) to run autonomously as its own named recurring Agent. Creates it via POST /api/agents. Not for one-time reminders (use schedule) or app-data background fetches (use managed-tasks).
Load to manage the durable source library (user-sent PDFs/PPTX/docs) — list unfiled sources, file them as knowledge/sources/ cards, promote images, or send a stored source back. SKIP for delivering files you generated this turn (attach) or general vault edits (context).
Hand a long-running or open-ended task (deep research, multi-repo CI audit, monitor X over time, bulk compile) to /api/background-task. Compose a self-contained brief, set the notification policy, POST, ack, end the turn. Read GET /:id for follow-up detail.
Read-only Task Board — list everything in motion (recurring DMs, Agents, app-fetch, automation triggers, reminders, background/browser work) via GET /api/tasks, and preview a delete's blast radius via GET /api/tasks/impact. For writes use the `task` skill.
Hand open-ended browser requests (post a tweet, fill a contact form, check an order status, …) to /api/browser-task. Relay sub-agent clarifications, POST /clarify with the reply, /cancel on stop.
| name | attach |
| description | Load when the reply should embed a file (generated md/PDF/CSV, chart image, modified upload) — `Write` to disk alone is not delivery. |
| allowed-tools | ["Bash(curl *)","Write"] |
You can deliver files alongside your reply by uploading them to the daemon's outbound-attachment endpoint. The daemon collects everything tagged with the current turn's token, pins it to the assistant message it is about to record, and hands the file refs to the originating adapter (dashboard in Phase 1) so the user sees it in the same chat thread.
Do NOT use this for trivial text that fits in a chat reply — pasting inline is faster and easier to skim.
Only the following tools are available inside this skill. Everything else is denied silently in dontAsk mode — do not try alternatives, pipes, or shell helpers.
| Tool | Purpose |
|---|---|
Write | Create the file to upload (text, markdown, CSV, JSON, YAML). |
Bash(curl *) | Issue exactly one POST to the daemon per file. |
$VAR / $(...) / backticks / pipes / chained commands (&&, ||, ;, |) — the dontAsk classifier silently denies them. Pre-compute any value in your reasoning and write it as a literal. The session's curl wrapper (.pa/bin/curl) injects X-Turn-Token from PA_TURN_TOKEN for you — never pass it yourself, and binary/PDF/chart generation (python3, pandoc, node) is out of scope for Phase 1; stick to text formats you can Write.If the turn has already ended (or no token was issued), the daemon returns HTTP 403 missing_turn_token. Treat that as a terminal signal, not something to retry.
Upload a single file (one call per file). Multipart file field, optional X-Filename + X-Caption headers. The wrapper injects X-Turn-Token automatically.
curl -s -X POST http://localhost:8321/api/chat/outbound-attachments \
-H "X-Filename: weekly-summary.md" \
-H "X-Caption: Weekly summary" \
-F "file=@/tmp/weekly-summary.md"
# → {"id":"<uuid>"} HTTP 200 — success
# → 403 — turn token missing/invalid; do not retry (see Errors table)
Errors return the standard agent-error envelope {ok:false,summary,errors:[{code,field,hint}],retryable,error:<code>}. Branch on the flat error field (a legacy alias for the single issue code); the codes in the Errors table are accurate.
| Header / field | Purpose |
|---|---|
file (form field, binary) | The bytes to deliver. Stream from a file you just created with Write. |
X-Filename | Optional. Overrides the filename shown to the user. Literal string — no substitutions. Default: the multipart filename parameter. |
X-Caption | Optional. ≤ 1024 chars. Literal string — no $(...) / backticks. |
If you do pass
X-Turn-Tokenexplicitly (e.g. during local debugging), the wrapper respects your value and does not overwrite it.
Per-turn total across all attachments is capped at 100 MB; the endpoint returns 429/too_many_uploads if you issue more than 5 concurrent uploads on the same turn.
Write tool. Write scratch files under /tmp/<name> — the session workdir is re-materialized between turns and the context dir is daemon-owned, so /tmp avoids collisions.{"id": "..."}) mention the attachment in your reply, e.g. "Attached: weekly-summary.md" — you may discard the id; the daemon links it automatically. On any error, follow the Errors table below.Never base-64 embed files into your reply body. Always go through this endpoint.
| Response | Cause | What to do |
|---|---|---|
403 missing_turn_token / invalid_turn_token | Turn already ended, or the header was empty at request time | Do not retry. Paste content inline and mention the limitation. |
400 too_large | File exceeded the per-type cap | Trim / summarize the content before retrying. |
400 disallowed_mime / undetected_mime | Format not on the Phase 1 allowlist | Convert to an allowed format (e.g. table → CSV). |
429 too_many_uploads | > 5 uploads in flight on this turn | Wait briefly and retry, or batch into fewer files. |