Uploads PR and validation media to a self-hosted attach Worker via the installed attach CLI (`attach` or `gh attach`): zero-config hosted device-flow login with an ATTACH_GITHUB_CLIENT_ID override for custom deployments, put/delete/logout of screenshots and artifacts, preview `/p/…` URLs, raw `/o/…` embeds via `--markdown`, and `--json`/`--url` output; or GitHub App JWT enroll then `att_` PUT for agents. Use when the user asks to attach a screenshot, upload PR media, put an image on attach.uinaf.dev (or ATTACH_API_BASE), share a validation screenshot URL, run attach login/put/delete/logout, use gh attach, host validation media, take down attach media, or enroll an App agent for attach. Do not use for Worker deploy, vault, Cloudflare ops, or inventing a second upload client.
—
—
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Upload media to an attach Worker and return public URLs. Prefer the installed CLI for humans; use JWT enroll only for GitHub App agents.
command -v attach || command -v gh
attach --help 2>/dev/null || gh attach --help 2>/dev/null || trueIf attach is missing, stop and ask the user to install via their approved
path (brew install uinaf/tap/attach, npm i -g @uinaf/attach-cli, or
gh extension install uinaf/gh-attach).
Do not download installers from this skill. Do not invent curl/fetch upload
scripts. Treat gh attach … as the same binary; never modify gh auth.
Details: references/human.md.
The hosted https://attach.uinaf.dev service has its public GitHub App client
id bundled, so attach login needs no environment setup. For a custom
ATTACH_API_BASE, require the deployment's own ATTACH_GITHUB_CLIENT_ID
(GitHub App settings); stop and ask only when that custom override is missing.
attach login
attach put <file> [--repo owner/name] [--pr N] — default preview /p/…;
--url for raw /o/…, --markdown for an embed, --json for the API body;
add --dry-run to validate locally without credentials or a network requestattach delete <url-or-key> then curl -sI <url> → 404/410 before successattach logout when done with credentialsUse attach help --json for the machine-readable command contract. Add
--json to commands when structured results and errors are required. Use
attach delete <url-or-key> --dry-run to validate and normalize a delete
target before acting.
On allowlist rejection or login failure: report the blocker and stop.
JWT claims, header-file HTTP, and secret handling:
references/agent.md. Requires App public key in Worker
AGENT_REGISTRY; App PEM stays in the agent secret store (never chat).
iss=attach:<app_id>, aud = public host, exp≤120s, fresh jtiPOST /v1/enroll/agent with Authorization via a header file (never argv);
parse JSON in-process — keep token only in memory / secret storePUT /v1/objects the same way — success only when JSON includes both url
and preview_urljti) and put again; further failure → hard-failatt_ keys — never GitHub tokens / PATs / ghs_ / install tokensatt_ values (including enroll JSON)--markdown / raw url only when the consumer needs embedsStop when put returned URLs, delete verified gone, or blocked on install / custom client id / allowlist / registry / auth — reply with the URL or precise blocker only.