Repository navigation
Description
Describe the enhancement you want to request
Problem
Today, opencode's interface already surfaces important session state on screen: connected MCP servers, the agent's TODO list, LSP status. But skills — arguably one of the most important harness components — are invisible once a session starts. The only way to see them is the one-shot /skills picker (anomalyco#7846), and after that there's no persistent indication of which skills are attached to the session.
This causes two real problems:
- For the user: I can't tell at a glance which skills are active in the current session. If a skill isn't firing, I have no idea whether it's even loaded.
- For the model: In long sessions, the model loses track of available skills. Skills get mentioned in the system context early on, but as the conversation grows, the model "forgets" they exist and doesn't invoke the
skilltool even when the task clearly matches a skill's trigger description. It ends up reinventing workflows the skill already encodes.
Proposed solution
UI side (visible in TUI/web/desktop):
- Add an "Active skills" panel to the right sidebar / status area, alongside the existing MCP, TODO and LSP indicators, listing the skills attached to the current session (name + source, e.g. project
.opencode/skills/vs global~/.config/opencode/skills/vs plugin-provided). - Make each entry indicate its state: available vs invoked this session.
- Clicking/selecting an entry could show its description and trigger conditions.
Harness side (the more valuable half of this request):
- Actively re-assert loaded skills during the session so the model doesn't drift away from them. Options to consider:
- inject a compact "active skills" reminder into the context periodically or on compaction (skills are especially likely to be dropped during context compaction);
- or include a short skills availability line in tool-result/system context so late-session turns still see "you have these skills available and should use the
skilltool when a task matches".
This would be a genuine harness improvement, not just cosmetics: skills only help if the model actually remembers to use them.
Related (checked before filing)
- [FEATURE]: Add /skills command to list and quick-invoke skills anomalyco/opencode#7846 —
/skillscommand to list and quick-invoke skills (one-shot dialog; this request is about persistent visibility + model awareness). - [FEATURE]: Desktop Environment panel — skills, plugins, MCPs, loaded instructions + per-session context cost anomalyco/opencode#48252 — Desktop "Environment panel" (read-only inventory of skills/plugins/MCPs for Desktop; this request focuses on the in-session sidebar indicator like MCP/TODO/LSP and on the model not forgetting skills).
- [FEATURE]: display loaded skills in status page and sidebar anomalyco/opencode#7533 / feat: show skills in status and sidebar anomalyco/opencode#6154 — TUI skills in status/sidebar.
Happy to test early builds — I run a skill-heavy setup and hit the "model forgot the skill" problem regularly.
Activity
AlexKay28 commentedon Sep 10, 2026
Resolution plan (proposal)
Explored the codebase on my fork (
devbranch). Everything needed already has extension points — this is smaller than it looks.Codebase findings
packages/tui/src/feature-plugins/sidebar/*.tsxsidebar_contentslot with anorderclient.skills()(SDK)packages/tui/src/component/dialog-skill.tsxpackages/opencode/src/session/system.ts:107(SystemPrompt.skills)packages/opencode/src/session/compaction.ts:31PRUNE_PROTECTED_TOOLS = ["skill"]protects skill tool calls, but the availability list is not re-asserted after compactionPhase 1 — UI: "Skills" sidebar panel (TUI)
packages/tui/src/feature-plugins/sidebar/skills.tsx, modeled onsidebar/lsp.tsx:sidebar_contentslot (order ~ after MCP/LSP)props.api.client.skills(); collapsible section like LSP panel• name+ muted source hint (project/global/plugin) derived fromlocationskilltool calls, show✓on skills already invoked. Gives "available vs used" at a glance.Phase 2 — Harness: keep the model aware of skills
session/compaction.ts): extend the compaction summary prompt to explicitly retain the available-skills list in the summary output (the skill tool calls are already prune-protected; the list itself is what drifts).<skills_available>name: description…</skills_available>) to the first context rebuild, so the model re-anchors without a full verbose re-injection. Implementation candidate: a context source / part of compact output insession/.opencode.json(e.g.skills.sidebar: true,skills.reminder: "auto"|"off") + schema regeneration.Phase 3 — polish & verification
bun typecheckinpackages/opencodeandpackages/tui(nevertscdirectly, never from root).bun devinpackages/opencodeinside tmux (per repo AGENTS.md), screenshot the sidebar with a skill-heavy workspace.Out of scope (separate issues)
AlexKay28 commentedon Sep 10, 2026
Progress — both phases implemented on branch
session-skills-sidebarPhase 1 (UI, TUI sidebar) — verified live: panel renders between MCP and LSP, showing every discovered skill with its source tag (
built-in/project/global/external), and a ✓ marker once the model invokes it in the session.packages/plugin/src/tui.ts—TuiSidebarSkillItemtype +TuiState.skills()packages/tui/src/context/sync.tsx—skillsstore field, fetched at bootstrap via the existing/skillendpointpackages/tui/src/plugin/adapters.tsx—stateApi.skills()packages/tui/src/feature-plugins/sidebar/skills.tsx— new panel (slot order 250, collapsible, invoked-this-session tracking from message parts)packages/tui/src/feature-plugins/builtins.ts— registeredPhase 2 (harness: model doesn't forget skills) — compaction now re-asserts skills inside the conversation:
packages/opencode/src/session/compaction.ts— the compaction prompt gains a<session_skills>block instructing the summarizer to carry the available-skills list into the summary's Important Details (the summary is what persists post-compaction), and the auto-continue follow-up message appends an explicit "these skills are still available" line. Permission-filtered viaskill.available(agent).Verification:
bun typecheckgreen inpackages/plugin,packages/tui,packages/opencode(incl. fixture update for the new required state accessor). Live TUI run confirmed the panel with 23 skills from real discovery.