Skip to content
Back to skills

Hf Init

BSecurity

Initialize HuggingFace integration - validates .env variables, tests API connectivity, and ensures the dataset repository structure exists. Use when onboarding a new project to HuggingFace or when credentials change.

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added June 6, 2026
toolspythongoshellbashapi

Works with

  • api

Security analysis

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

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

Scanned June 6, 2026

npx -y skills add richfrem/Project_Sanctuary --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/badge)](https://www.skillsdirectory.com/skills/richfrem-hf-init)

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
description: "Initialize HuggingFace integration - validates .env variables, tests API connectivity, and ensures the dataset repository structure exists. Use when onboarding a new project to HuggingFace or when credentials change."
allowed-tools: Bash, Read
---

# HuggingFace Init (Onboarding)

**Status:** Active
**Author:** Richard Fremmerlid
**Domain:** HuggingFace Integration

## Purpose

Sets up everything needed for HuggingFace persistence. Run this once when
onboarding a new project, or whenever credentials change.

## What It Does

1. **Validates** required `.env` variables are set
2. **Tests** API connectivity with the configured token
3. **Ensures** the dataset repository exists on HF Hub
4. **Creates** the standard folder structure (`lineage/`, `data/`, `metadata/`)
5. **Uploads** the dataset card (README.md) with configurable discovery tags

## Required Environment Variables

| Variable | Required | Description |
|:---------|:---------|:------------|
| `HUGGING_FACE_USERNAME` | ✅ Yes | Your HF username |
| `HUGGING_FACE_TOKEN` | ✅ Yes | API token (set in `~/.zshrc`, NOT `.env`) |
| `HUGGING_FACE_REPO` | ✅ Yes | Model repo name |
| `HUGGING_FACE_DATASET_PATH` | ✅ Yes | Dataset repo name |
| `HUGGING_FACE_TAGS` | ❌ No | Comma-separated discovery tags for dataset card |
| `HUGGING_FACE_PROJECT_NAME` | ❌ No | Pretty name for dataset card heading |
| `SOUL_VALENCE_THRESHOLD` | ❌ No | Moral/emotional charge filter (default: `-0.7`) |

## Usage

### Validate Config
```bash
python plugins/huggingface-utils/scripts/hf_config.py
```

### Full Init (Validate + Create Structure + Dataset Card)
```bash
python plugins/huggingface-utils/skills/hf-init/scripts/hf_init.py
```

### Validate Only (No Changes)
```bash
python plugins/huggingface-utils/skills/hf-init/scripts/hf_init.py --validate-only
```

## Quick Setup

```bash
# Token goes in shell profile (never committed):
export HUGGING_FACE_TOKEN=hf_xxxxxxxxxxxxx

# Project vars go in .env:
HUGGING_FACE_USERNAME=<your-username>
HUGGING_FACE_REPO=<your-model-repo>
HUGGING_FACE_DATASET_PATH=<your-dataset-repo>

# Optional customization:
HUGGING_FACE_TAGS=reasoning-traces,cognitive-continuity,your-project-tag
HUGGING_FACE_PROJECT_NAME=My Project Soul

# Run init
python plugins/huggingface-utils/skills/hf-init/scripts/hf_init.py
```

Files in this skill

  • SKILL.md2.3 KB
  • evals/evals.json1.3 KB
  • references/acceptance-criteria.md679 B
  • references/fallback-tree.md1.2 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.