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/download.md

View on GitHub
# HuggingFace download (`download` mode)

Fetches files, folder snapshots, and model weights from HuggingFace repositories with built-in exponential backoff.

## Critical Constraints

- **Credential Hygiene**: Consume `HUGGING_FACE_TOKEN` exclusively via environment variables; never embed tokens in arguments or logs.
- **Rate-Limit Resilience**: Operations must employ exponential backoff (up to 5 retries) on HTTP 429/503 errors.
- **Target Path Containment**: Restrict download destinations to designated working folders (`./local_data`, `./models`).
- **Download Scope**: Dedicated to fetching assets. For uploading snapshots or soul traces, use the `upload` mode.

## Dependencies

Requires Python 3.8+ (standard library only).

## Quick start

```bash
# Download a single file from repository
python3 scripts/hf_download.py \
  --filename data/soul_traces.jsonl \
  --local-dir ./local_data

# Download a model snapshot with pattern matching
python3 scripts/hf_download.py \
  --repo-id unsloth/gemma-4-12b-it-GGUF \
  --repo-type model \
  --allow-patterns "*UD-Q4_K_XL.gguf" \
  --local-dir ./models
```

## Workflow

1. **Phase 1: Environment & Token Check**: Verify `huggingface_hub` installation and presence of `HUGGING_FACE_TOKEN`.
2. **Phase 2: Target Path & Parameter Selection**: Select repository ID, asset type (`dataset` or `model`), and destination path.
3. **Phase 3: Execution with Backoff**: Run `hf_download.py` via CLI or asynchronous Python API.
4. **Phase 4: Asset Integrity Verification**: Confirm that target files or model artifacts are present and non-empty.

## Verification

```bash
# Verify CLI help and script loading
python3 scripts/hf_download.py --help

```
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