Skip to content

Skill invocation (/graphify .) fails with Expand-Archive module-load error on Windows, even though the module is installed #1742

Description

@Afrodoc555

Summary

Invoking the graphify skill in opencode (/graphify .) fails immediately with a PowerShell Expand-Archive module-load error, even though the underlying graphify MCP server (graphify-mcp.exe, registered separately as an MCP tool) works fine. The skill entry point itself is broken; the MCP tool path is not.

Environment

  • OS: Windows 11 Pro
  • graphify package: graphifyy v0.9.11 (installed via uv tool install)
  • Installed skill reports version 0.8.50 (.graphify_version in the opencode skill dir) — i.e. the shipped skill template is behind the installed package (graphify --help and other CLI invocations print: warning: skill is from graphify 0.8.50, package is 0.9.11. Run 'graphify install' to update.)
  • Skill installed via: graphify install --platform opencode
  • Client: opencode (opencode-ai v1.17.15)
  • Both Microsoft.PowerShell.Archive module versions are present on this machine (not missing):
    Name                         Version Path
    ----                         ------- ----
    Microsoft.PowerShell.Archive 1.2.5   .../PowerShell 7.6.3/Modules/Microsoft.PowerShell.Archive/...
    Microsoft.PowerShell.Archive 1.0.1.0 C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Archive\...
    

Reproduction

  1. graphify install --platform opencode (completes successfully, installs SKILL.md, references, and the opencode plugin hook)
  2. In an opencode session, run: /graphify . (or otherwise trigger the graphify skill, e.g. via opencode run "Using the graphify tool, explain what stationd does in homelab-station.")

Observed error

✗ Skill "graphify" failed
Error: Expand-Archive : The 'Expand-Archive' command was found in the module 'Microsoft.PowerShell.Archive', but the module
could not be loaded. For more information, run 'Import-Module Microsoft.PowerShell.Archive'.
At line:1 char:50
+ ... lobal:ProgressPreference = 'SilentlyContinue'; Expand-Archive -Litera ...
+                                                    ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Expand-Archive:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

Expected

The skill either invokes successfully, or fails with a clearer diagnostic. Given the module is present (in two separate PowerShell installations on this machine) yet "could not be loaded," this looks like it could be a PowerShell-version mismatch in how the skill's bootstrap/update step shells out (e.g. invoking powershell.exe vs pwsh.exe, or a PSModulePath that isn't inherited correctly by the subprocess opencode/Node spawns), rather than a genuinely missing dependency.

Workaround / impact

The separately-registered graphify MCP server (graphify-mcp.exe --transport stdio, run directly as an MCP tool rather than via the skill entry point) is unaffected and works correctly — so graphify_query_graph calls succeed even while /graphify . fails. This bug only affects the skill invocation path, not the MCP tool path.

Disclosure

Found and reproduced while setting up graphify + opencode against a local LLM via Claude Code (Sonnet 5); filed by a human after review of the agent's findings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions