Skip to content
Back to skills

Ops Huggingface

ASecurity

Dry-run-first Hugging Face Hub operations: search models/datasets, inspect repos, list files, create repos, upload, snapshot, and validate/template model & dataset cards. Mutations require --execute; every receipt records an auth check without exposing token values.

  • 6 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 11, 2026
documentationbashgitsecurity

Works with

  • cli

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 23, 2026

npx -y skills add grahama1970/agent-skills --skill ops-huggingface --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ops Huggingface?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ops Huggingface
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/grahama1970-ops-huggingface/badge)](https://www.skillsdirectory.com/skills/grahama1970-ops-huggingface)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ops-huggingface
description: >
  Dry-run-first Hugging Face Hub operations: search models/datasets, inspect
  repos, list files, create repos, upload, snapshot, and validate/template
  model & dataset cards. Mutations require --execute; every receipt records an
  auth check without exposing token values.
provides:
  - ops-huggingface
disciplines:
  - data-engineering
  - observability-operations
---

# /ops-huggingface

Operate the Hugging Face Hub with dry-run safety defaults.

> RECONSTRUCTED 2026-08-12 from the surviving `.pyc` bytecode after the source
> was lost (never tracked in git, no disk copy survived). The reconstruction is
> faithful to the 3.12 disassembly and is now TRACKED so the skill cannot be
> lost again. See `scripts/hf_ops.py` header for provenance.

## Commands

```bash
run.sh whoami                                  # auth check, no token exposure
run.sh search-models "text classification" --limit 20
run.sh search-datasets "cybersecurity CWE" --limit 20
run.sh repo-info OWASP/example --type dataset
run.sh list-files bert-base-uncased --type model
run.sh validate-card ./README.md --type model
run.sh template-card --type dataset --repo me/mydata --output ./README.md

# Mutations are DRY-RUN by default; add --execute to actually touch the Hub:
run.sh create-repo me/newrepo --type dataset            # dry-run receipt
run.sh create-repo me/newrepo --type dataset --execute  # actually creates
run.sh upload ./file.json --repo me/data --execute
run.sh snapshot me/data --local-dir ./out --execute
```

## Safety contract

- `create-repo`, `upload`, `snapshot` do nothing to the Hub without `--execute`;
  without it they emit a receipt with `dry_run: true, executed: false`.
- Every command records `auth_checked` and `auth_source` (`env` /
  `huggingface_hub_cache` / `none`) WITHOUT printing token values.
- `search-*` and `repo-info` are read-only.

## Auth

Reads `HF_TOKEN` / `HUGGINGFACE_HUB_TOKEN` from the environment or the
repository `.env` (loaded at startup), or a cached `huggingface-cli login`
token. No token is ever echoed.

## Requirements

`huggingface_hub` in the active environment. If absent, every command fails
closed with a clear `Missing dependency: huggingface_hub` message.

## QRA/code-training dataset scout note (2026-09-14)

For qra-training and code-slop grader preparation, search dataset families in
parallel and inspect candidates with `repo-info` before any snapshot. Useful
query families observed:

- `code preference`
- `rewardbench code`
- `LiveCodeBench`
- `BigCodeBench`
- `HumanEval`
- `MBPP code`
- `APPS code`
- `CodeContests`
- `SWE-bench`

High-priority candidate IDs from the scout: `Vezora/Code-Preference-Pairs`,
`SWE-bench/SWE-bench_Verified`, `livecodebench/code_generation_lite`, and
`bigcode/bigcodebench`. Treat public datasets as comparison/eval baselines; the
enterprise training unit should still be typed QRA/git/CI/human-label receipts,
not raw benchmark rows.

Files in this skill

  • SKILL.md2.9 KB
  • run.sh162 B
  • scripts/hf_ops.py14.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.