Skip to content

[CLI] migrate hf skills to bucket#4175

Merged
Wauplin merged 6 commits intomainfrom
cli-skills-bucket-marketplace
May 4, 2026
Merged

[CLI] migrate hf skills to bucket#4175
Wauplin merged 6 commits intomainfrom
cli-skills-bucket-marketplace

Conversation

@hanouticelina
Copy link
Copy Markdown
Contributor

@hanouticelina hanouticelina commented Apr 30, 2026

This PR updates hf skills add / hf skills update to fetch the skills from the huggingface/skills bucket instead of the GitHub API. the bucket is populated by a workflow on huggingface/skills that syncs skills + marketplace.json on every merge to main (companion PR: huggingface/skills#134).


Note

Medium Risk
Switches the hf skills install/update backend from GitHub tarball/commit polling to Hugging Face bucket listing/downloading, changing update semantics and managed-skill detection. Risk is mainly around regressions in install/update behavior (file filtering, partial downloads, and compatibility with older installs).

Overview
hf skills add/hf skills update now fetch marketplace metadata and skill contents from the huggingface/skills bucket (via list_bucket_tree + download_bucket_files) instead of the GitHub API/tarballs.

Update behavior is simplified to a re-sync: managed installs are detected via a marker file (.hf-skill-manifest.json, now an empty touch file kept for backward compatibility) and are reinstalled atomically; revision-based update_available/updated statuses and manifest parsing/writing are removed. Production CLI tests are updated accordingly and gated behind hf_xet.

Reviewed by Cursor Bugbot for commit 73f215a. Bugbot is set up for automated code reviews on this repo. Configure here.

@hanouticelina hanouticelina changed the title Cli skills bucket marketplace [CLI] migrate hf skills to bucket and rename upgrade -> update Apr 30, 2026
@bot-ci-comment
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@hanouticelina hanouticelina force-pushed the cli-skills-bucket-marketplace branch 3 times, most recently from 5d92d01 to fd79e50 Compare April 30, 2026 17:04
Switch `hf skills add` / `hf skills upgrade` to read marketplace metadata and skill files from the `huggingface/skills` bucket via `HfApi.list_bucket_tree` and `HfApi.download_bucket_files`. Avoids GitHub API rate limits when agents are also making GH calls.

The bucket is populated by a workflow on `huggingface/skills` that uploads skills + `marketplace.json` on every merge to `main`.

`hf skills upgrade` now always re-syncs from the bucket (no per-skill revision tracking).
Filter the local skill dir list by selector *before* loading the marketplace and
re-syncing, so a typo no longer downloads every managed skill before erroring out.
Also include an actionable hint in the error message.
@hanouticelina hanouticelina force-pushed the cli-skills-bucket-marketplace branch from fd79e50 to c1900fe Compare April 30, 2026 17:23
@hanouticelina hanouticelina changed the title [CLI] migrate hf skills to bucket and rename upgrade -> update [CLI] migrate hf skills to bucket Apr 30, 2026
@hanouticelina hanouticelina requested a review from Wauplin April 30, 2026 17:26
@hanouticelina hanouticelina marked this pull request as ready for review April 30, 2026 17:28
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 85034b4. Configure here.

Comment thread src/huggingface_hub/cli/_skills.py
Comment thread src/huggingface_hub/cli/_skills.py
hanouticelina and others added 3 commits April 30, 2026 18:37
`download_bucket_files` requires `hf_xet` so the live tests fail in CI envs
without the optional dep. Mark the class with `@requires("hf_xet")`.
`list_bucket_tree(prefix=...)` matches as a raw string prefix, so asking for
`skills/gradio` can also return `skills/gradio-tools/...`. Existing
`_buckets.py:_list_remote_files` has the same defense.
Copy link
Copy Markdown
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the clean-up + migration!

@Wauplin Wauplin merged commit 868dd20 into main May 4, 2026
20 of 21 checks passed
@Wauplin Wauplin deleted the cli-skills-bucket-marketplace branch May 4, 2026 08:03
@huggingface-hub-bot
Copy link
Copy Markdown
Contributor

This PR has been shipped as part of the v1.14.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants