Skip to content

Comments

fix: support domain-grouped skills and global MCP config#623

Merged
benjaminshafii merged 2 commits intodifferent-ai:devfrom
nguyenngothuong:fix/skills-depth-and-global-mcp
Feb 20, 2026
Merged

fix: support domain-grouped skills and global MCP config#623
benjaminshafii merged 2 commits intodifferent-ai:devfrom
nguyenngothuong:fix/skills-depth-and-global-mcp

Conversation

@nguyenngothuong
Copy link
Contributor

Summary


Problem

1. Skills – domain subfolder layout not supported

The OpenCode CLI convention groups global skills by domain:
```
~/.config/opencode/skills/
├── automation/
│ └── my-skill/SKILL.md
└── web-development/
└── ui-expert/SKILL.md
```

Both gather_skills() (skills.rs) and listSkillsInDir() (skills.ts) only scanned one level deep, so any skill nested under a domain folder was invisible in OpenWork.

2. MCP – global config ignored

listMcp() (mcp.ts) read only the workspace-level opencode.json(c).
MCP servers defined in ~/.config/opencode/opencode.json were completely ignored, forcing users to duplicate their configuration in every workspace.


Changes

File Change
packages/desktop/src-tauri/src/commands/skills.rs gather_skills() – if a top-level dir has no SKILL.md, treat it as a domain folder and scan its children
packages/server/src/skills.ts listSkillsInDir() – same logic; extracted parseSkillEntry() helper to avoid duplication
packages/server/src/mcp.ts listMcp() – reads global config and merges it; project entries override global ones; source set to "config.global" / "config.project" accordingly

All changes are fully backwards-compatible – the existing flat skills/<name>/SKILL.md layout continues to work unchanged.


Testing

  • TypeScript: pnpm --filter openwork-server exec tsc --noEmit → exit 0
  • Rust: syntax verified manually (mirrors existing patterns in the same file)

Note: Docker + Chrome MCP end-to-end testing was not run (environment limitation).
Reviewer can verify by placing a skill at ~/.config/opencode/skills/<domain>/<name>/SKILL.md and opening the Skills panel, or by adding an MCP to ~/.config/opencode/opencode.json and checking the MCP panel.

Fixes different-ai#621 – Skills in domain subfolders (skills/<domain>/<name>/SKILL.md)
were silently skipped because gather_skills() (Rust) and listSkillsInDir()
(TypeScript) only scanned one level deep.  Both functions now treat a
top-level directory that has no SKILL.md as a domain/category folder and
scan its immediate children, keeping full backwards-compatibility with the
flat layout.

Fixes different-ai#622 – MCP servers defined in the global opencode config
(~/.config/opencode/opencode.json) were completely ignored by listMcp().
The function now reads global config as well, merging it with the
workspace-level config.  Project entries take priority over global ones;
each item carries the correct source field (config.global vs config.project).
@vercel
Copy link

vercel bot commented Feb 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openwork-software Ready Ready Preview, Comment Feb 20, 2026 6:24pm

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

@benjaminshafii benjaminshafii merged commit 83c35a4 into different-ai:dev Feb 20, 2026
3 checks passed
@benjaminshafii
Copy link
Member

Thank you for the thoughtful fix and fast turnaround. I reviewed and merged this with one small safety follow-up for nested local skill actions.\n\n- OpenWork bot

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: MCP servers from global config (~/.config/opencode/opencode.json) are ignored [Bug]: Global skills in domain subdirectories are not discovered

2 participants