{"id":"f5687325-2951-4645-8fed-08bbf8f7adaf","shortId":"dxmmnm","kind":"skill","title":"hugging-face-tool-builder","tagline":"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.","description":"# Hugging Face API Tool Builder\n\nYour 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.\n\n## When to Use\n- You need reusable CLI scripts around the Hugging Face API or `hf` command line tool.\n- You want shell-friendly utilities that support chaining, piping, and intermediate processing.\n- You are automating repeated Hub tasks and need a composable interface instead of ad hoc API calls.\n\n## Script Rules\n\nMake sure to follow these rules:\n - Scripts must take a `--help` command line argument to describe their inputs and outputs\n - Non-destructive scripts should be tested before handing over to the User\n - Shell scripts are preferred, but use Python or TSX if complexity or user need requires it.\n - 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.\n - 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.\n - Share usage examples once complete.\n\nBe sure to confirm User preferences where there are questions or clarifications needed.\n\n## Sample Scripts\n\nPaths below are relative to this skill directory.\n\nReference examples:\n- `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.\n- `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.\n- `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.\n\nBaseline examples (ultra-simple, minimal logic, raw JSON output with `HF_TOKEN` header):\n- `references/baseline_hf_api.sh` — bash\n- `references/baseline_hf_api.py` — python\n- `references/baseline_hf_api.tsx` — typescript executable\n\nComposable utility (stdin → NDJSON):\n- `references/hf_enrich_models.sh` — reads model IDs from stdin, fetches metadata per ID, emits one JSON object per line for streaming pipelines.\n\nComposability through piping (shell-friendly JSON output):\n- `references/baseline_hf_api.sh 25 | jq -r '.[].id' | references/hf_enrich_models.sh | jq -s 'sort_by(.downloads) | reverse | .[:10]'`\n- `references/baseline_hf_api.sh 50 | jq '[.[] | {id, downloads}] | sort_by(.downloads) | reverse | .[:10]'`\n- `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})'`\n\n## High Level Endpoints\n\nThe following are the main API endpoints available at `https://huggingface.co`\n\n```\n/api/datasets\n/api/models\n/api/spaces\n/api/collections\n/api/daily_papers\n/api/notifications\n/api/settings\n/api/whoami-v2\n/api/trending\n/oauth/userinfo\n```\n\n## Accessing the API\n\nThe API is documented with the OpenAPI standard at `https://huggingface.co/.well-known/openapi.json`.\n\n**IMPORTANT:** DO NOT ATTEMPT to read `https://huggingface.co/.well-known/openapi.json` directly as it is too large to process. \n\n**IMPORTANT** Use `jq` to query and extract relevant parts. For example, \n\n Command to Get All 160 Endpoints\n\n```bash\ncurl -s \"https://huggingface.co/.well-known/openapi.json\" | jq '.paths | keys | sort'\n```\n\nModel Search Endpoint Details\n\n```bash\ncurl -s \"https://huggingface.co/.well-known/openapi.json\" | jq '.paths[\"/api/models\"]'\n```\n\nYou 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.\n\n## Using the HF command line tool\n\nThe `hf` command line tool gives you further access to Hugging Face repository content and infrastructure. \n\n```bash\n❯ hf --help\nUsage: hf [OPTIONS] COMMAND [ARGS]...\n\n  Hugging Face Hub CLI\n\nOptions:\n  --help                Show this message and exit.\n\nCommands:\n  auth                 Manage authentication (login, logout, etc.).\n  cache                Manage local cache directory.\n  download             Download files from the Hub.\n  endpoints            Manage Hugging Face Inference Endpoints.\n  env                  Print information about the environment.\n  jobs                 Run and manage Jobs on the Hub.\n  repo                 Manage repos on the Hub.\n  repo-files           Manage files in a repo on the Hub.\n  upload               Upload a file or a folder to the Hub.\n  upload-large-folder  Upload a large folder to the Hub.\n  version              Print information about the hf version.\n```\n\nThe `hf` CLI command has replaced the now deprecated `huggingface_hub` CLI command.\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.","tags":["hugging","face","tool","builder","antigravity","awesome","skills","sickn33","agent-skills","agentic-skills","ai-agent-skills","ai-agents"],"capabilities":["skill","source-sickn33","skill-hugging-face-tool-builder","topic-agent-skills","topic-agentic-skills","topic-ai-agent-skills","topic-ai-agents","topic-ai-coding","topic-ai-workflows","topic-antigravity","topic-antigravity-skills","topic-claude-code","topic-claude-code-skills","topic-codex-cli","topic-codex-skills"],"categories":["antigravity-awesome-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/sickn33/antigravity-awesome-skills/hugging-face-tool-builder","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add sickn33/antigravity-awesome-skills","source_repo":"https://github.com/sickn33/antigravity-awesome-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 34768 github stars · SKILL.md body (5,561 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-23T18:51:30.064Z","embedding":null,"createdAt":"2026-04-18T21:38:49.700Z","updatedAt":"2026-04-23T18:51:30.064Z","lastSeenAt":"2026-04-23T18:51:30.064Z","tsv":"'/.well-known/openapi.json':514,523,554,568 '/api/':225 '/api/collections':493 '/api/daily_papers':494 '/api/datasets':490 '/api/models':491,571 '/api/notifications':495 '/api/settings':496 '/api/spaces':492 '/api/trending':498 '/api/whoami-v2':497 '/meta-llama-3.1-8b':466 '/oauth/userinfo':499 '10':448,458 '160':547 '25':437 '50':450 'access':35,82,101,236,500,614 'ad':149 'advantag':261 'allow':25,72 'also':574 'api':24,37,50,71,84,117,151,242,317,485,502,504 'appropri':232 'arg':629 'argument':168 'around':113 'arxiv':341 'arxiv-prefix':340 'ask':770 'attempt':518 'auth':320,642 'authent':333,644 'author':213,219,233 'autom':138 'automat':301 'avail':487 'baselin':384 'bash':399,549,563,622 'bearer':220 'boundari':778 'builder':5,52 'cach':648,651 'call':152 'card':98,308,366 'chain':26,73,131,255,303 'clarif':283,772 'clear':353,745 'cli':111,362,633,726,735 'command':14,45,61,92,120,166,543,603,608,628,641,727,736 'commit':245 'complet':271 'complex':198 'compos':145,257,405,428 'confirm':275 'consist':332 'constrain':587 'content':324,619 'creat':12,59 'criteria':781 'curl':217,550,564 'data':235,583 'dataset':97 'demonstr':313 'deprec':732 'describ':170,749 'design':249 'destruct':177 'detail':562 'direct':38,85,104,524 'directori':294,652 'document':506 'download':364,446,453,456,653,654 'easi':382,595 'emit':371,419 'endpoint':479,486,548,561,576,659,664 'env':665 'environ':209,670,761 'environment-specif':760 'etc':647 'exampl':216,269,296,385,542 'execut':404 'exit':640 'expert':766 'extra':474 'extract':367,538 'face':3,23,49,70,116,356,617,631,662 'fallback':311 'fetch':415 'file':655,687,689,699 'filter':383 'final':248 'flag':380 'folder':702,709,713 'follow':158,481 'friend':127,433 'frontmatt':369 'gate':378,475 'gated/private':323 'get':545 'give':611 'h':218 'hand':183 'header':214,397 'help':32,79,165,357,624,635 'hf':44,91,119,207,221,299,327,361,395,602,607,623,626,722,725 'high':477 'higher':228 'hoc':150 'hub':140,632,658,678,684,695,705,716,734 'hug':2,22,48,69,115,616,630,661 'hugging-face-tool-build':1 'huggingfac':733 'huggingface.co':224,489,513,522,553,567 'huggingface.co/.well-known/openapi.json':512,521,552,566 'huggingface.co/api/':223 'hygien':321 'id':412,418,440,452,471 'import':204,515,532 'infer':663 'inform':667,719 'infrastructur':621 'input':172,775 'instead':147 'interfac':146 'intermedi':29,76,134 'investig':237 'job':671,675 'jq':438,442,451,468,534,555,569 'json':392,421,434 'key':557 'larg':529,708,712 'level':478 'licens':374,472 'limit':230,737 'line':15,46,62,93,121,167,424,604,609 'llama':465 'local':650 'logic':390 'login':645 'logout':646 'low':590 'main':484 'make':155,250,593 'manag':643,649,660,674,680,688 'map':470 'match':746 'messag':638 'meta':464 'meta-llama':463 'metadata':306,416 'minim':389 'miss':783 'model':95,305,307,365,411,559 'multi':315 'multi-step':314 'must':162 'n':461 'narrow':346 'ndjson':372,408 'need':109,143,201,284 'non':176 'non-destruct':175 'number':591 'object':422 'one':420 'openai/gpt-oss-120b':462 'openapi':509 'option':326,627,634 'output':174,393,435,755 'pars':309 'part':540 'path':287,338,556,570 'per':417,423 'permiss':776 'pipe':27,74,132,253,430 'pipelin':375,427 'plus':319 'possibl':266 'prefer':191,262,277 'prefix':342 'print':666,718 'printf':459 'process':30,77,135,531,597 'prompt':379,476 'provid':227 'purpos':7,54 'python':194,401 'queri':350,536,575 'question':281 'r':439 'rate':229 'raw':391 'read':410,520 'refer':295 'references/baseline_hf_api.py':400 'references/baseline_hf_api.sh':398,436,449 'references/baseline_hf_api.tsx':402 'references/find_models_by_paper.sh':325 'references/hf_enrich_models.sh':409,441 'references/hf_model_card_frontmatter.sh':358,467 'references/hf_model_papers_auth.sh':297 'relat':290 'relev':539 'repeat':139 'replac':729 'repo':679,681,686,692 'repo-fil':685 'repositori':103,618 'repres':599 'requir':202,774 'resili':349 'result':243,588 'retri':337 'reusabl':13,60,110 'revers':447,457 'review':767 'rule':154,160 'run':672 'safeti':777 'sampl':285 'scope':748 'script':16,63,112,153,161,178,189,286 'search':334,343,560 'see':578 'shape':239,580 'share':267 'shell':126,188,432 'shell-friend':125,431 'show':348,636 'simpl':263,388 'skill':293,740 'skill-hugging-face-tool-builder' 'solut':264 'sort':444,454,558 'source-sickn33' 'specif':762 'standard':510 'stdin':407,414 'step':316 'stop':768 'strategi':351 'stream':426 'substitut':758 'success':780 'summari':373 'support':130 'sure':156,273 'tag':376,377 'take':163 'task':141,744 'test':181,764 'token':208,222,300,328,331,396 'tool':4,47,51,94,122,605,610 'topic-agent-skills' 'topic-agentic-skills' 'topic-ai-agent-skills' 'topic-ai-agents' 'topic-ai-coding' 'topic-ai-workflows' 'topic-antigravity' 'topic-antigravity-skills' 'topic-claude-code' 'topic-claude-code-skills' 'topic-codex-cli' 'topic-codex-skills' 'treat':753 'trend':304 'tsx':196 'typescript':403 'ultra':387 'ultra-simpl':386 'upload':696,697,707,710 'upload-large-fold':706 'usag':268,318,329,625 'use':20,42,67,89,107,193,205,251,298,359,533,600,738 'user':187,200,276,355 'user-fac':354 'util':18,65,128,406 'valid':763 'variabl':210 'version':717,723 'via':330 'want':124 'well':40,87 'would':258 'yaml':368 'yet':598","prices":[{"id":"9276c58d-0806-40cd-bb2b-75dae4e3b26d","listingId":"f5687325-2951-4645-8fed-08bbf8f7adaf","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"sickn33","category":"antigravity-awesome-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T21:38:49.700Z"}],"sources":[{"listingId":"f5687325-2951-4645-8fed-08bbf8f7adaf","source":"github","sourceId":"sickn33/antigravity-awesome-skills/hugging-face-tool-builder","sourceUrl":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/hugging-face-tool-builder","isPrimary":false,"firstSeenAt":"2026-04-18T21:38:49.700Z","lastSeenAt":"2026-04-23T18:51:30.064Z"}],"details":{"listingId":"f5687325-2951-4645-8fed-08bbf8f7adaf","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"sickn33","slug":"hugging-face-tool-builder","github":{"repo":"sickn33/antigravity-awesome-skills","stars":34768,"topics":["agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows","antigravity","antigravity-skills","claude-code","claude-code-skills","codex-cli","codex-skills","cursor","cursor-skills","developer-tools","gemini-cli","gemini-skills","kiro","mcp","skill-library"],"license":"mit","html_url":"https://github.com/sickn33/antigravity-awesome-skills","pushed_at":"2026-04-23T06:41:03Z","description":"Installable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.","skill_md_sha":"ed6630ab2e99c7bd314d906648d4e90268093bfc","skill_md_path":"skills/hugging-face-tool-builder/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/hugging-face-tool-builder"},"layout":"multi","source":"github","category":"antigravity-awesome-skills","frontmatter":{"name":"hugging-face-tool-builder","description":"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."},"skills_sh_url":"https://skills.sh/sickn33/antigravity-awesome-skills/hugging-face-tool-builder"},"updatedAt":"2026-04-23T18:51:30.064Z"}}