Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

huggingface-tool-builder — Claude Code skill: script the Hugging Face

A skill for building reusable command-line scripts that fetch, enrich, and process data from Hugging Face. Useful when chaining multiple API calls or running repeated automation tasks.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add huggingface/skills --skill huggingface-tool-builder -a claude-code
Open on GitHub

What huggingface-tool-builder does

huggingface-tool-builder lets you write utilities for working with Hugging Face models, datasets, and other Hub resources. The skill comes with sample scripts: search models by paper, extract YAML frontmatter from model cards, pipe metadata through jq for filtering and sorting. Scripts authenticate via HF_TOKEN environment variable for higher rate limits and proper authorization.

You get baseline examples in bash, Python, and TypeScript to start from. The skill prefers shell scripts where feasible, but supports Python or TSX if logic grows complex. Each script must accept --help to describe inputs and outputs. Examples show composable patterns: piping model IDs into an enrichment script, sorting results by downloads, extracting licenses and gates across multiple cards in one go.

Works on Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode.

What it helps with

  • Find and filter models by metadata from the Hub
  • Fetch metadata from multiple model cards in bulk
  • Enrich a list of model IDs with additional API data
  • Chain API calls with intermediate processing steps
  • Extract and parse YAML frontmatter for sorting and filtering

Example prompts for the agent

  • Create a bash script that finds the top 10 trending models and sorts them by download count
  • Write a Python utility that reads model IDs from stdin and outputs their licenses and tags as NDJSON
  • Pipe trending models into a model card fetch, extract frontmatter, and filter by license type using jq

How to install huggingface-tool-builder

1Skills CLI (Vercel)

npx skills add huggingface/skills --skill huggingface-tool-builder -a claude-code

2Manually: put the files in place

~/.claude/skills/huggingface-tool-builder/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/huggingface-tool-builder/

From the same set10

The whole set →
huggingface-datasets huggingface Guides Dataset Viewer API work for inspecting Hugging Face datasets, rows, statistics, and parquet links. Use it when an agent needs read-only dataset exploration. Claude Code CX Codex Cursor +1 2,400installs huggingface-gradio huggingface This skill helps you build and modify Python Gradio interfaces for machine learning demos. It provides patterns for layouts, UI components, and chatbot workflows. Claude Code CX Codex Cursor +1 2,300installs huggingface-papers huggingface Pulls the paper ID out of a Hugging Face or arXiv link, reads the page as markdown, and fetches authors, models and datasets from the papers API. Claude Code CX Codex Cursor +1 2,200installs huggingface-llm-trainer huggingface Runs language and vision model fine-tuning on Hugging Face Jobs with TRL or Unsloth and converts checkpoints to GGUF without local GPUs. Claude Code CX Codex Cursor +1 2,200installs huggingface-community-evals huggingface Skill for running Hugging Face Hub model evaluations on local hardware via inspect-ai and lighteval. Use it to pick an inference backend or smoke-test a model before a full run. Claude Code CX Codex Cursor +1 1,900installs huggingface-trackio huggingface Tracks ML training experiments with Trackio, sets up error alerts, and queries metrics via CLI. Built for autonomous agent loops and Hugging Face Spaces. Claude Code CX Codex Cursor +1 1,900installs huggingface-local-models huggingface Finds a GGUF repo on Hugging Face, matches a quant to your memory and starts it with llama.cpp. No guessing at filenames. Claude Code CX Codex Cursor +1 1,900installs huggingface-paper-publisher huggingface Indexes arXiv papers on Hugging Face Hub, links them to model and dataset cards, verifies authorship and builds markdown drafts from templates. Claude Code CX Codex Cursor +1 1,700installs

Similar

cost-benchmark ruvnet Runs corpus benchmarks to evaluate booster performance and compare spend against Gemini or Claude baselines. Generates verifiable cost tables before releases. Claude Code CX Codex Cursor +1 679installs voice-agents sickn33 A coding skill that walks an agent through building a voice assistant: speech recognition, model reply, synthesis, and the fight over latency. Claude Code CX Codex Cursor +1 890installs managed-deep-agents langchain-ai Guides developers through authoring, testing, and deploying Managed Deep Agents in LangSmith. Useful for setting up code-first agent directories and preparing CLI deployments. Claude Code CX Codex Cursor +1 9,100installs prompt-caching sickn33 Skill for optimizing LLM work through prompt caching, response caching, and Cache Augmented Generation. Reduces latency and API cost on repeated queries with identical context. Claude Code CX Codex Cursor +1 867installs modlens liustack A skill that gives text-only models eyes: it sends the image through a CLI and returns JSON with transcribed text, layout regions and semantic notes. Claude Code CX Codex Cursor +1 896installs fal-assets rehan-remade Generates sprites, tileable textures, 3D models, SFX, and music via fal. Built for modders and game developers who need ready-to-use visual and audio assets directly in their workspace. Claude Code CX Codex Cursor +1 1,400installs skill-creator official anthropics Creates and refines skills, then tests them with prompts, evaluations, and performance checks. Claude Code Claude.ai 414,180installs writing-for-agents Matt Pocock Guidance for writing skills and agent-facing documents. Use it when editing AGENTS.md, CLAUDE.md, or reference files reached from them. Claude Code 466,719installs

Questions about huggingface-tool-builder

How do I install huggingface-tool-builder in Claude Code?

Run npx skills add huggingface/skills --skill huggingface-tool-builder -a claude-code, then find the skill at ~/.claude/skills/huggingface-tool-builder/SKILL.md.

What does huggingface-tool-builder do?

It's a skill for creating reusable scripts that work with the Hugging Face API. Helps you automate model search, enrich data, and chain multiple requests together for streaming pipelines.

Do I need a Hugging Face token?

Yes, the skill uses the HF_TOKEN environment variable for authentication and higher rate limits. Set it in your environment before running scripts.

Source text

SKILL.md · Apache-2.0
---
name: huggingface-tool-builder
description: Use this skill when the user wants to build tool/scripts or achieve a task where using data from the Hugging Face API would help. This is especially useful when chaining or combining API calls or the task will be repeated/automated. This Skill creates a reusable script to fetch, enrich or process data.
---

# Hugging Face API Tool Builder

Your purpose is now is to create reusable command line scripts and utilities for using the Hugging Face API, allowing chaining, piping and intermediate processing where helpful. You can access the API directly, as well as use the `hf` command line tool. Model and Dataset cards can be accessed from repositories directly.

## Script Rules

Make sure to follow these rules:
 - Scripts must take a `--help` command line argument to describe their inputs and outputs
 - Non-destructive scripts should be tested before handing over to the User
 - Shell scripts are preferred, but use Python or TSX if complexity or user need requires it.
 - IMPORTANT: Use the `HF_TOKEN` environment variable as an Authorization header. For example: `curl -H "Authorization: Bearer ${HF_TOKEN}" https://huggingface.co/api/`. This provides higher rate limits and appropriate authorization for data access.
 - Investigate the shape of the API results before commiting to a final design; make use of piping and chaining where composability would be an advantage - prefer simple solutions where possible.
 - Share usage examples once complete.

Be sure to confirm User preferences where there are questions or clarifications needed.

## Sample Scripts

Paths below are relative to this skill directory.

Reference examples:
- `references/hf_model_papers_auth.sh` — uses `HF_TOKEN` automatically and chains trending → model metadata → model card parsing with fallbacks; it demonstrates multi-step API usage plus auth hygiene for gated/private content.
- `references/find_models_by_paper.sh` — optional `HF_TOKEN` usage via `--token`, consistent authenticated search, and a retry path when arXiv-prefixed searches are too narrow; it shows resilient query strategy and clear user-facing help.
- `references/hf_model_card_frontmatter.sh` — uses the `hf` CLI to download model cards, extracts YAML frontmatter, and emits NDJSON summaries (license, pipeline tag, tags, gated prompt flag) for easy filtering.

Baseline examples (ultra-simple, minimal logic, raw JSON output with `HF_TOKEN` header):
- `references/baseline_hf_api.sh` — bash
- `references/baseline_hf_api.py` — python
- `references/baseline_hf_api.tsx` — typescript executable

Composable utility (stdin → NDJSON):
- `references/hf_enrich_models.sh` — reads model IDs from stdin, fetches metadata per ID, emits one JSON object per line for streaming pipelines.

Composability through piping (shell-friendly JSON output):
- `references/baseline_hf_api.sh 25 | jq -r '.[].id' | references/hf_enrich_models.sh | jq -s 'sort_by(.downloads) | reverse | .[:10]'`
- `references/baseline_hf_api.sh 50 | jq '[.[] | {id, downloads}] | sort_by(.downloads) | reverse | .[:10]'`
- `printf '%s\n' openai/gpt-oss-120b meta-llama/Meta-Llama-3.1-8B | references/hf_model_card_frontmatter.sh | jq -s 'map({id, license, has_extra_gated_prompt})'`

## High Level Endpoints

The following are the main API endpoints available at `https://huggingface.co`

```
/api/datasets
/api/models
/api/spaces
/api/collections
/api/daily_papers
/api/notifications
/api/settings
/api/whoami-v2
/api/trending
/oauth/userinfo
```

## Accessing the API

The API is documented with the OpenAPI standard at `https://huggingface.co/.well-known/openapi.json`.

**IMPORTANT:** DO NOT ATTEMPT to read `https://huggingface.co/.well-known/openapi.json` directly as it is too large to process. 

**IMPORTANT** Use `jq` to query and extract relevant parts. For example, 

 Command to Get All 160 Endpoints

```bash
curl -s "https://huggingface.co/.well-known/openapi.json" | jq '.paths | keys | sort'
```

Model Search Endpoint Details

```bash
curl -s "https://huggingface.co/.well-known/openapi.json" | jq '.paths["/api/models"]'
```

You can also query endpoints to see the shape of the data. When doing so constrain results to low numbers to make them easy to process, yet representative.

## Using the HF command line tool

The `hf` command line tool gives you further access to Hugging Face repository content and infrastructure. 

```bash
❯ hf --help
Usage: hf [OPTIONS] COMMAND [ARGS]...

  Hugging Face Hub CLI

Options:
  --help                Show this message and exit.

Commands:
  auth                 Manage authentication (login, logout, etc.).
  buckets              Commands to interact with buckets.
  cache                Manage local cache directory.
  collections          Interact with collections on the Hub.
  datasets             Interact with datasets on the Hub.
  discussions          Manage discussions and pull requests on the Hub.
  download             Download files from the Hub.
  endpoints            Manage Hugging Face Inference Endpoints.
  env                  Print information about the environment.
  extensions           Manage hf CLI extensions.
  jobs                 Run and manage Jobs on the Hub.
  models               Interact with models on the Hub.
  papers               Interact with papers on the Hub.
  repos                Manage repos on the Hub.
  skills               Manage skills for AI assistants.
  spaces               Interact with spaces on the Hub.
  sync                 Sync files between local directory and a bucket.
  upload               Upload a file or a folder to the Hub.
  upload-large-folder  Upload a large folder to the Hub.
  version              Print information about the hf version.
  webhooks             Manage webhooks on the Hub.
```

The `hf` CLI command has replaced the now deprecated `huggingface-cli` command.

© huggingface · Apache-2.0 · huggingface/skills

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor