Skip to content
Merged
Show file tree
Hide file tree
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
21 changes: 16 additions & 5 deletions overview/skills.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
To add optional skills that are loaded on demand:

- **AgentSkills standard (recommended for progressive disclosure)**: create one directory per skill and add a `SKILL.md` file.
- **Legacy/OpenHands format (simple)**: put markdown files in `.openhands/skills/*.md`.
- **Legacy/OpenHands format (simple)**: put markdown files in `.agents/skills/*.md` at the repository root.

<Note>
Loaded skills take up space in the context window. On-demand skills help keep the system prompt smaller because the agent sees a summary first and reads the full content only when needed.
Expand All @@ -48,7 +48,7 @@
```
some-repository/
├── AGENTS.md # Permanent repository guidelines (recommended)
└── .openhands/
└── .agents/
└── skills/
├── rot13-encryption/ # AgentSkills standard (progressive disclosure)
│ ├── SKILL.md
Expand All @@ -63,6 +63,17 @@
└── legacy_trigger_this.md # Legacy/OpenHands format (keyword-triggered)
```

## Skill Loading Precedence (Project Directory)

All paths are relative to the repository root; `.agents/skills/` is a subdirectory of the project directory.

When multiple skills share the same name, OpenHands keeps the first match in this order:

1. `.agents/skills/` (recommended)
2. `.openhands/skills/` (legacy)
3. `.openhands/microagents/` (deprecated)


## Skill Types

Currently supported skill types:
Expand All @@ -72,9 +83,9 @@
- **[Organization Skills](/overview/skills/org)**: Team or organization-wide standards.
- **[Global Skills](/overview/skills/public)**: Community-shared skills and templates.

### Skills Frontmatter Requirements

Check warning on line 86 in overview/skills.mdx

View check run for this annotation

Mintlify / Mintlify Validation (allhandsai) - vale-spellcheck

overview/skills.mdx#L86

Did you really mean 'Frontmatter'?

Each skill file may include frontmatter that provides additional information. In some cases, this frontmatter is required:

Check warning on line 88 in overview/skills.mdx

View check run for this annotation

Mintlify / Mintlify Validation (allhandsai) - vale-spellcheck

overview/skills.mdx#L88

Did you really mean 'frontmatter'?

Check warning on line 88 in overview/skills.mdx

View check run for this annotation

Mintlify / Mintlify Validation (allhandsai) - vale-spellcheck

overview/skills.mdx#L88

Did you really mean 'frontmatter'?

| Skill Type | Required |
|-------------|----------|
Expand All @@ -85,9 +96,9 @@

| Platform | Support Level | Configuration Method | Implementation | Documentation |
|----------|---------------|---------------------|----------------|---------------|
| **CLI** | ✅ Full Support | `~/.openhands/skills/` (user-level) and `.openhands/skills/` (repo-level) | File-based markdown | [Skills Overview](/overview/skills) |
| **CLI** | ✅ Full Support | `~/.openhands/skills/` (user-level) and `.agents/skills/` (repo-level, `.openhands/skills/` legacy) | File-based markdown | [Skills Overview](/overview/skills) |
| **SDK** | ✅ Full Support | Programmatic `Skill` objects | Code-based configuration | [SDK Skills Guide](/sdk/guides/skill) |
| **Local GUI** | ✅ Full Support | `.openhands/skills/` + UI | File-based with UI management | [Local Setup](/openhands/usage/run-openhands/local-setup) |
| **Local GUI** | ✅ Full Support | `.agents/skills/` + UI (`.openhands/skills/` legacy) | File-based with UI management | [Local Setup](/openhands/usage/run-openhands/local-setup) |
| **OpenHands Cloud** | ✅ Full Support | Cloud UI + repository integration | Managed skill library | [Cloud UI](/openhands/usage/cloud/cloud-ui) |

## Platform-Specific Differences
Expand All @@ -96,7 +107,7 @@
<Tab title="CLI">
- File-based configuration in two locations:
- `~/.openhands/skills/` - User-level skills (all conversations)
- `.openhands/skills/` - Repository-level skills (current directory)
- `.agents/skills/` - Repository-level skills (current directory)
- Markdown format for skill definitions
- Manual file management required
- Supports both general and keyword-triggered skills
Expand Down
2 changes: 1 addition & 1 deletion overview/skills/keyword.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

These skills are only loaded when a prompt includes one of the trigger words.

## Frontmatter Syntax

Check warning on line 10 in overview/skills/keyword.mdx

View check run for this annotation

Mintlify / Mintlify Validation (allhandsai) - vale-spellcheck

overview/skills/keyword.mdx#L10

Did you really mean 'Frontmatter'?

Frontmatter is required for keyword-triggered skills. It must be placed at the top of the file,

Check warning on line 12 in overview/skills/keyword.mdx

View check run for this annotation

Mintlify / Mintlify Validation (allhandsai) - vale-spellcheck

overview/skills/keyword.mdx#L12

Did you really mean 'Frontmatter'?
above the guidelines.

Enclose the frontmatter in triple dashes (---) and include the following fields:

Check warning on line 15 in overview/skills/keyword.mdx

View check run for this annotation

Mintlify / Mintlify Validation (allhandsai) - vale-spellcheck

overview/skills/keyword.mdx#L15

Did you really mean 'frontmatter'?

| Field | Description | Required | Default |
|------------|--------------------------------------------------|----------|------------------|
Expand All @@ -21,7 +21,7 @@

## Example

Keyword-triggered skill file example located at `.openhands/skills/yummy.md`:
Keyword-triggered skill file example located at `.agents/skills/yummy.md` (or `.openhands/skills/yummy.md` for legacy setups):
```
---
triggers:
Expand Down
2 changes: 1 addition & 1 deletion sdk/arch/skill.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@

| Component | Purpose | Design |
|-----------|---------|--------|
| **[`Skill`](https://github.com/OpenHands/software-agent-sdk/blob/main/openhands-sdk/openhands/sdk/context/skills/skill.py)** | Core skill model | Pydantic model with name, content, trigger |

Check warning on line 75 in sdk/arch/skill.mdx

View check run for this annotation

Mintlify / Mintlify Validation (allhandsai) - vale-spellcheck

sdk/arch/skill.mdx#L75

Did you really mean 'Pydantic'?
| **[`KeywordTrigger`](https://github.com/OpenHands/software-agent-sdk/blob/main/openhands-sdk/openhands/sdk/context/skills/trigger.py)** | Keyword-based activation | String matching on user messages |
| **[`TaskTrigger`](https://github.com/OpenHands/software-agent-sdk/blob/main/openhands-sdk/openhands/sdk/context/skills/trigger.py)** | Task-based activation | Special type of KeywordTrigger for skills with user inputs |
| **[`InputMetadata`](https://github.com/OpenHands/software-agent-sdk/blob/main/openhands-sdk/openhands/sdk/context/skills/types.py)** | Task input parameters | Defines user inputs for task skills |
| **Skill Loader** | File parsing | Reads markdown with frontmatter, validates schema |

Check warning on line 79 in sdk/arch/skill.mdx

View check run for this annotation

Mintlify / Mintlify Validation (allhandsai) - vale-spellcheck

sdk/arch/skill.mdx#L79

Did you really mean 'frontmatter'?

## Skill Types

Expand Down Expand Up @@ -106,7 +106,7 @@
- **Trigger:** `None` (always active)
- **Purpose:** Project conventions, coding standards, architecture rules
- **MCP Tools:** Can include MCP tool configuration
- **Location:** `AGENTS.md` (recommended) and/or `.openhands/skills/*.md` (supported)
- **Location:** `AGENTS.md` (recommended) and/or `.agents/skills/*.md` (supported)

**Example Files (permanent context):**
- `AGENTS.md` - General agent instructions
Expand Down Expand Up @@ -291,7 +291,7 @@
```

**Workflow:**
1. **Load Skill:** Parse markdown file with frontmatter

Check warning on line 294 in sdk/arch/skill.mdx

View check run for this annotation

Mintlify / Mintlify Validation (allhandsai) - vale-spellcheck

sdk/arch/skill.mdx#L294

Did you really mean 'frontmatter'?
2. **Extract MCP Config:** Read `mcp_tools` field
3. **Spawn MCP Servers:** Create MCP clients for each server
4. **Register Tools:** Add MCP tools to agent's tool registry
Expand All @@ -299,7 +299,7 @@

## Skill File Format

Skills are defined in markdown files with YAML frontmatter:

Check warning on line 302 in sdk/arch/skill.mdx

View check run for this annotation

Mintlify / Mintlify Validation (allhandsai) - vale-spellcheck

sdk/arch/skill.mdx#L302

Did you really mean 'frontmatter'?

```markdown
---
Expand All @@ -314,13 +314,13 @@
This is the instruction text that will be added to the agent's context.
```

**Frontmatter Fields:**

Check warning on line 317 in sdk/arch/skill.mdx

View check run for this annotation

Mintlify / Mintlify Validation (allhandsai) - vale-spellcheck

sdk/arch/skill.mdx#L317

Did you really mean 'Frontmatter'?

| Field | Required | Description |
|-------|----------|-------------|
| **name** | Yes | Unique skill identifier |
| **trigger** | Yes* | Activation trigger (`null` for always active) |
| **mcp_tools** | No | MCP server configuration (repo skills only) |

Check warning on line 323 in sdk/arch/skill.mdx

View check run for this annotation

Mintlify / Mintlify Validation (allhandsai) - vale-spellcheck

sdk/arch/skill.mdx#L323

Did you really mean 'mcp_tools'?
| **inputs** | No | User input metadata (task skills only) |

*Repository skills use `trigger: null` (or omit trigger field)
Expand Down