hf-upload
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
- Run
hf-initfirst to validate credentials and dataset structure - Requires
huggingface_hubinstalled (pip install huggingface_hub) - Environment variables:
HUGGING_FACE_USERNAME,HUGGING_FACE_TOKEN
Error Handling
All operations return HFUploadResult with:
success: bool— whether the upload succeededrepo_url: str— HuggingFace dataset URLremote_path: str— path within the dataseterror: str— error message if failed
Rate-limited requests retry with exponential backoff (up to 5 attempts).
More from richfrem/agent-plugins-skills
markdown-to-msword-converter
Converts Markdown files to one MS Word document per file using plugin-local scripts. V2 includes L5 Delegated Constraint Verification for strict binary artifact linting.
52excel-to-csv
>
32zip-bundling
Create technical ZIP bundles of code, design, and documentation for external review or context sharing. Use when you need to package multiple project files into a portable `.zip` archive instead of a single Markdown file.
29learning-loop
(Industry standard: Loop Agent / Single Agent) Primary Use Case: Self-contained research, content generation, and exploration where no inner delegation is required. Self-directed research and knowledge capture loop. Use when: starting a session (Orientation), performing research (Synthesis), or closing a session (Seal, Persist, Retrospective). Ensures knowledge survives across isolated agent sessions.
26ollama-launch
Start and verify the local Ollama LLM server. Use when Ollama is needed for RLM distillation, seal snapshots, embeddings, or any local LLM inference — and it's not already running. Checks if Ollama is running, starts it if not, and verifies the health endpoint.
26spec-kitty-checklist
A standard Spec-Kitty workflow routine.
26