Skip to content

[FEATURE]: OPENCODE_DISABLE_EXTERNAL_SKILLS should also skip registering the built-in customize-opencode skill #27526

@criterium

Description

@criterium

Feature hasn't been suggested before.

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

Describe the enhancement you want to request

The built-in skill "customize-opencode" is registered unconditionally in skill/index.ts lines 250-257:

s.skillsCUSTOMIZE_OPENCODE_SKILL_NAME = {
  name: CUSTOMIZE_OPENCODE_SKILL_NAME,
  description: CUSTOMIZE_OPENCODE_SKILL_DESCRIPTION,
  location: "<built-in>",
  content: CUSTOMIZE_OPENCODE_SKILL_BODY,
}

There is no config option or env var to skip this registration. The documented workaround (override via a disk SKILL.md with the same name) conflicts with OPENCODE_DISABLE_EXTERNAL_SKILLS=1, because that flag prevents external directories from being scanned — so the override file is never discovered.

PROPOSED FIX
Guard the built-in registration with the same flag that already controls external skill discovery. In skill/index.ts, around line 250:

if (!Flag.OPENCODE_DISABLE_EXTERNAL_SKILLS) {
  s.skillsCUSTOMIZE_OPENCODE_SKILL_NAME = { ... }
}

WORKAROUND (until the fix is merged)
Add this to your opencode.jsonc to hide the built-in skill from the
model via the permission system:

  "permission": {
    "skill": { "*": "allow", "customize-opencode": "deny" }
  }

Note: the order matters ("*" first, specific name last) because
evaluate() uses findLast. This prevents the skill from appearing in
available_skills and blocks loading it, though the skill is still
registered in memory.

RATIONALE

  • OPENCODE_DISABLE_EXTERNAL_SKILLS=1 already means "do not load skills automatically". The built-in skill is auto-loaded, so it should respect this flag.
  • One-line code change in a single file.
  • No new flags, no schema changes, no config surface area to maintain.
  • Backward compatible: users who don't set the env var see no change.

RELATED ISSUES
#12432, #15396, #23035 (all about external skills, not the built-in)

ADDITIONAL CONTEXT

  • opencode version: v1.14.50+
  • The built-in skill body is at packages/opencode/src/skill/prompt/customize-opencode.md (~377 lines)
  • I am running with OPENCODE_DISABLE_EXTERNAL_SKILLS=1 and the built-in still appears in the system prompt

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions