Describe the bug
The mcp-setup skill's Step 5 ("Detect Tool Environment") determines the active AI tool by scanning for .claude-plugin/, .opencode/, and .cursor-plugin/ directories. When none are found, it falls through to "Unknown" and defaults to writing .mcp.json in Claude Code format.
In consumer repos (repos that use complypack but are not the complypack repo itself), these directories typically don't exist at the time /comply-setup is first invoked. An OpenCode user in a fresh consumer repo gets Claude Code config format regardless of their actual tool.
#110 / PR #112 fixed the opencode.json format when OpenCode is detected, but the detection itself still relies on the .opencode/ directory already existing — which is a chicken-and-egg problem: the user is running /comply-setup precisely because they haven't set things up yet.
To Reproduce
- Clone a consumer repo that has no
.opencode/, .claude-plugin/, or .cursor-plugin/ directories
- Place the
mcp-setup skill in a location where OpenCode can load it (e.g., via lola's --append-context from .lola/modules/, or a global skillsdirectory)
- Run
/comply-setup in OpenCode
- Step 5 scans for tool directories — none found — falls through to "Unknown"
- Skill writes
.mcp.json in Claude Code format instead of opencode.json
Note: If the skill is installed via lola install ... -a opencode --scope project,lola creates .opencode/ first, which makes detection work as a side effect. But the skill's logic is still fragile for other installation paths.
Expected behavior
When no tool directories are found, the skill should ask the user which tool they are using instead of silently defaulting to Claude Code format:
No AI tool directories detected in this repository.
Which AI coding tool are you using?
- Claude Code
- OpenCode
- Cursor
Alternatively, the skill could detect the runtime environment through other signals (e.g., OpenCode sets specific environment variables or context that the skill could inspect).
Additional context
Describe the bug
The
mcp-setupskill's Step 5 ("Detect Tool Environment") determines the active AI tool by scanning for.claude-plugin/,.opencode/, and.cursor-plugin/directories. When none are found, it falls through to "Unknown" and defaults to writing.mcp.jsonin Claude Code format.In consumer repos (repos that use complypack but are not the complypack repo itself), these directories typically don't exist at the time
/comply-setupis first invoked. An OpenCode user in a fresh consumer repo gets Claude Code config format regardless of their actual tool.#110 / PR #112 fixed the
opencode.jsonformat when OpenCode is detected, but the detection itself still relies on the.opencode/directory already existing — which is a chicken-and-egg problem: the user is running/comply-setupprecisely because they haven't set things up yet.To Reproduce
.opencode/,.claude-plugin/, or.cursor-plugin/directoriesmcp-setupskill in a location where OpenCode can load it (e.g., via lola's--append-contextfrom.lola/modules/, or a global skillsdirectory)/comply-setupin OpenCode.mcp.jsonin Claude Code format instead ofopencode.jsonNote: If the skill is installed via
lola install ... -a opencode --scope project,lola creates.opencode/first, which makes detection work as a side effect. But the skill's logic is still fragile for other installation paths.Expected behavior
When no tool directories are found, the skill should ask the user which tool they are using instead of silently defaulting to Claude Code format:
Alternatively, the skill could detect the runtime environment through other signals (e.g., OpenCode sets specific environment variables or context that the skill could inspect).
Additional context
installcreates.opencode/before the user runs/comply-setup, making detection work as a side effect)