Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions sdk/guides/skill.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,14 @@ Add `triggers` to a SKILL.md for **both** progressive disclosure AND automatic i

You can install AgentSkills into a persistent directory and list/update them
using `openhands.sdk.skills`. Skills are stored under
`~/.openhands/skills/installed/` with a `.installed.json` metadata file.
`~/.openhands/skills/installed/` with a `.installed.json` metadata file that
records an `enabled` flag. `list_installed_skills` returns all installed skills,
while `load_installed_skills` returns only those with `enabled=true`.

```python icon="python"
from openhands.sdk.skills import (
disable_skill,
enable_skill,
install_skill,
list_installed_skills,
load_installed_skills,
Expand All @@ -125,9 +129,17 @@ print(f"Installed {info.name} from {info.source}")
for skill_info in list_installed_skills():
print(f"{skill_info.name}: {skill_info.description}")

# Load installed skills for an AgentContext
# Enable/disable controls which skills load (state persisted in .installed.json)

# Disable a skill temporarily (e.g., while debugging or if it conflicts)
disable_skill("my-skill")

# Load installed skills for an AgentContext (only enabled skills load)
skills = load_installed_skills()

# Re-enable when needed
# enable_skill("my-skill")

# Update or uninstall
update_skill("my-skill")
uninstall_skill("my-skill")
Expand Down
Loading