Skip to content

[FEATURE]: Agent-scoped skill loading — only load skills declared by the active agent #19344

Closed as not planned

Description

@jdiegosierra
  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

When an agent is active, all discovered skills are loaded into context, even those unrelated to the agent's purpose. There's no way for an agent to declare which skills it needs.

Problem

  • Context budget is finite. Loading irrelevant skill descriptions wastes tokens.
  • Auto-invocation noise: The model may consider skills irrelevant to the agent's domain.
  • Plugin authors building multi-domain plugins (SRE + backend + frontend) can't scope skills per agent.

OpenCode already supports per-agent tool permissions (allow/deny/ask with wildcards), which is great. But this doesn't extend to skill loading — all discovered skills are loaded into context regardless of which agent is active.

Proposed solution

Allow agents to declare which skills they need via a skills field in their frontmatter:

# .opencode/agents/sre.md
---
description: "SRE agent for incident response and infrastructure tasks"
skills: ["sre-runbook", "kubernetes", "incident-response"]
---

You are an SRE agent...
# .opencode/agents/backend-developer.md
---
description: "Backend development agent"
skills: ["api-scaffold", "db-migration", "code-review"]
---

You are a backend development agent...

Behavior:

  • Agent with skills: [...] → only loads descriptions for those skills
  • Agent without skills field → current behavior (loads all)
  • Skills not in the list are not loaded and cannot be invoked

Alternative — skill tags:

# Agent
---
skill-tags: ["sre", "infra"]
---

# Skill
---
name: sre-runbook
tags: ["sre"]
---

Use case

Multi-domain engineering plugins with agents and skills for different domains. When an SRE agent is active, backend scaffolding skills shouldn't consume context. Today all skills load regardless of the active agent.

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Mar 26, 2026
  2. github-actions commented on Mar 26, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of an existing issue. Please check:

    If that issue was closed incorrectly or you have additional context to add, please consider commenting on the original issue or letting a maintainer know rather than opening a new one.

  3. removed
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  4. walsha2 commented on Jun 15, 2026

    @walsha2

    I believe this was added in the following release:

    https://github.com/anomalyco/opencode/releases/tag/v1.16.0

    Added skill discovery and file-based agent loading.

  5. github-actions commented on Aug 15, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions