Describe the bug
When running apm install -g --target opencode, skills are silently deployed to ~/.opencode/skills/<skill>/ instead of the correct user-scope path ~/.config/opencode/skills/<skill>/. No error or warning is raised.
This is caused by two related issues in skill_integrator.py:
- Wrong root dir used —
_integrate_native_skill (line 717) uses target.root_dir (.opencode) directly instead of calling target.effective_root(user_scope=True) (.config/opencode). The user_scope flag is never propagated into the skill integrator.
auto_create guard missing — All other integrators (agent, command, instruction, prompt) skip deployment when target.auto_create=False and the target dir doesn't already exist. skill_integrator.py has no such guard, so it unconditionally creates ~/.opencode/skills/ from scratch via mkdir(parents=True).
To Reproduce
apm install -g --target opencode <some-skill-package>
- Observe
~/.opencode/skills/<skill>/ is created
~/.config/opencode/skills/ is never touched
Expected behavior
Skill installed to ~/.config/opencode/skills/<skill>/. If ~/.config/opencode/ doesn't exist and auto_create=False, skip with a warning (consistent with other integrators).
Relevant code
src/apm_cli/integration/skill_integrator.py:717 — target.root_dir should be target.effective_root(user_scope=<flag>)
src/apm_cli/integration/skill_integrator.py:728 — mkdir called unconditionally, no auto_create guard
src/apm_cli/integration/targets.py:99-107 — effective_root() exists and handles this correctly, just not called
- Compare with
agent_integrator.py:115, command_integrator.py:135 for the correct auto_create pattern
Environment
- OS: WSL (Linux)
- Python Version: 3.12.3
- APM Version: 0.8.9
Logs
No error output — failure is silent.
Describe the bug
When running
apm install -g --target opencode, skills are silently deployed to~/.opencode/skills/<skill>/instead of the correct user-scope path~/.config/opencode/skills/<skill>/. No error or warning is raised.This is caused by two related issues in
skill_integrator.py:_integrate_native_skill(line 717) usestarget.root_dir(.opencode) directly instead of callingtarget.effective_root(user_scope=True)(.config/opencode). Theuser_scopeflag is never propagated into the skill integrator.auto_createguard missing — All other integrators (agent, command, instruction, prompt) skip deployment whentarget.auto_create=Falseand the target dir doesn't already exist.skill_integrator.pyhas no such guard, so it unconditionally creates~/.opencode/skills/from scratch viamkdir(parents=True).To Reproduce
apm install -g --target opencode <some-skill-package>~/.opencode/skills/<skill>/is created~/.config/opencode/skills/is never touchedExpected behavior
Skill installed to
~/.config/opencode/skills/<skill>/. If~/.config/opencode/doesn't exist andauto_create=False, skip with a warning (consistent with other integrators).Relevant code
src/apm_cli/integration/skill_integrator.py:717—target.root_dirshould betarget.effective_root(user_scope=<flag>)src/apm_cli/integration/skill_integrator.py:728—mkdircalled unconditionally, noauto_createguardsrc/apm_cli/integration/targets.py:99-107—effective_root()exists and handles this correctly, just not calledagent_integrator.py:115,command_integrator.py:135for the correctauto_createpatternEnvironment
Logs
No error output — failure is silent.