diff --git a/sdk/guides/skill.mdx b/sdk/guides/skill.mdx index e7591c35..ecddb4f0 100644 --- a/sdk/guides/skill.mdx +++ b/sdk/guides/skill.mdx @@ -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, @@ -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")