anomalyco / anomalyco/opencode

Global skills in ~/.config/opencode/skills/ and project .opencode/skills/ not discovered in Desktop 1.18.27 (only external ~/.agents skills load)

Open
#47,054 3 comments 0 reactions 1 assignee View on GitHub

@jlongster is already working on this.

Since Sep 3, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

In OpenCode Desktop 1.18.27 (latest release, 2026-09-02) on Linux, custom skills placed in ~/.config/opencode/skills/<name>/SKILL.md (global) or .opencode/skills/<name>/SKILL.md (project) are not discovered. Only external skills from ~/.agents/skills/**/SKILL.md and the built-in customize-opencode are available to the model.

Verified facts:

  • SKILL.md files are valid: frontmatter has name + description, name matches directory name, filename is all-caps, unique names.
  • Desktop was fully restarted after creating the skills.
  • Calling the skill tool returns: Skill "<name>" not found. Available skills: capacity, customize, customize-opencode, deploy-model, microsoft-foundry, preset (exactly the ~/.agents external skills + built-in).
  • Server log on Desktop startup shows init count=6, while CLI opencode run (v1.18.23) on the same machine logs init count=12 (all skills including c-standards, python-standards, design-docs, doc-style, review-checklist, test-approach).

Related to #46781 and #45961 / #46298.

Analysis

In packages/opencode/src/skill/index.ts, discoverSkills() does:

  1. External scans (~/.agents, ~/.claude) pass a scope option to scan() — glob failures are logged and skipped gracefully.
  2. Config-dir scans (config.directories() — global ~/.config/opencode, project .opencode dirs) call scan(state, dir, "{skill,skills}/**/SKILL.md") without scope. Any glob failure calls Effect.die(error), which kills the entire discovery pass. The external skills that were already added survive; config skills are silently lost.

PR #46298 ("don't crash skill discovery on unscoped scan errors") fixes exactly this path but was closed without being merged into dev (the last commit touching skill/index.ts in dev is 2026-06-30). The bug is still present in the v1.18.27 tag: if (!opts?.scope) return Effect.die(error).

The exact glob error is not visible in logs (nothing is logged before the crash), but the code path matches the symptom 1:1: external skills load first and survive, config skills never appear.

Steps to reproduce
  1. Create ~/.config/opencode/skills/demo/SKILL.md with valid frontmatter (name/description).
  2. Start Desktop 1.18.27.
  3. Ask the model to load skill demo — returns Skill "demo" not found.
Workaround

Adding explicit paths to config bypasses the config-dir scan branch:

"skills": { "paths": ["~/.config/opencode/skills"] }

(requires Desktop restart; applied and pending verification).

Environment
  • OpenCode Desktop 1.18.27 (latest, 2026-09-02)
  • Linux (Debian trixie), x86_64
  • CLI opencode 1.18.23 works correctly on the same machine

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.