Skip to content

Commit 09d2feb

Browse files
docs: skill tool/perm + parent keybind (anomalyco#6001)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
1 parent 2c5c1ec commit 09d2feb

3 files changed

Lines changed: 55 additions & 4 deletions

File tree

packages/web/src/content/docs/keybinds.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ OpenCode has a list of keybinds that you can customize through the OpenCode conf
2424
"session_unshare": "none",
2525
"session_interrupt": "escape",
2626
"session_compact": "<leader>c",
27-
"session_child_cycle": "<leader>+right",
28-
"session_child_cycle_reverse": "<leader>+left",
27+
"session_child_cycle": "<leader>right",
28+
"session_child_cycle_reverse": "<leader>left",
29+
"session_parent": "<leader>up",
2930
"messages_page_up": "pageup",
3031
"messages_page_down": "pagedown",
3132
"messages_half_page_up": "ctrl+alt+u",

packages/web/src/content/docs/permissions.mdx

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ By default, OpenCode allows most operations without approval, except `doom_loop`
1111
"permission": {
1212
"edit": "allow",
1313
"bash": "ask",
14+
"skill": "ask",
1415
"webfetch": "deny",
1516
"doom_loop": "ask",
1617
"external_directory": "ask"
1718
}
1819
}
1920
```
2021

21-
This lets you configure granular controls for the `edit`, `bash`, `webfetch`, `doom_loop`, and `external_directory` tools.
22+
This lets you configure granular controls for the `edit`, `bash`, `skill`, `webfetch`, `doom_loop`, and `external_directory` tools.
2223

2324
- `"ask"` — Prompt for approval before running the tool
2425
- `"allow"` — Allow all operations without approval
@@ -28,7 +29,7 @@ This lets you configure granular controls for the `edit`, `bash`, `webfetch`, `d
2829

2930
## Tools
3031

31-
Currently, the permissions for the `edit`, `bash`, `webfetch`, `doom_loop`, and `external_directory` tools can be configured through the `permission` option.
32+
Currently, the permissions for the `edit`, `bash`, `skill`, `webfetch`, `doom_loop`, and `external_directory` tools can be configured through the `permission` option.
3233

3334
---
3435

@@ -144,6 +145,38 @@ When an agent asks for permission to run a command in a pipeline, we use tree si
144145

145146
---
146147

148+
### skill
149+
150+
Use the `permission.skill` key to control whether the model can load skills via the built-in `skill` tool.
151+
152+
You can apply a single rule to all skills:
153+
154+
```json title="opencode.json" {4}
155+
{
156+
"$schema": "https://opencode.ai/config.json",
157+
"permission": {
158+
"skill": "ask"
159+
}
160+
}
161+
```
162+
163+
Or configure per-skill rules (supports the same wildcard patterns as `permission.bash`):
164+
165+
```json title="opencode.json"
166+
{
167+
"$schema": "https://opencode.ai/config.json",
168+
"permission": {
169+
"skill": {
170+
"*": "deny",
171+
"git-*": "allow",
172+
"frontend/*": "ask"
173+
}
174+
}
175+
}
176+
```
177+
178+
---
179+
147180
### webfetch
148181

149182
Use the `permission.webfetch` key to control whether the LLM can fetch web pages.

packages/web/src/content/docs/tools.mdx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,23 @@ This tool applies patch files to your codebase. Useful for applying diffs and pa
230230

231231
---
232232

233+
### skill
234+
235+
Load a [skill](/docs/skills) (a `SKILL.md` file) and return its content in the conversation.
236+
237+
```json title="opencode.json" {4}
238+
{
239+
"$schema": "https://opencode.ai/config.json",
240+
"tools": {
241+
"skill": true
242+
}
243+
}
244+
```
245+
246+
You can control approval prompts for loading skills via [permissions](/docs/permissions) using `permission.skill`.
247+
248+
---
249+
233250
### todowrite
234251

235252
Manage todo lists during coding sessions.

0 commit comments

Comments
 (0)