- Make directory required in SkillLoadOptions, getAllSkills, and async
skill template resolvers to prevent unsafe process.cwd() fallback
- Remove dead skill export and process.cwd() fallback in skill tool
- Replace kimi-for-coding/k2p5 with kimi-for-coding/kimi-k2.5 in
council-members-generator
Skill discovery in the task tool failed to find project-level skills in
OpenCode Desktop because:
1. resolveSkillContent() never passed directory to the skill resolution
functions, causing them to fall back to process.cwd() which differs
from the project directory in Desktop mode.
2. getAllSkills() cache key only included browserProvider, not directory.
A first call with the wrong directory would cache stale results that
all subsequent calls (even with correct directory) would return.
3. The error message used discoverSkills() (discovered only) instead of
getAllSkills() (discovered + builtins), hiding builtin skills from
the Available list.
Changes:
- skill-resolver.ts: accept and pass directory; use getAllSkills for error msg
- tools.ts: pass options.directory to resolveSkillContent
- skill-discovery.ts: include directory in cache key; rename cache variable
- skill/types.ts + tools.ts: add directory to SkillLoadOptions for consistency
Project-level skills (.opencode/skills/ and .claude/skills/) were not
discovered in desktop app environments because the discover functions
hardcoded process.cwd() to resolve project paths. In desktop apps,
process.cwd() points to the app installation directory rather than the
user's project directory.
Add optional directory parameter to all project-level skill discovery
functions and thread ctx.directory from the plugin context through the
entire skill loading pipeline. Falls back to process.cwd() when
directory is not provided, preserving CLI compatibility.