Skip to content

Commit 993d645

Browse files
burtenshawclaudehanouticelinaWauplin
authored
[FEAT] Support skills from hf skills (#3956)
* feat: add feature from hf-skills repo * docs: add update to docs * test: use subprocess to test * fix in docs * Add marketplace skill install and update support * Add marketplace skill install and update support * drop skill excess * remove excess project matter * fix: annotations in test * fix: make fail_populate raise so pytest.raises assertion passes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Simplify hf skills install and upgrade flow * Simplify a bit further * Fix skills upgrade status after successful install * Apply suggestions from code review Co-authored-by: Lucain <lucainp@gmail.com> Co-authored-by: célina <hanouticelina@gmail.com> * Delete uv.lock * simplify * fix: annotate skill update status literal * update example --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: célina <hanouticelina@gmail.com> Co-authored-by: Lucain <lucainp@gmail.com> Co-authored-by: Lucain <lucain@huggingface.co>
1 parent bb7dc6e commit 993d645

4 files changed

Lines changed: 592 additions & 75 deletions

File tree

docs/source/en/package_reference/cli.md

Lines changed: 46 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3240,38 +3240,41 @@ $ hf skills [OPTIONS] COMMAND [ARGS]...
32403240

32413241
**Commands**:
32423242

3243-
* `add`: Download a skill and install it for an AI...
3244-
* `preview`: Print the generated SKILL.md to stdout.
3243+
* `add`: Download a Hugging Face skill and install...
3244+
* `preview`: Print the generated `hf-cli` SKILL.md to...
3245+
* `upgrade`: Upgrade installed Hugging Face marketplace...
32453246

32463247
### `hf skills add`
32473248

3248-
Download a skill and install it for an AI assistant.
3249+
Download a Hugging Face skill and install it for an AI assistant.
32493250

32503251
Default location is in the current directory (.agents/skills) or user-level (~/.agents/skills).
3251-
If custom agents are specified (e.g. --claude --codex --cursor --opencode, etc), the skill will be symlinked to the agent's skills directory.
3252+
If `--claude` is specified, the skill is also symlinked into Claude's legacy skills directory.
32523253

32533254
**Usage**:
32543255

32553256
```console
3256-
$ hf skills add [OPTIONS]
3257+
$ hf skills add [OPTIONS] [NAME]
32573258
```
32583259

3260+
**Arguments**:
3261+
3262+
* `[NAME]`: Marketplace skill name.
3263+
32593264
**Options**:
32603265

32613266
* `--claude`: Install for Claude.
3262-
* `--codex`: Install for Codex.
3263-
* `--cursor`: Install for Cursor.
3264-
* `--opencode`: Install for OpenCode.
32653267
* `-g, --global`: Install globally (user-level) instead of in the current project directory.
32663268
* `--dest PATH`: Install into a custom destination (path to skills directory).
32673269
* `--force`: Overwrite existing skills in the destination.
32683270
* `--help`: Show this message and exit.
32693271

32703272
Examples
32713273
$ hf skills add
3274+
$ hf skills add huggingface-gradio --dest=~/my-skills
32723275
$ hf skills add --global
3273-
$ hf skills add --claude --cursor
3274-
$ hf skills add --codex --opencode --cursor --global
3276+
$ hf skills add --claude
3277+
$ hf skills add huggingface-gradio --claude --global
32753278

32763279
Learn more
32773280
Use `hf <command> --help` for more information about a command.
@@ -3280,7 +3283,7 @@ Learn more
32803283

32813284
### `hf skills preview`
32823285

3283-
Print the generated SKILL.md to stdout.
3286+
Print the generated `hf-cli` SKILL.md to stdout.
32843287

32853288
**Usage**:
32863289

@@ -3292,6 +3295,38 @@ $ hf skills preview [OPTIONS]
32923295

32933296
* `--help`: Show this message and exit.
32943297

3298+
### `hf skills upgrade`
3299+
3300+
Upgrade installed Hugging Face marketplace skills.
3301+
3302+
**Usage**:
3303+
3304+
```console
3305+
$ hf skills upgrade [OPTIONS] [NAME]
3306+
```
3307+
3308+
**Arguments**:
3309+
3310+
* `[NAME]`: Optional installed skill name to upgrade.
3311+
3312+
**Options**:
3313+
3314+
* `--claude`: Upgrade skills installed for Claude.
3315+
* `-g, --global`: Use global skills directories instead of the current project.
3316+
* `--dest PATH`: Upgrade skills in a custom skills directory.
3317+
* `--help`: Show this message and exit.
3318+
3319+
Examples
3320+
$ hf skills upgrade
3321+
$ hf skills upgrade hf-cli
3322+
$ hf skills upgrade huggingface-gradio --dest=~/my-skills
3323+
$ hf skills upgrade --claude
3324+
3325+
Learn more
3326+
Use `hf <command> --help` for more information about a command.
3327+
Read the documentation at https://huggingface.co/docs/huggingface_hub/en/guides/cli
3328+
3329+
32953330
## `hf spaces`
32963331

32973332
Interact with spaces on the Hub.

0 commit comments

Comments
 (0)