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
14 changes: 7 additions & 7 deletions sdk/guides/skill.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Content that's always in the system prompt.
Place `AGENTS.md` at your repo root - it's loaded automatically. See [Permanent Context](/overview/skills/repo).

```python icon="python" focus={3, 4}
from openhands.sdk.context.skills import load_project_skills
from openhands.sdk.skills import load_project_skills

# Automatically finds AGENTS.md, CLAUDE.md, GEMINI.md at workspace root
skills = load_project_skills(workspace_dir="/path/to/repo")
Expand Down Expand Up @@ -200,7 +200,7 @@ Patterns use gitignore-style matching against the workspace-relative POSIX path
For the agent to trigger skills, use the [AgentSkills standard](https://agentskills.io/specification) `SKILL.md` format. The agent sees a summary and reads full content on demand.

```python icon="python"
from openhands.sdk.context.skills import load_skills_from_dir
from openhands.sdk.skills import load_skills_from_dir

# Load SKILL.md files from a directory
_, _, agent_skills = load_skills_from_dir("/path/to/skills")
Expand Down Expand Up @@ -834,7 +834,7 @@ from pathlib import Path
from pydantic import SecretStr

from openhands.sdk import LLM, Agent, AgentContext, Conversation
from openhands.sdk.context.skills import (
from openhands.sdk.skills import (
discover_skill_resources,
load_skills_from_dir,
)
Expand Down Expand Up @@ -951,7 +951,7 @@ print(f"EXAMPLE_COST: {llm.metrics.accumulated_cost:.4f}")
Loads all skills from a directory, returning three dictionaries:

```python icon="python" focus={3}
from openhands.sdk.context.skills import load_skills_from_dir
from openhands.sdk.skills import load_skills_from_dir

repo_skills, knowledge_skills, agent_skills = load_skills_from_dir(skills_dir)
```
Expand All @@ -971,7 +971,7 @@ When passing to `AgentContext(skills=...)`, all three types are accepted. The in
Discovers resource files in a skill directory:

```python icon="python" focus={3}
from openhands.sdk.context.skills import discover_skill_resources
from openhands.sdk.skills import discover_skill_resources

resources = discover_skill_resources(skill_dir)
print(resources.scripts) # List of script files
Expand Down Expand Up @@ -1081,7 +1081,7 @@ agent_context = AgentContext(
You can also load public skills manually and have more control:

```python icon="python"
from openhands.sdk.context.skills import load_public_skills
from openhands.sdk.skills import load_public_skills

# Load all public skills
public_skills = load_public_skills()
Expand All @@ -1101,7 +1101,7 @@ agent_context = AgentContext(skills=my_skills + public_skills)
You can load skills from your own repository:

```python icon="python" focus={3-7}
from openhands.sdk.context.skills import load_public_skills
from openhands.sdk.skills import load_public_skills

# Load from a custom repository
custom_skills = load_public_skills(
Expand Down
Loading