hf-upload

hf-upload is a skill for Claude Code from richfrem/agent-plugins-skills. It costs 49 tokens per session (639 once invoked), scanned A, original, MIT.

A Python utility for uploading files, folders, learning snapshots, caches, and structured records to Hugging Face, a platform for sharing machine-learning files.

In plain words
What is it for?
Use it to store model-related files, agent learning snapshots, semantic caches, and JSONL records on Hugging Face.
Why use it?
It centralizes persistence of agent data and retries uploads when the service temporarily limits requests.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the dev-utils plugin — 17 skills, 2 agents shipped together

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

Made for: Claude Code.

Or install dev-utils, the plugin that ships this one along with the rest of its 17 skills, 2 agents.

Wrote 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.

agentmods badge for hf-upload

README.md
[![agentmods](https://agentmods.dev/badge/skills/richfrem/agent-plugins-skills/hf-upload.svg)](https://agentmods.dev/skills/richfrem/agent-plugins-skills/hf-upload)
Your own site
<a href="https://agentmods.dev/skills/richfrem/agent-plugins-skills/hf-upload"><img src="https://agentmods.dev/badge/skills/richfrem/agent-plugins-skills/hf-upload.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 639 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.1 $0.00049 $0.00639
Opus 5 $0.00024 $0.00319
Sonnet 5 $0.00010 $0.00128
Haiku 4.5 $0.00005 $0.00064

Measured 2d ago against content hash c8388a1a4a39, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

hf-upload 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.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/hf_config.py, scripts/hf_upload.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

plugins/dev-utils/skills/hf-upload/SKILL.md · 74 lines

How it starts

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

Dependencies

This skill requires Python 3.8+ and standard library only. No external packages needed.

To install this skill's dependencies:

pip-compile ./requirements.in
pip install -r ./requirements.txt

See ./requirements.txt for the dependency lockfile (currently empty — standard library only).


HuggingFace Upload Primitives

Status: Active Author: Richard Fremmerlid Domain: HuggingFace Integration Depends on: hf-init (credentials must be configured first)

Purpose

Provides consolidated upload operations for all HF-consuming plugins (Primary Agent, Orchestrator, etc.). All uploads include exponential backoff for rate-limit handling.

Available Operations

Function Description Remote Path
upload_file() Upload a single file Custom path
upload_folder() Upload an entire directory Custom prefix
upload_soul_snapshot() Upload a sealed learning snapshot lineage/seal_<timestamp>_*.md
upload_semantic_cache() Upload RLM semantic cache data/rlm_summary_cache.json
append_to_jsonl() Append records to soul traces data/soul_traces.jsonl
ensure_dataset_structure() Create ADR 081 folders lineage/, data/, metadata/
ensure_dataset_card() Create/verify tagged README.md README.md

Usage

From Python (as a library)

from hf_upload import upload_file, upload_soul_snapshot, append_to_jsonl

# Upload a single file
result = await upload_file(Path("my_file.md"), "lineage/my_file.md")

# Upload a sealed learning snapshot
result = await upload_soul_snapshot(Path("snapshot.md"), valence=-0.5)

# Append records to soul_traces.jsonl
result = await append_to_jsonl([{"type": "learning", "content": "..."}])

Prerequisites

  1. Run hf-init first to validate credentials and dataset structure
  2. Requires huggingface_hub installed (pip install huggingface_hub)
  3. Environment variables: HUGGING_FACE_USERNAME, HUGGING_FACE_TOKEN

Read the full file on GitHub · 74 lines

Files

What ships with it

8 files 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. 2d ago First seen · 74 lines · 49 tokens per session scan A c8388a1a4a39

Subscribe to this mod's changes

hf-upload is a skill published in the GitHub repository richfrem/agent-plugins-skills (6 stars, last pushed yesterday), licensed MIT. It adds 49 tokens to every session and 639 once invoked, about $0.0002 per session on Opus 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-03.

Related

Other skills, from other repositories

agent-v3-memory-specialist

Agent skill for v3-memory-specialist - invoke with $agent-v3-memory-specialist.

ruvnet/ruflo · 25 tokens

swarm-scripts

Bulk, repeat, fan-out, or data-heavy work: write and run swarm scripts (inline script-run, named script-upsert, durable launch-script-run). Covers the script-vs-tool rubric, the authoring contract (args first, ctx second), the seed catalog, connections and secrets, dbquery, and exposing a script as an API.

desplega-ai/agent-swarm · 82 tokens

notebook

Project notes system to prevent AI context loss and reasoning loops. Init notes, save mid-flow, recover context, migrate messy notes, resolve lessons. Subcommands: /notebook, /notebook save, /notebook recover, /notebook migrate.

catcatcatstudio/cat-skills · 54 tokens

prompt-decompiler

This skill should be used when the user says "decompile this prompt", "reverse engineer this prompt", "analyze this prompt", "break down this prompt", "what does this prompt do", "adapt this prompt for", "simplify this prompt", "split this prompt", "migrate this prompt", "why does this prompt work", "explain this…

RadOrigin-LLC/RAD-Claude-Skills · 153 tokens

dotagents-standard

Set up, author, and navigate the dotagents standard — a slim AGENTS.md "router" at the repository root plus a hidden .agents/ directory (rules, context, memory, personas, skills, specs, logs, tasks) that splits agent context into small per-topic files loaded on demand (progressive disclosure). Use this WHENEVER the…

zaventh/dotagents-standard-skill · 230 tokens

memento

Context handoff for fresh sessions. Saves unsaved session knowledge to notebook, then produces a short orientation block to paste into a new chat. Use when user says '/memento', 'hand off context', 'prepare for fresh chat', 'save and brief', or before clearing context. NOT for: recovering context (use /notebook…

catcatcatstudio/cat-skills · 78 tokens