Skip to content
Back to skills

Hf Init

BSecurity

Initialize HuggingFace integration - validates environment variables, tests API connectivity, and sets up dataset repository structure.

  • 7 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 2, 2026
ai-agentspythonshellbashgitapisecurity

Works with

  • api

Security analysis

B75/100
  • criticalModifies startup scripts or system services for persistence

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

Scanned October 3, 2026

npx -y skills add richfrem/agent-plugins-skills --skill hf-init --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Hf Init?

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

Security grade badge for Hf Init
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/richfrem-hf-init-agent-plugins-skills/badge)](https://www.skillsdirectory.com/skills/richfrem-hf-init-agent-plugins-skills)

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: hf-init
plugin: dev-utils
description: Initialize HuggingFace integration - validates environment variables, tests API connectivity, and sets up dataset repository structure.
allowed-tools: Bash, Read
---

# HuggingFace Initialization (`hf-init`)

Sets up credentials, connectivity, and dataset repository structure for HuggingFace persistence.

## Contents

- [Critical Constraints](#critical-constraints)
- [Quick start](#quick-start)
- [Required Environment Variables](#required-environment-variables)
- [Workflow](#workflow)
- [Verification](#verification)
- [References](#references)

## Critical Constraints

1. **Secret Hygiene**: Tokens must be stored in shell profile (`~/.zshrc`), NEVER committed to `.env` or Git.
2. **Repository Structure**: Enforces standard folder structure (`lineage/`, `data/`, `metadata/`).

## Quick start

Validate HuggingFace configuration without modifying remote repositories:

```bash
python3 scripts/hf_init.py --validate-only
```

## Required Environment Variables

| Variable | Required | Description |
|---|---|---|
| `HUGGING_FACE_USERNAME` | Yes | HuggingFace account username |
| `HUGGING_FACE_TOKEN` | Yes | Hub API token (in shell profile) |
| `HUGGING_FACE_REPO` | Yes | Model repository name |
| `HUGGING_FACE_DATASET_PATH` | Yes | Dataset repository name |
| `HUGGING_FACE_TAGS` | No | Comma-separated discovery tags |
| `HUGGING_FACE_PROJECT_NAME` | No | Display name for dataset card |

## Workflow

1. **Credential Validation**: Verify presence of required environment variables.
2. **Connectivity Test**: Run API probe to confirm read/write token privileges.
3. **Repository Setup**: Initialize standard directory structure (`lineage/`, `data/`, `metadata/`) on remote dataset.
4. **Readiness Report**: Output connection status and configured paths.

## Verification

Confirm configuration and authentication validity:

```bash
python3 scripts/hf_config.py
```

## References

- [acceptance-criteria.md](references/acceptance-criteria.md) — Acceptance criteria and security validation for HuggingFace initialization.
- [fallback-tree.md](references/fallback-tree.md) — Fallback protocol when credentials or variables are missing.

Files in this skill

  • SKILL.md2.5 KB
  • acceptance-criteria.md679 B
  • evals/evals.json766 B
  • evals/results.tsv301 B
  • fallback-tree.md1.2 KB
  • references/acceptance-criteria.md42 B
  • requirements.txt22 B
  • scripts/hf_config.py29 B
  • scripts/hf_init.py27 B

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.