Skip to content

fix: opencode marimo-pair skill discovery#9225

Merged
mscolnick merged 1 commit intomainfrom
ms/fix-opencode-marimo-pair-skill-discovery
Apr 16, 2026
Merged

fix: opencode marimo-pair skill discovery#9225
mscolnick merged 1 commit intomainfrom
ms/fix-opencode-marimo-pair-skill-discovery

Conversation

@mscolnick
Copy link
Copy Markdown
Contributor

@mscolnick mscolnick commented Apr 16, 2026

Include more dirs in the discovery for open code skills, per their docs. https://opencode.ai/docs/skills/

@mscolnick mscolnick requested review from Copilot and manzt April 16, 2026 15:49
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 16, 2026

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

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Apr 16, 2026 3:50pm

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes marimo-pair skill discovery for the opencode agent by updating how candidate skill directories are computed and ensuring they’re evaluated using the current working directory at runtime.

Changes:

  • Add _opencode_skill_dirs() to search .opencode/skills plus Claude/agents-compatible layouts.
  • Replace the module-level AGENTS dict with pair_agents() so Path.cwd()/Path.home() are evaluated at call time.
  • Add a unit test asserting the expected opencode skill directory search order.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
marimo/_cli/pair/commands.py Adds opencode skill directory discovery and switches agent config construction to runtime via pair_agents().
tests/_cli/test_cli_pair.py Adds coverage for _opencode_skill_dirs() output ordering/paths.

Comment on lines +154 to +163
cwd = Path.cwd()
home = Path.home()
assert _opencode_skill_dirs() == [
cwd / ".opencode" / "skills",
home / ".config" / "opencode" / "skills",
cwd / ".claude" / "skills",
home / ".claude" / "skills",
cwd / ".agents" / "skills",
home / ".agents" / "skills",
]
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test hard-codes the global opencode directory as Path.home() / ".config" / "opencode" / "skills". If $XDG_CONFIG_HOME is set (or if the implementation is updated to respect XDG, consistent with marimo/_utils/xdg.py), this expectation will be wrong. Patch XDG_CONFIG_HOME in the test and/or build the expected path via xdg_config_home() to keep the test robust across environments.

Copilot uses AI. Check for mistakes.
Comment on lines +64 to +72
cwd = Path.cwd()
home = Path.home()
return [
cwd / ".opencode" / "skills",
home / ".config" / "opencode" / "skills",
cwd / ".claude" / "skills",
home / ".claude" / "skills",
cwd / ".agents" / "skills",
home / ".agents" / "skills",
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The global opencode search path is hard-coded to Path.home() / ".config" / "opencode" / "skills", which ignores $XDG_CONFIG_HOME. The repo already has XDG helpers (marimo/_utils/xdg.py) used for config locations; using xdg_config_home() / "opencode" / "skills" (and ideally home_path() to avoid Path.home() RuntimeError) would make skill discovery work in XDG-customized environments and keep the docstring accurate.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this makes sense.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I think it would be worth to support XDG_CONFIG_HOME, esp if we have helper for it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im just following the docs

Comment on lines +64 to +72
cwd = Path.cwd()
home = Path.home()
return [
cwd / ".opencode" / "skills",
home / ".config" / "opencode" / "skills",
cwd / ".claude" / "skills",
home / ".claude" / "skills",
cwd / ".agents" / "skills",
home / ".agents" / "skills",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this makes sense.

@mscolnick mscolnick merged commit 7115124 into main Apr 16, 2026
47 of 56 checks passed
@mscolnick mscolnick deleted the ms/fix-opencode-marimo-pair-skill-discovery branch April 16, 2026 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants