hf-broker
This skill enables agents to interact with Hugging Face repositories and buckets through a secured broker that manages authentication and permissions.
Identity proven by GitHub's verified organisation badge (huggingface)
- Agents
- Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, claude.ai and API
- License
- MIT (permissive)
- Pin
- 3a99c45pinned Oct 9, 2026
- Context cost
- about 1,200 tokenswhen the skill loads
- GitHub stars
- 10on huggingface/mlclaw
- Scripts
- None found
What it does
“Use ML Claw's HF Broker for protected Hugging Face repository and bucket reads, writes, temporary grants, recovery, and revocation. Use instead of asking for or exposing a Hugging Face access token.”
Generated summary from the skill's own text
This skill enables agents to interact with Hugging Face repositories and buckets through a secured broker that manages authentication and permissions. The agent uses MCP tools or command-line client commands to read, write, and manage temporary grants without handling access tokens directly. It handles file transfers, request tracking, grant lifecycle management, and operation recovery.
When to use it
- Upload or download files to Hugging Face buckets securely
- Request temporary write access to Hugging Face repositories
- Recover or retry incomplete Hugging Face operations
- Manage dataset or model commits with scoped permissions
When not to
- User directly provides a Hugging Face access token
- One-time read operations without Hugging Face Broker setup
- Force pushes or repository deletion requiring longer approval windows
Install
These commands install from the publisher's repository and need no account.
skills CLI
npx skills add huggingface/mlclaw --skill hf-brokerInstalls from the repository's default branch, which may have changed since the commit we checked.
GitHub CLI 2.90 or later
gh skill install huggingface/mlclaw hf-broker@3a99c45581db179fd96e971482d17c70b94b35f3Installs the commit we checked (3a99c45).
Copy by hand
Download the folder at 3a99c45 and put it in .claude/skills/hf-broker for Claude Code and in .agents/skills/hf-broker for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.
Claude Code plugin
/plugin install huggingface-skills@claude-plugins-officialThe publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.
Copy for your agent
A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.
Prompt
Install the agent skill "hf-broker" by Hugging Face. Source, pinned to commit 3a99c45581db179fd96e971482d17c70b94b35f3: https://github.com/huggingface/mlclaw/tree/3a99c45581db179fd96e971482d17c70b94b35f3/assets/hf-tooling/skills/hf-broker 1. Download that folder at exactly this commit. Do not use the default branch. 2. Copy every file unchanged, keeping the folder structure, into .claude/skills/hf-broker/ for Claude Code and .agents/skills/hf-broker/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist. 3. Do not edit the files, and do not run any script in the folder unless I ask you to. 4. When you are done, list the files you copied and where you put them. Listing and checks: https://www.agentnative.dev/skills/hugging-face/hf-broker
SKILL.md at the pin
---
name: hf-broker
description: Use ML Claw's HF Broker for protected Hugging Face repository and bucket reads, writes, temporary grants, recovery, and revocation. Use instead of asking for or exposing a Hugging Face access token.
metadata:
{ "openclaw": { "emoji": "🤗", "requires": { "bins": ["hf-broker"] } } }
---
# Hugging Face Broker
Use the preconfigured HF Broker for protected Hugging Face operations. Never
ask for, print, copy, or export the broker's Hugging Face token. Do not run
`hf auth login` to work around a broker decision.
## Choose a workflow
Use the advertised `hf_*` MCP tools for ordinary typed operations and grant
management. Use `hf-broker client` when a local file must enter or leave the
protected stream store. The runtime already provides the broker endpoint and a
limited agent credential.
Every mutation needs a stable request ID. Reuse it only for an exact retry of
the same operation. If a response is lost, recover the existing operation or
grant instead of submitting another mutation.
## Request reusable write access
Request a temporary grant only when repeated operations are needed. Keep the
scope as narrow as the user requested, and always use the number of uses the
user requested. Do not substitute a fixed example value. A day is 1,440 minutes
and a week is 10,080 minutes.
For `job.run` and `job.uv.run`:
- "Allow any N jobs" means `max_uses: N` with `attrs` omitted or empty, so job
arguments may change between uses for the same target.
- "Run this exact job N times" means `max_uses: N` with exact target and
argument digest attrs.
- If it is unclear whether arguments may change, ask one short question before
requesting the grant.
Before requesting approval, say either "any job arguments for this target" or
"exact job arguments only." Never silently narrow an any-job request with exact
digests.
Set `REQUESTED_USES` to the number the user requested. For one bucket key
prefix:
```sh
hf-broker client grant request bucket.object.write OWNER/BUCKET \
--key 'artifacts/**' \
--minutes 10080 \
--max-uses "$REQUESTED_USES" \
--reason "Write the requested artifacts for one week" \
--request-id STABLE-GRANT-REQUEST-ID
```
For one repository path prefix:
```sh
hf-broker client grant request repo.commit.create OWNER/REPO \
--type dataset \
--path 'data/**' \
--minutes 1440 \
--max-uses "$REQUESTED_USES" \
--reason "Update the requested dataset path for one day" \
--request-id STABLE-GRANT-REQUEST-ID
```
Normal append-only Git pushes can also use a scoped `git.push.append` grant.
Keep the repository type, ref, and path selectors exact. Force pushes, ref
deletion, repository deletion, visibility changes, and access management stay
short-lived or single-use.
A pending grant requires an operator decision. Keep waiting on the same grant
rather than creating another request:
```sh
hf-broker client grant wait --wait-timeout 15m GRANT-ID
hf-broker client grant get GRANT-ID
```
MCP grant calls use bounded waits. If `hf_grant_request` or `hf_grant_wait`
returns `pending`, call `hf_grant_wait` again with the same grant ID. Use
`hf_grant_cancel` for an unapproved request and `hf_grant_revoke` when reusable
access is no longer needed.
## Write and read bucket objects
Upload a local file through the broker's stream store. File bytes do not belong
in MCP JSON, chat messages, plans, approvals, or logs.
```sh
hf-broker client bucket object write \
--target-json '{"kind":"bucket","namespace":"OWNER","name":"BUCKET"}' \
--arguments-json '{"path":"artifacts/result.bin"}' \
--source ./result.bin \
--media-type application/octet-stream \
--reason "Upload the requested result" \
--request-id STABLE-WRITE-REQUEST-ID \
--wait=true \
--wait-timeout 15m
```
Set `"overwrite":true` only when replacing the currently observed object is
intentional. The broker checks the bound precondition again before commit.
Read into a new destination and let the client verify the returned stream:
```sh
hf-broker client bucket object read \
--target-json '{"kind":"bucket","namespace":"OWNER","name":"BUCKET"}' \
--arguments-json '{"path":"artifacts/result.bin"}' \
--output ./downloaded-result.bin \
--reason "Read the requested result" \
--wait=true \
--wait-timeout 15m
```
Use `hf_bucket_object_list` or the matching client command to inspect only the
approved bucket prefix. Do not use the ML Claw state bucket for agent work. Its
exact target is denied by deployment policy, and approval cannot override that
deny.
## Recover operations
A timeout may leave a durable operation pending. Continue with its operation ID
or recover it by request ID:
```sh
hf-broker client operation get OPERATION-ID
hf-broker client operation wait --wait-timeout 15m OPERATION-ID
hf-broker client operation cancel OPERATION-ID
```
If the operation ID was lost, call the `hf_operation_list` MCP tool with the
stable `request_id`, then continue with the returned operation ID.
Stop only after a terminal result, explicit cancellation, or an unrecoverable
broker error. Revocation and expiry prevent later matching writes from reaching
Hugging Face.
From huggingface/mlclaw at 3a99c45, shown as plain text under its license: MIT (permissive). The license text is in LICENSE.
View SKILL.md on GitHub at 3a99c45Files
- SKILL.md5.2 KB · efb32b5c0857
1 file, 5.2 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.
Skill folder on GitHub at 3a99c45More from Hugging Face
hf-cloud-aws-context-discovery
This skill reads the user's local AWS configuration to discover their active profile, region, account ID, and caller identity before any AWS work begins.
Claude Code, Codex, Cursor +4 · about 830 tokens · pinned 6 days ago
hf-cloud-python-env-setup
Sets up an isolated Python environment for SageMaker and AWS work with the correct Python version (3.10, 3.11, or 3.12) and current boto3 and awscli.
Contains scripts
Claude Code, Codex, Cursor +3 · about 1.5K tokens · pinned 6 days ago
hf-cloud-sagemaker-deployment-planner
This skill helps users plan and execute deployments of machine learning models to Amazon SageMaker by gathering requirements, selecting appropriate deployment…
Claude Code, Codex, Cursor +4 · about 1.9K tokens · pinned 6 days ago
hf-cloud-sagemaker-iam-preflight
This skill validates or creates an AWS IAM execution role before deploying SageMaker endpoints, training jobs, or models.
Contains scripts
Claude Code, Codex, Cursor +3 · about 1.6K tokens · pinned 6 days ago
hf-cloud-sagemaker-production-defaults
Deploys SageMaker endpoints with production defaults: autoscaling based on traffic, CloudWatch alarms for latency and errors, and consistent tagging.
Contains scripts
Claude Code, Codex, Cursor +3 · about 6.7K tokens · pinned 6 days ago
hf-cloud-serving-image-selection
This skill helps select the correct SageMaker serving container image for model deployments and retrieves its current URI from AWS's Deep Learning Containers…
Contains scripts
Claude Code, Codex, Cursor +3 · about 4.3K tokens · pinned 6 days ago
Related in Security
ai-inventory
This skill generates an AI Bill of Materials (AIBOM) for Python projects by identifying AI models, datasets, frameworks, and tools using the Snyk AIBOM API.
by SnykOfficial publisher
Claude Code, Codex, Cursor +4 · about 1.7K tokens · pinned 6 days ago
claude-security
Scans your repository for security issues using Claude, examines code changes or commits for vulnerabilities, and generates patch files to fix findings.
by AnthropicOfficial publisher
Claude Code · about 1K tokens · pinned 6 days ago
sensitive-logging-audit
The skill helps audit and fix sensitive data leaks in Python SDK logging, exceptions, and telemetry by collecting candidate sinks, manually tracing values…
by OpenAIOfficial publisher
Contains scripts
Claude Code, Codex, Cursor +3 · about 970 tokens · pinned 6 days ago
security-audit
This skill guides security audits of codebases, APIs, and services by finding vulnerabilities that cross real trust boundaries.
by CloudflareOfficial publisher
Contains scripts
Claude Code · about 5.4K tokens · pinned 6 days ago
assess-patch-risk
This skill analyzes patch artifacts to assess their program impact, regression risk, and suitability for automated merging.
by OpenAIOfficial publisher
Codex · about 2.3K tokens · pinned 6 days ago
attack-path-analysis
This skill analyzes security findings to build explicit attack paths from source to sink, calibrates severity, and decides whether each finding is reportable.
by OpenAIOfficial publisher
Codex · about 2.1K tokens · pinned 6 days ago
Open roles at Hugging Face
3 open roles on the jobs board
- Senior Open-Source Python Engineer, ML Developer Tools - US Remote
United States (Remote)
- Open-Source Machine Learning Engineer - EMEA Remote
Paris, Île-de-France, France (Remote)
- Senior Machine Learning Engineer, Voice Agents - EMEA Remote
Paris, Île-de-France, France (Remote)