Langsung ke konten
Skillpedia
Pemrograman umum48k Β· #4850

huggingface-tool-builder

Fungsinya

Tool ini membuat script untuk mengambil dan menggunakan informasi dari platform Hugging Face. Tool ini membantu mengotomatisasi tugas yang berulang atau menggabungkan berbagai informasi dengan efisien.

Kapan dipakai

  • βœ“Ketika Anda perlu mengunduh data dari model atau dataset.
  • βœ“Untuk membuat script yang secara otomatis mengambil informasi Hugging Face tertentu.
  • βœ“Ketika menggabungkan beberapa pemanggilan API Hugging Face untuk tugas yang kompleks.

Link skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/huggingface-tool-builder/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/huggingface-tool-builder/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œBuatkan script yang menampilkan 10 model di Hugging Face yang paling banyak diunduh.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Tool ini menggunakan API Hugging Face atau tool command-line `hf` untuk mengakses data. Tool ini dapat membuat script shell, Python, atau TypeScript untuk menjalankan tugas yang diinginkan.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Hugging Face API Tool Builder

When to Use

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...

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

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

Model Search Endpoint Details

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.

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

  Hugging Face Hub CLI

Options:

…
Pertanyaan umum

Apa itu Hugging Face?

Ini adalah platform yang menyediakan model machine learning, dataset, dan tool untuk membangun aplikasi AI.

Apa itu API?

API adalah antarmuka yang memungkinkan program komputer yang berbeda saling berkomunikasi dan bertukar informasi.

Mengapa menggunakan `HF_TOKEN`?

Dengan `HF_TOKEN`, Anda bisa mengakses lebih banyak data dengan batas yang lebih tinggi serta mendapatkan izin untuk mengakses konten yang dibatasi.

Detail

Deskripsi asli dari pembuat

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.

repo: sickn33/agentic-awesome-skills

Popularitas

Bintang GitHub
48k
Peringkat
#4850
Lisensi
MIT
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa