HuggingFace Tool Builder logo

HuggingFace Tool Builder

Visit

Hugging Face's tool-builder skill has agents write reusable, pipeable scripts over the Hub API and the hf CLI for repeatable model and dataset tasks.

Share:
View alternatives

HuggingFace Tool Builder is the huggingface-tool-builder skill in the official huggingface/skills repository (skill folder). Instead of answering a one-off question about the Hub, it has the agent write a reusable command line script that fetches, enriches or processes Hugging Face data, so the task can be repeated, chained or automated.

The skill is short and opinionated. Its value is in the rules it sets and the sample scripts it ships.

Key Features

  • Script rules: every script must support --help; non-destructive scripts are tested before hand-off; shell is preferred, with Python or TSX when complexity demands it.
  • Auth hygiene: scripts send HF_TOKEN as a bearer header for higher rate limits and access to gated or private data.
  • Explore before building: agents inspect real API responses with small limits, and query the OpenAPI spec at https://huggingface.co/.well-known/openapi.json through jq rather than reading the whole file.
  • Reference scripts: hf_model_papers_auth.sh (trending models to papers), find_models_by_paper.sh, hf_model_card_frontmatter.sh (model card YAML to NDJSON) and hf_enrich_models.sh (stdin IDs to NDJSON).
  • Baselines in bash, Python and TypeScript for the simplest authenticated call.
  • Key endpoints: /api/models, /api/datasets, /api/spaces, /api/collections, /api/daily_papers, /api/trending and more.

Use Cases

  • A weekly report of trending models with their licenses and linked papers.
  • Checking which candidate models are gated before a team picks one.
  • Feeding Hub metadata into another pipeline as NDJSON.

Pricing

Free and open source (Apache-2.0 repository). Public Hub API calls need no payment; a token raises rate limits.

Getting Started

  1. Install HuggingFace CLI, then hf skills add huggingface-tool-builder.
  2. Set HF_TOKEN.
  3. Describe the repeatable task, for example "list the 10 most downloaded text-generation models with their license".
  4. Keep the resulting script in your repo and rerun it.

Limitation: the output is code the agent wrote, so review it before running anything that writes to the Hub. The skill also expects jq and a Unix shell for its composable examples.

FAQ

How is this different from the CLI skill?

The CLI skill runs single commands. This skill produces a script that combines API calls and can be rerun.

Does it build MCP tools?

No. It builds command line scripts.

Alternatives

Conclusion

Pick it when a Hub question will come up again. You end up with a tested script instead of a chat answer. More in the skills hub.

Comments

No comments yet. Be the first to comment!