cdn-upload

cdn-upload is a skill for Claude Code, Codex from DJRHails/dotfiles. It costs 123 tokens per session (1,024 once invoked), scanned A, original, MIT.

A file uploader that puts local images and other assets on a public web address. It uses cdn.hails.info, a public storage service, and returns HTTPS links.

In plain words
What is it for?
Use it to upload figures, images, or other local files and get links for embedding them in Markdown or other web content.
Why use it?
It provides images with public links when files in private GitHub repositories cannot display correctly in pull requests or issues.

Skill for Claude CodeCodex

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 skills/djrhails/dotfiles/cdn-upload
Any agent
npx skills add DJRHails/dotfiles --skill cdn-upload
Clone the repo
git clone --depth 1 https://github.com/DJRHails/dotfiles

Made for: Claude Code, Codex.

Per session 123 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,024 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00123 $0.01024
Opus 5 $0.00062 $0.00512
Sonnet 5 $0.00025 $0.00205
Haiku 4.5 $0.00012 $0.00102

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

Security

Grade A, and why

cdn-upload scanned grade A with 1 finding 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 3d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Verify a URL is live: `curl -s -o /dev/null -w '%{http_code} %{content_type}' "$url"` → `200 image/png`.
modules/agents/skills/cdn-upload/SKILL.md · 58 lines

How it starts

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

cdn-upload — public URLs for local files via cdn.hails.info

cdn.hails.info is a public Cloudflare R2 bucket (r2:cdn-hails-info). Upload a file and it is reachable at https://cdn.hails.info/<key>. Because the URL is public, GitHub renders it inline in markdown even for private repos (where committed/raw.githubusercontent.com image links 404 or are blocked by the camo proxy).

Use it

~/.agents/skills/cdn-upload/scripts/cdn-upload path/to/figure.png [more.png ...]
# prints one https://cdn.hails.info/img/<sha256[:32]>.png per file on stdout

The script (mirrors DJRHails/kb bin/r2_upload.py):

  • Content-addressed: key is img/<sha256[:32]><ext>, so identical bytes collapse to one object and re-uploads are idempotent (same URL every time).
  • Immutable cache header on upload (Cache-Control: public, max-age=31536000, immutable).
  • Routing: a local rclone r2: remote if configured; else, inside a gantry worker (the gantry CLI is on PATH and $GANTRY_API_KEY is injected), it runs gantry attach — which POSTs to gantry's /agent/attachments, since gantry holds the R2 creds the sandboxed worker lacks, and returns the same cdn.hails.info/img/<sha> URL (images only); else it scps to trifle (the user's Mac, where rclone + the r2: remote live) and uploads from there. So it works from a maintainer host, a gantry worker, or any tailnet host.

Embedding in a GitHub PR/issue (the common case)

  1. url=$(.../scripts/cdn-upload figures/foo.png)
  2. Put ![figures/foo.png]($url) in the PR/issue body — the alt text is the file's original repo-relative path (the CDN key is a content hash, so the alt is the only provenance the embed keeps); the human description goes in a bold caption line below the image, not in the alt.
  3. Update an existing PR body with the REST API: gh api --method PATCH repos/<owner>/<repo>/pulls/<n> -F [email protected]. Prefer this over gh pr edit, which fails closed on any host whose token lacks read:org: a GITHUB_TOKEN scoped repo+workflow only cannot run the query gh pr edit reads the PR with, which carries a Team requested-reviewer fragment (organization{login}, name, slug) — so it exits 1 and writes nothing even for a body-only edit on a personal repo. The failure surfaces as GraphQL INSUFFICIENT_SCOPES inside an HTTP 200, not a 4xx. read:org is being added to the injected PAT fleet-wide (see the PR-workflow bullet in modules/agents/AGENTS.md); check with gh auth status. The REST PATCH stays the better call regardless — one request, no GraphQL preflight, no scope dependency.

Read the full file on GitHub · 58 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago First seen · 58 lines · 123 tokens per session scan A bbf3bd09f7a1

Subscribe to this mod's changes

cdn-upload is a skill published in the GitHub repository DJRHails/dotfiles (2 stars, last pushed 8d ago), licensed MIT. It adds 123 tokens to every session and 1,024 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

autopilot-batch

Fan out a batch of autopilot-queued issues to parallel background worktree subagents — each runs /autopilot at the build model from its 'model:' label — with a gating review at Opus 5 or above and never below the build (Opus reviews Sonnet and Opus builds, Fable reviews Fable builds).

joshukraine/dotfiles · 75 tokens

todoist-cli

Manage Todoist tasks, projects, labels, filters, sections, comments, reminders, and workspaces via the td CLI. Use when the user wants to view, create, update, complete, or organize Todoist items, or mentions tasks, inbox, today, upcoming, projects, labels, or filters.

joshukraine/dotfiles · 68 tokens

autopilot

Carry a well-scoped GitHub issue through the full dev loop autonomously, stopping at a per-run tier boundary (PR-ready, or merge+deploy for small reversible changes).

joshukraine/dotfiles · 40 tokens

qa-handoff

Generate a hands-on QA testing guide as a self-contained HTML page — for Rails apps or static (Hugo) sites. --publish uploads the HTML to the project's configured QA host.

joshukraine/dotfiles · 41 tokens

walkthrough

Generate a hands-on browser walkthrough of a PR's user-facing changes to exercise before review; --publish posts the final version to the PR for QA.

joshukraine/dotfiles · 33 tokens

dustoff

Assess a project that's been dormant for months and produce a prioritized re-entry plan — lifecycle stage, what's stale or broken, and how far the project's tooling has drifted from current conventions — delegating every fix to the skill that owns it, and optionally capturing the plan as a tracking issue that survives…

joshukraine/dotfiles · 64 tokens