graphify icon indicating copy to clipboard operation
graphify copied to clipboard

`--project` flag creates non-discoverable skill path for OpenCode platform

Open storybite opened this issue 6 months ago • 1 comments

Summary

When running graphify install --platform opencode --project, the SKILL.md is written to ./.config/opencode/skills/graphify/SKILL.md, which is not a path that OpenCode discovers for project-scoped skills. As a result, OpenCode silently ignores the installed skill.

The AGENTS.md, .opencode/plugins/graphify.js, and .opencode/opencode.json files are written correctly, so the always-on hook behavior still works — but the skill itself is invisible to OpenCode's skill discovery.

Environment

  • OS: Windows 11
  • Shell: PowerShell
  • graphify version: 0.8.20 (installed via uv tool install graphifyy)
  • Project path: D:\workspace\vibe-java\loan-eval

Reproduction

cd D:\workspace\vibe-java\loan-eval
graphify install --platform opencode --project

Actual output

skill installed  ->  .config\opencode\skills\graphify\SKILL.md
graphify section written to D:\workspace\vibe-java\loan-eval\AGENTS.md
.opencode\plugins\graphify.js  ->  tool.execute.before hook written
.opencode\opencode.json  ->  plugin registered
Opencode will now check the knowledge graph before answering
codebase questions and rebuild it after code changes.
Project-scoped install. Add to version control:
  git add .config/ AGENTS.md .opencode/

Notice the first line: .config\opencode\skills\graphify\SKILL.md — a .config/ directory is created inside the project root.

Expected output

skill installed  ->  .opencode\skills\graphify\SKILL.md

The SKILL.md should live under the project's .opencode/skills/ directory, alongside the plugin that's already being placed there correctly.

Why this is a bug

According to the OpenCode official documentation on Agent Skills, OpenCode searches exactly these six locations for skills:

  • Project config: .opencode/skills/<name>/SKILL.md
  • Global config: ~/.config/opencode/skills/<name>/SKILL.md
  • Project Claude-compatible: .claude/skills/<name>/SKILL.md
  • Global Claude-compatible: ~/.claude/skills/<name>/SKILL.md
  • Project agent-compatible: .agents/skills/<name>/SKILL.md
  • Global agent-compatible: ~/.agents/skills/<name>/SKILL.md

The path ./.config/opencode/skills/ is not in this list. This is also confirmed in OpenCode issue #14370, which explicitly lists the hardcoded project-scope skill paths as .opencode/skills/, .claude/skills/, and .agents/skills/ — nothing else.

It appears graphify's --project implementation may be doing a simple substitution of the global path (~/.config/opencode/skills/) by replacing ~/ with the current directory, producing ./.config/opencode/skills/. This works for some platforms (Claude → .claude/skills/, agent → .agents/skills/) because their global and project paths share the same top-level directory name, but it breaks for OpenCode specifically, since OpenCode uses different directory names between global (~/.config/opencode/) and project (./.opencode/).

Impact

  • Skill itself is invisible to OpenCode's skill discovery — /skills listing, skill autocomplete, and the native skill tool will not see graphify.
  • The always-on hook still works because AGENTS.md, .opencode/plugins/graphify.js, and .opencode/opencode.json are placed in standard OpenCode-recognized locations. So end users may not immediately notice the bug — graphify still functions via the plugin path, but the skill registration is effectively dead.
  • Output messages are misleading: the install command claims success and the git add .config/ hint suggests committing a directory that OpenCode never reads.

storybite avatar May 27 '26 09:05 storybite

Fixed in v8 (commit 80301a0) — graphify install --platform opencode --project now writes SKILL.md to .opencode/skills/graphify/SKILL.md (correct project-scope path according to OpenCode docs) and the git-add hint shows .opencode/ only. The fix mirrors the same special-case pattern used for the devin platform (global: ~/.config/opencode/, project: .opencode/). Thanks for the detailed bug report including the OpenCode issue reference!

safishamsi avatar May 27 '26 11:05 safishamsi