Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
441a925
feat: add /skills command to web app and configurable skill slash ent…
sharunkumar Mar 16, 2026
2c4f334
feat: add /skills command and inline skill autocomplete
sharunkumar Mar 16, 2026
ba95754
feat: add skills.inline config to control skill content injection on …
sharunkumar Mar 16, 2026
bf7bab1
fix: simplify non-inline skill slash command text
sharunkumar Mar 16, 2026
2b99e2b
Merge branch 'dev' into feat/skills-slash-command
sharunkumar Mar 16, 2026
196e2e4
Merge branch 'anomalyco:dev' into feat/skills-slash-command
sharunkumar Mar 16, 2026
7df0f4f
feat: centralize skill slash visibility and fix inline skill autocomp…
sharunkumar Mar 16, 2026
be2ace6
Merge remote-tracking branch 'upstream/dev' into feat/skills-slash-co…
sharunkumar Mar 19, 2026
b51d60f
Merge remote-tracking branch 'upstream/dev' into feat/skills-slash-co…
sharunkumar Mar 26, 2026
56caa9f
Merge remote-tracking branch 'upstream/dev' into feat/skills-slash-co…
sharunkumar Mar 31, 2026
ace49bb
Merge remote-tracking branch 'upstream/dev' into feat/skills-slash-co…
sharunkumar Apr 16, 2026
56b8aa6
Merge branch 'dev' into feat/skills-slash-command
sharunkumar Apr 16, 2026
bd5631f
docs: add fork patch spec
sharunkumar Apr 16, 2026
c7d807f
fix: add Config.Service to SessionPrompt layer
sharunkumar Apr 16, 2026
bca520b
ci: use GitHub-hosted runners instead of Blacksmith
sharunkumar Apr 16, 2026
8d526ff
docs: reference PATCH.md in AGENTS.md
sharunkumar Apr 16, 2026
48db844
docs: add CI runner change to PATCH.md
sharunkumar Apr 16, 2026
877dfe1
docs: require PATCH.md updates for fork changes
sharunkumar Apr 16, 2026
e9c732c
chore: trigger CI after disabling test workflow
sharunkumar Apr 16, 2026
17999a7
ci: add build workflow
sharunkumar Apr 16, 2026
9edd501
ci: add Node.js setup to build workflow
sharunkumar Apr 16, 2026
fdd87dc
ci: remove build workflow (upstream turbo config issue)
sharunkumar Apr 16, 2026
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
2 changes: 1 addition & 1 deletion .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
generate:
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:
matrix:
settings:
- name: linux
host: blacksmith-4vcpu-ubuntu-2404
host: ubuntu-latest
- name: windows
host: blacksmith-4vcpu-windows-2025
host: windows-latest
runs-on: ${{ matrix.settings.host }}
defaults:
run:
Expand Down Expand Up @@ -95,9 +95,9 @@ jobs:
matrix:
settings:
- name: linux
host: blacksmith-4vcpu-ubuntu-2404
host: ubuntu-latest
- name: windows
host: blacksmith-4vcpu-windows-2025
host: windows-latest
runs-on: ${{ matrix.settings.host }}
env:
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/.playwright-browsers
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
typecheck:
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- This is a fork; see `PATCH.md` for fork-specific changes.
- Update `PATCH.md` for every custom change made in this fork.
- To regenerate the JavaScript SDK, run `./packages/sdk/js/script/build.ts`.
- ALWAYS USE PARALLEL TOOLS WHEN APPLICABLE.
- The default branch in this repo is `dev`.
Expand Down
39 changes: 39 additions & 0 deletions PATCH.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Fork Additions

## Inline Skill Autocomplete

Type `/` mid-prompt (after whitespace) to trigger skill-only autocomplete. Skills can be inserted inline without replacing the entire prompt.

## Skill Configuration Options

```ts
skills: {
slash?: boolean // Show skills as slash commands (default: false)
inline?: boolean // Inline full skill content on invocation (default: true)
}
```

## `/skills` Command

Browse and select skills via dialog. Hidden when `skills.slash` is enabled.

## UI Changes

- `DialogSelectSkill` component for skill browser
- Skill category in command palette
- i18n keys for skill UI

## Disabled Workflows

Upstream workflows disabled for this fork:

- close-issues, containers, deploy, docs-locale-sync
- nix-eval, nix-hashes, pr-management, pr-standards
- publish, release-github-action, storybook
- vouch-check-pr, vouch-manage-by-issue

Kept: test, typecheck, generate

## CI Runners

Changed from Blacksmith to GitHub-hosted runners (`ubuntu-latest`, `windows-latest`).
53 changes: 53 additions & 0 deletions packages/app/src/components/dialog-select-skill.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { Component, createMemo, createResource, Show } from "solid-js"
import { useSDK } from "@/context/sdk"
import { useDialog } from "@opencode-ai/ui/context/dialog"
import { Dialog } from "@opencode-ai/ui/dialog"
import { List } from "@opencode-ai/ui/list"
import { Tag } from "@opencode-ai/ui/tag"
import { useLanguage } from "@/context/language"

export const DialogSelectSkill: Component<{ onSelect: (skill: string) => void }> = (props) => {
const sdk = useSDK()
const dialog = useDialog()
const language = useLanguage()

const [skills] = createResource(async () => {
const result = await sdk.client.app.skills()
return result.data ?? []
})

const items = createMemo(() =>
(skills() ?? [])
.map((s) => ({ name: s.name, description: s.description }))
.sort((a, b) => a.name.localeCompare(b.name)),
)

return (
<Dialog title={language.t("dialog.skill.title")}>
<List
search={{ placeholder: language.t("common.search.placeholder"), autofocus: true }}
emptyMessage={language.t("dialog.skill.empty")}
key={(x) => x?.name ?? ""}
items={items}
filterKeys={["name", "description"]}
sortBy={(a, b) => a.name.localeCompare(b.name)}
onSelect={(x) => {
if (!x) return
props.onSelect(x.name)
dialog.close()
}}
>
{(i) => (
<div class="w-full flex items-center gap-x-3">
<div class="flex flex-col gap-0.5 min-w-0">
<span class="truncate">{i.name}</span>
<Show when={i.description}>
<span class="text-11-regular text-text-weaker truncate">{i.description}</span>
</Show>
</div>
</div>
)}
</List>
</Dialog>
)
}
55 changes: 53 additions & 2 deletions packages/app/src/components/prompt-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ export const PromptInput: Component<PromptInputProps> = (props) => {

const [store, setStore] = createStore<{
popover: "at" | "slash" | null
inline: boolean
slashStart: number
historyIndex: number
savedPrompt: PromptHistoryEntry | null
placeholder: number
Expand All @@ -259,6 +261,8 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
applyingHistory: boolean
}>({
popover: null,
inline: false,
slashStart: 0,
historyIndex: -1,
savedPrompt: null as PromptHistoryEntry | null,
placeholder: Math.floor(Math.random() * EXAMPLES.length),
Expand Down Expand Up @@ -634,24 +638,48 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
description: cmd.description,
type: "custom" as const,
source: cmd.source,
slash: cmd.slash,
}))

return [...custom, ...builtin]
})

const handleSlashSelect = (cmd: SlashCommand | undefined) => {
if (!cmd) return
const inline = store.inline
const start = store.slashStart
closePopover()
const images = imageAttachments()

if (cmd.type === "custom") {
if (inline) {
// Replace just the /partial text with /{trigger}
const selection = window.getSelection()
if (selection && selection.rangeCount > 0) {
const range = selection.getRangeAt(0)
if (editorRef.contains(range.startContainer)) {
const cursorPosition = getCursorPosition(editorRef)
setRangeEdge(editorRef, range, "start", start)
setRangeEdge(editorRef, range, "end", cursorPosition)
range.deleteContents()
const text = `/${cmd.trigger} `
range.insertNode(document.createTextNode(text))
range.collapse(false)
selection.removeAllRanges()
selection.addRange(range)
}
}
handleInput()
return
}
const text = `/${cmd.trigger} `
setEditorText(text)
prompt.set([{ type: "text", content: text, start: 0, end: text.length }, ...images], text.length)
focusEditorEnd()
return
}

if (inline) return
clearEditor()
prompt.set([...DEFAULT_PROMPT, ...images], 0)
command.trigger(cmd.id, "slash")
Expand Down Expand Up @@ -886,11 +914,23 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
if (atMatch) {
atOnInput(atMatch[1])
setStore("popover", "at")
setStore("inline", false)
} else if (slashMatch) {
slashOnInput(slashMatch[1])
setStore("popover", "slash")
setStore("inline", false)
} else {
closePopover()
// Check for inline / after whitespace — triggers skill-only autocomplete
const textBefore = rawText.substring(0, cursorPosition)
const inlineMatch = textBefore.match(/(?:^|\s)\/(\S*)$/)
if (inlineMatch) {
slashOnInput(inlineMatch[1])
setStore("popover", "slash")
setStore("inline", true)
setStore("slashStart", cursorPosition - inlineMatch[1].length - 1)
} else {
closePopover()
}
}
} else {
closePopover()
Expand Down Expand Up @@ -1270,7 +1310,18 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
atKey={atKey}
setAtActive={setAtActive}
onAtSelect={handleAtSelect}
slashFlat={slashFlat()}
slashFlat={
store.inline
? slashFlat().filter((cmd) => {
if (cmd.source !== "skill") return false
const text = prompt
.current()
.map((p) => ("content" in p ? p.content : ""))
.join("")
return !text.includes(`/${cmd.trigger} `)
})
: slashFlat().filter((cmd) => cmd.slash !== false)
}
slashActive={slashActive() ?? undefined}
setSlashActive={setSlashActive}
onSlashSelect={handleSlashSelect}
Expand Down
1 change: 1 addition & 0 deletions packages/app/src/components/prompt-input/slash-popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export interface SlashCommand {
keybind?: string
type: "builtin" | "custom"
source?: "command" | "mcp" | "skill"
slash?: boolean
}

type PromptPopoverProps = {
Expand Down
6 changes: 6 additions & 0 deletions packages/app/src/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const dict = {
"command.category.agent": "Agent",
"command.category.permissions": "Permissions",
"command.category.workspace": "Workspace",
"command.category.skill": "Skill",
"command.category.settings": "Settings",

"theme.scheme.system": "System",
Expand Down Expand Up @@ -65,6 +66,8 @@ export const dict = {
"command.model.choose.description": "Select a different model",
"command.mcp.toggle": "Toggle MCPs",
"command.mcp.toggle.description": "Toggle MCPs",
"command.skill.choose": "Browse skills",
"command.skill.choose.description": "Select a skill to invoke",
"command.agent.cycle": "Cycle agent",
"command.agent.cycle.description": "Switch to the next agent",
"command.agent.cycle.reverse": "Cycle agent backwards",
Expand Down Expand Up @@ -298,6 +301,9 @@ export const dict = {
"dialog.mcp.description": "{{enabled}} of {{total}} enabled",
"dialog.mcp.empty": "No MCPs configured",

"dialog.skill.title": "Skills",
"dialog.skill.empty": "No skills available",

"dialog.lsp.empty": "LSPs auto-detected from file types",
"dialog.plugins.empty": "Plugins configured in opencode.json",

Expand Down
22 changes: 22 additions & 0 deletions packages/app/src/pages/session/use-session-commands.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { usePrompt } from "@/context/prompt"
import { useSDK } from "@/context/sdk"
import { useSync } from "@/context/sync"
import { useTerminal } from "@/context/terminal"
import { DialogSelectMcp } from "@/components/dialog-select-mcp"
import { DialogSelectSkill } from "@/components/dialog-select-skill"
import { showToast } from "@opencode-ai/ui/toast"
import { findLast } from "@opencode-ai/shared/util/array"
import { createSessionTabs } from "@/pages/session/helpers"
Expand Down Expand Up @@ -116,6 +118,7 @@ export const useSessionCommands = (actions: SessionCommandContext) => {
const terminalCommand = withCategory(language.t("command.category.terminal"))
const modelCommand = withCategory(language.t("command.category.model"))
const mcpCommand = withCategory(language.t("command.category.mcp"))
const skillCommand = withCategory(language.t("command.category.skill"))
const agentCommand = withCategory(language.t("command.category.agent"))
const permissionsCommand = withCategory(language.t("command.category.permissions"))

Expand Down Expand Up @@ -529,6 +532,24 @@ export const useSessionCommands = (actions: SessionCommandContext) => {
}),
]

const skillCmds = () => [
skillCommand({
id: "skill.choose",
title: language.t("command.skill.choose"),
description: language.t("command.skill.choose.description"),
slash: "skills",
disabled: !!sync.data.config.skills?.slash,
onSelect: () =>
dialog.show(() => (
<DialogSelectSkill
onSelect={(skill) => {
prompt.set([{ type: "text" as const, content: `/${skill} `, start: 0, end: skill.length + 2 }])
}}
/>
)),
}),
]

const agentCmds = () => [
agentCommand({
id: "agent.cycle",
Expand Down Expand Up @@ -569,6 +590,7 @@ export const useSessionCommands = (actions: SessionCommandContext) => {
...messageCmds(),
...modelCmds(),
...mcpCmds(),
...skillCmds(),
...agentCmds(),
...permissionsCmds(),
])
Expand Down
Loading
Loading