Skip to content
This repository was archived by the owner on Dec 23, 2025. It is now read-only.
This repository was archived by the owner on Dec 23, 2025. It is now read-only.

[Feature]: Optional Explicit Sub-Skill Registration to Mitigate Discovery Overhead #33

@taqtiqa-mark

Description

@taqtiqa-mark

Add config flag for explicit sub-skill registration, preserving controlled linking, as fallback:

  • if upstream changes course.
  • for users who prefer auto-linking.

Description:
Given the open upstream issue #10238 on nested skill structures, and the viable workaround of explicit Markdown links in skills.md for auto-registration (per comment), I propose an opt-in mechanism to avoid recursive scanning of all skills/ subfolders, which risks fatal performance overhead in large repos.

Proposed Change:

  • Introduce a config variable in opencode.json (or equivalent): "skill_discovery": "explicit" (default: "explicit" for backward compatability).
    • "auto": scan all skill subfolders recursively (current opencode-skills approach, still debated upstream (CC)).
    • "explicit": Consistent with current model driven behavior of upstream (CC) and a change from current opencode-skills nested skill registration —Only register sub-skills explicitly linked via yaml front matter in Markdown in parent skills.md files (e.g., currently done with instruction: "Read Async Event subskill for event handling"), in skills file with this there would be a tool skills_core_events_async_promise.
      # skills/core/SKILL.md
      skills:
        - events/
        - events/async
        - events/async/callback
        - events/async/promise
  • Update docs: Add section in README.md under "Skill Organization" with example of the current model driven approach (i.e. currently no skills_core_events_async_promise):
    In skills/core/skills.md:
    ## Sub-Skills
    - [Events](events/skills.md): For event system implementation.
      - [Async Events](../skills/core/events/async/skills.md) subskill for async-event handling
      - [Async Events (Callbacks)](../skills/core/events/async/callback/skills.md) subskill for async-event handling using callbacks
    - [UI](ui/skills.md): For rendering logic.
    
    Note: Model followed links on parent load; no scanning needed.

Rationale:

  • Supports controlled, low-overhead organization without depending on upstream changes.
  • Consistent with current nested mimicry (e.g., skills/core/events/) via explicit refs, avoiding full-tree reads.
  • Headroom: future fallback to auto-discovery still an option, ensuring minimal disruption.

Issues:

  • What to do about reserved words, resources, scripts, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions