You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sdk/guides/mixed-marketplace-skills.mdx
+39-17Lines changed: 39 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ This guide focuses on the two loader APIs used in the example:
25
25
26
26
## Example repository layout
27
27
28
-
The example repository separates local skills from the marketplace configuration that filters public skills:
28
+
The example repository separates local skills from the marketplace configuration that describes which remote skills should be included:
29
29
30
30
```text
31
31
43_mixed_marketplace_skills/
@@ -40,11 +40,34 @@ The example repository separates local skills from the marketplace configuration
40
40
41
41
## Marketplace format note
42
42
43
-
The `.plugin/marketplace.json` file follows the Claude Code plugin marketplace schema. In OpenHands, plugin entry names are used as a filter list for which public skills to load from OpenHands/extensions, while local skills live in `local_skills/` and are merged separately.
43
+
The `.plugin/marketplace.json` file follows the Claude Code plugin marketplace schema, with an OpenHands extension for direct `skills[]` entries. A minimal mixed example looks like this:
"description": "GitHub best practices from OpenHands/extensions"
59
+
}
60
+
]
61
+
}
62
+
```
63
+
64
+
That file is the repository-managed configuration that expresses the mixed marketplace itself.
44
65
45
-
The guide below starts with the simplest direct loader calls (`load_skills_from_dir()` and `load_public_skills()`) so you can see exactly what each source contributes. The example repository still includes `.plugin/marketplace.json` because that is the configuration file used for repository-managed marketplace filtering.
66
+
The code example below focuses on the two underlying loader APIs (`load_skills_from_dir()` and `load_public_skills()`) so you can see exactly what each source contributes. In other words:
46
67
47
-
Additionally, OpenHands extends the schema with an optional `skills[]` array for listing skills directly (these are treated as direct skill sources, not plugin bundles).
68
+
-`load_skills_from_dir(local_skills_dir)` reads local `SKILL.md` files from your repository.
69
+
-`load_public_skills()` reads from the SDK's default OpenHands/extensions marketplace.
70
+
-`.plugin/marketplace.json` is the place where you would encode an equivalent curated mix when you want the repository to own that marketplace configuration.
48
71
49
72
## Example: Combining Local and Remote Skills
50
73
@@ -78,9 +101,9 @@ Directory Structure:
78
101
├── main.py # This example script
79
102
└── README.md
80
103
81
-
The marketplace.json lists which remote skills to include. In OpenHands, entries
82
-
in `skills[]` or `plugins[]` should point directly to skill directories containing
83
-
`SKILL.md`; local skills live in `local_skills/` and are loaded separately.
104
+
The `.plugin/marketplace.json` file shown earlier is where you would encode the
105
+
mixed marketplace itself. In this example script we intentionally call the loader
106
+
APIs directly so you can see each source in isolation before combining them.
84
107
"""
85
108
86
109
import argparse
@@ -144,8 +167,9 @@ def main():
144
167
145
168
print("\nLoading public skills from https://github.com/OpenHands/extensions...")
146
169
147
-
# Load public skills from the OpenHands extensions repository
148
-
# This pulls from the default marketplace at OpenHands/extensions
170
+
# Load public skills from the OpenHands extensions repository.
171
+
# This call uses the SDK's default OpenHands/extensions marketplace,
172
+
# not the `.plugin/marketplace.json` file shown above.
149
173
public_skills = load_public_skills()
150
174
151
175
print(f"\nLoaded {len(public_skills)} public skills from OpenHands/extensions:")
@@ -162,17 +186,15 @@ def main():
162
186
print("Part 3: Combining Local and Remote Skills")
163
187
print("="*80)
164
188
165
-
# Combine skills with local skills taking precedence
166
-
# This allows local skills to override public skills with the same name
189
+
# Combine skills with local skills taking precedence.
0 commit comments