plugins/huggingface-utils/skills/hf-upload/SKILL.md
Upload primitives for HuggingFace Soul persistence - file, folder, snapshot, JSONL append, and dataset card management with exponential backoff. Use when persisting agent learnings, snapshots, or semantic caches to HuggingFace.
npx skillsauth add richfrem/agent-plugins-skills hf-uploadInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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).
Status: Active
Author: Richard Fremmerlid
Domain: HuggingFace Integration
Depends on: hf-init (credentials must be configured first)
Provides consolidated upload operations for all HF-consuming plugins (Primary Agent, Orchestrator, etc.). All uploads include exponential backoff for rate-limit handling.
| 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 |
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": "..."}])
hf-init first to validate credentials and dataset structurehuggingface_hub installed (pip install huggingface_hub)HUGGING_FACE_USERNAME, HUGGING_FACE_TOKENAll 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 failedRate-limited requests retry with exponential backoff (up to 5 attempts).
tools
Ingests repository files into the ChromaDB vector store. Builds or updates the vector index from a manifest or directory scan using ingest.py. Use when new files need to be indexed or the vector store is out of date. <example> user: "Index these new plugin files into the vector database" assistant: "I'll use vector-db-ingest to add them to the vector store." </example> <example> user: "The vector store is missing recent files -- update it" assistant: "I'll use vector-db-ingest to re-index the changes." </example>
data-ai
Removes stale and orphaned chunks from the ChromaDB vector store for files that have been deleted or renamed. Use after files are removed or moved to keep the vector index in sync with the filesystem. <example> user: "Clean up the vector store after I deleted some files" assistant: "I'll use vector-db-cleanup to remove orphaned chunks." </example> <example> user: "The vector database has chunks for files that no longer exist" assistant: "I'll run vector-db-cleanup to prune them." </example>
testing
Audit Vector DB coverage -- compares the live filesystem manifest against the ChromaDB index to identify coverage gaps.
development
3-Phase Knowledge Search strategy for the RLM Factory ecosystem. Auto-invoked when tasks involve finding code, documentation, or architecture context in the repository. Enforces the optimal search order: RLM Summary Scan (O(1)) -> Vector DB Semantic Search -> Grep/Exact Match. Never skip phases.