Skip to content

graphify opencode install does not copy skill file to ~/.config/opencode/skills/graphify/SKILL.md #2670

Description

@ColaHikari

Bug

graphify opencode install only writes the AGENTS.md section and the tool.execute.before plugin, but does not copy the skill file (skill-opencode.md) to ~/.config/opencode/skills/graphify/SKILL.md. As a result, the /graphify command is unavailable in OpenCode — the skill is never discovered.

Root cause

In install.py, graphify opencode install (without --project) calls _agents_install(Path("."), "opencode") (line 2265):

# line 2259-2265
elif cmd in ("aider", "codex", "opencode", "claw", "droid", "trae", "trae-cn", "hermes"):
    subcmd = sys.argv[2] if len(sys.argv) > 2 else ""
    if subcmd == "install":
        if "--project" in sys.argv[3:]:
            _project_install(cmd, Path("."))
        else:
            _agents_install(Path("."), cmd)  # <-- no _copy_skill_file

_agents_install (line 1470) only writes the AGENTS.md section + plugin, it never calls _copy_skill_file.

Compare with _amp_install (line 1518) and _agents_platform_install (line 1529), which both call _copy_skill_file before _agents_install:

def _amp_install(project_dir):
    _amp_legacy_cleanup()
    _copy_skill_file("amp")           # <-- copies skill
    _agents_install(project_dir, "amp")

def _agents_platform_install(project_dir):
    _copy_skill_file("agents")        # <-- copies skill
    _agents_install(project_dir, "agents")

The platform config at line 338 already defines the correct destination:

"opencode": {
    "skill_file": "skill-opencode.md",
    "skill_dst": Path(".config") / "opencode" / "skills" / "graphify" / "SKILL.md",
    ...
},

But no code path for graphify opencode install ever uses skill_dst to copy the file.

Environment

  • graphifyy 0.9.40 (installed via uv tool install graphifyy)
  • macOS (nix-darwin)
  • OpenCode

Install output (actual)

$ graphify opencode install
graphify section written to /Users/luda/.config/opencode/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.

No mention of skill file copy. ~/.config/opencode/skills/graphify/SKILL.md does not exist after install.

Expected output

Should also copy the skill file:

  skills/graphify/SKILL.md  ->  skill file written

Suggested fix

Either:

  1. Add a dedicated _opencode_install function (like _amp_install) that calls _copy_skill_file("opencode") before _agents_install, or
  2. Add _copy_skill_file(platform) inside _agents_install for platforms that have a skill_dst (opencode, codex, etc.)

Workaround

Manual copy after install:

mkdir -p ~/.config/opencode/skills/graphify/references
cp <graphify-package>/skill-opencode.md ~/.config/opencode/skills/graphify/SKILL.md
cp <graphify-package>/skills/opencode/references/*.md ~/.config/opencode/skills/graphify/references/

Activity

  1. xg-gh-25 commented on Aug 12, 2026

    @xg-gh-25

    The missing _copy_skill_file call is a perfect micro-example of incomplete cultivation: the platform config declares skill_dst, _copy_skill_file knows how to honor it, but the execution path (graphify opencode install) never calls the function — so the declaration and the runtime diverge, and the skill silently never lands.

    Your root-cause analysis is surgical. Three observations from our own install-path archaeology:

    1. Inconsistent install paths are a symptom of ad-hoc growth, not a defect of the individual functions. _amp_install and _agents_platform_install both call _copy_skill_file before _agents_install. The OpenCode path doesn't. That pattern suggests the OpenCode integration was added after the others, someone copied the _agents_install call without auditing what the full AMP/Agents sequence did, and the gap has been invisible because the plugin + AGENTS.md section are enough to look like a working install. The skill file is only needed when the user actually invokes /graphify in OpenCode — at which point the error ("skill not found") is context-free and doesn't point back to the install omission.

    2. The "two ways to fix it" fork you identified is actually a cultivation design choice. Option 1 (dedicated _opencode_install like _amp_install) is safer if OpenCode has or will have install-time behavior that's different from generic _agents_install (e.g., different config validation, different plugin structure). Option 2 (fold _copy_skill_file into _agents_install for platforms that declare skill_dst) is better if every agent platform should always copy the skill file and the current gap is just technical debt. The right answer depends on whether "install for an agent platform" is a single concept or a family of similar-but-distinct flows. From the outside, the fact that AMP and Agents both have their own wrappers suggests Option 1 is the current pattern — make _opencode_install explicit, keep the platform-specific branches at the top level where they're auditable.

    3. Your workaround is the actual cultivation contract that the code should enforce. The manual mkdir -p + cp sequence is what the installer should have done. That's the ground truth. The fact that it's a "workaround" means the installer is incomplete. From our side: when we ship an MCP server, the install script either creates every file the server needs to run, or it throws an error listing what's missing. If the user has to manually copy files after "install succeeded," the install didn't succeed — it just didn't fail loudly enough. Graphify should either ship with an install-time check that verifies the skill file landed, or make the _copy_skill_file call unconditional for any platform that declares skill_dst.

    Your suggested fix is correct. The deeper ask: the install output should probably confirm every file it writes (not just AGENTS.md and the plugin), so a missing skill-file copy is visible immediately instead of surfacing later as a skill-not-found error.


    Built with SwarmAI. Discussion: Cultivation > Config

  2. rohit-jsfreaky commented on Aug 12, 2026

    @rohit-jsfreaky
    Contributor

    I reproduced the user-scope gap in the installer path. I am going to add the missing OpenCode skill-copy step, keep the existing AGENTS.md/plugin setup intact, and add a regression test that verifies the installed SKILL.md and its references directory.

  3. cahya-wirawan commented on Sep 15, 2026

    @cahya-wirawan

    The same issue with codex, after "graphify opencode install" the skill is not copied so I can't use /graphify in codex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions