Skip to content

richfrem/agent-plugins-skills / plugins/dev-utils/.apm/skills/managing-huggingface-assets

managing-huggingface-assets

Verified

Sets up, downloads from and uploads to HuggingFace repositories with credential hygiene and exponential backoff. Use to validate HuggingFace credentials and dataset structure, download files, snapshots or model weights, or upload files, folders, learning snapshots and JSONL traces. Not for searching the Hub or other storage providers.

FileKindSize
SKILL.mdskill md2.7 KB
evals/evals.jsonconfig2.1 KB
references/acceptance-criteria.mdmarkdown2.2 KB
references/download.mdmarkdown1.7 KB
references/fallback-tree.mdmarkdown3.4 KB
references/init.mdmarkdown1.4 KB
references/upload.mdmarkdown2.1 KB
scripts/hf_config.pyscript6.2 KB
scripts/hf_download.pyexecutablescript6.5 KB
scripts/hf_init.pyscript2.7 KB
scripts/hf_upload.pyscript13.2 KB

references/acceptance-criteria.md

View on GitHub
# Acceptance Criteria: managing-huggingface-assets

## `init` mode
### 1. Credential Safety
- [ ] `HUGGING_FACE_TOKEN` is NEVER stored in `.env` or any committed file.
- [ ] Token is read exclusively from shell environment (not .env loader).
- [ ] Token is masked in all display output (first/last 4 chars only).

### 2. Validation
- [ ] All 4 required env vars (USERNAME, TOKEN, REPO, DATASET_PATH) are checked before any operation.
- [ ] `--validate-only` makes zero filesystem or API write calls.

### 3. Dataset Structure
- [ ] `ensure_dataset_structure()` creates `lineage/`, `data/`, `metadata/` on first run.
- [ ] Re-running init on an already-initialised dataset does NOT duplicate or corrupt the structure.

## `download` mode
### 1. Safety & Credential Validation
- [ ] Uses resolved `HFConfig` credentials (`HUGGING_FACE_TOKEN`) from the shared `hf_config.py` library.
- [ ] Token is NEVER logged, displayed, or written to intermediate download caches in plain-text.

### 2. API Integration & Retries
- [ ] Wraps `huggingface_hub` download methods with exponential backoff for handling `429` rate-limit responses.
- [ ] Retries up to 5 times before failing cleanly and reporting the API error.

### 3. Directory Management
- [ ] Ensures the destination `local_dir` path is created automatically if it does not exist.
- [ ] Supports glob matching filters (`allow_patterns`, `ignore_patterns`) during folder/snapshot downloads.

## `upload` mode
### 1. Prerequisite Gate
- [ ] All upload operations verify valid credentials via hf_config before executing.
- [ ] Upload is aborted (not silently skipped) if credentials are invalid.

### 2. Retry Behavior
- [ ] Rate-limit errors (429) trigger exponential backoff with up to 5 retries.
- [ ] Each retry attempt is logged/reported. Failures after 5 attempts surface as errors.

### 3. Result Verification
- [ ] Every upload operation returns and checks `HFUploadResult.success`.
- [ ] A failed upload (success=False) is always reported with the `error` message.

### 4. Valence Filtering
- [ ] `upload_soul_snapshot()` rejects uploads with valence below `SOUL_VALENCE_THRESHOLD`.
- [ ] Rejection includes the valence score, threshold value, and does NOT silently drop the content.
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall