anomalyco / anomalyco/opencode

docs(skill): customize-opencode table omits project-level .claude/skills and .agents/skills auto-discovery

Open Beginner friendly
#41,850 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
Avg merge
7h 2m
Merged PRs (30d)
384

Description

Problem

The customize-opencode built-in skill's "Where files live" table states:

Scope Path
External skills (auto-loaded) ~/.claude/skills/<name>/SKILL.md, ~/.agents/skills/<name>/SKILL.md

This reads as if .claude/skills and .agents/skills are picked up only from the home directory. Agents following this guidance conclude that a project-level .agents/skills/ (or .claude/skills/) is not scanned unless it is registered manually via skills.paths in opencode.json — which is wrong.

What the code actually does

In the skill loader (discoverSkills), the external directories are scanned at both scopes:

const CLAUDE_EXTERNAL_DIR = ".claude"
const AGENTS_EXTERNAL_DIR = ".agents"
const EXTERNAL_SKILL_PATTERN = "skills/**/SKILL.md"

// 1) global: ~/.claude/skills/**/SKILL.md and ~/.agents/skills/**/SKILL.md
for (const dir of externalDirs) {
  const root = path.join(global.home, dir)
  // ...
  yield* scan(state, root, EXTERNAL_SKILL_PATTERN, { dot: true, scope: "global" })
}

// 2) project: walk up from cwd to the worktree root, scanning
//    <dir>/.claude/skills/**/SKILL.md and <dir>/.agents/skills/**/SKILL.md
const upDirs = yield* fsys.up({ targets: externalDirs, start: directory, stop: worktree })
for (const root of upDirs) {
  yield* scan(state, root, EXTERNAL_SKILL_PATTERN, { dot: true, scope: "project" })
}

FileSystem.up walks from the current directory up to the worktree root and collects every existing .claude / .agents directory along the way, so project-level .agents/skills/ and .claude/skills/ are auto-discovered with no config needed (verified on v1.18.15). Both scopes are gated by OPENCODE_DISABLE_EXTERNAL_SKILLS=1, and the .claude part additionally by OPENCODE_DISABLE_CLAUDE_CODE_SKILLS=1.

Why it matters

The vendor-neutral .agents/skills/ convention is shared across multiple agent tools (Claude Code, Codex, etc.). Users who want a single cross-tool skills folder per project currently get steered toward .opencode/skills/ + a manual skills.paths entry, duplicating configuration for no reason.

Suggested fix

Add a row to the table (and mention the disable flags apply to both scopes), e.g.:

Scope Path
Project external skills (auto-loaded) .claude/skills/<name>/SKILL.md, .agents/skills/<name>/SKILL.md (discovered by walking up from the cwd to the worktree root)

Optionally clarify in the "Skills" section that skills.paths is only needed for non-default locations, not for project-level .agents/skills / .claude/skills.

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.

Research direction

Start with the customize-opencode built-in skill and its “Where files live” table, then review the discoverSkills entry point described in the issue. Document project-level .claude/skills and .agents/skills auto-discovery, the applicable disable flags, and that skills.paths is for non-default locations. Done means the table and Skills section no longer imply these project paths require manual registration.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.