Uh oh!
There was an error while loading. Please reload this page.
feat(config): discover commands from .agents/commands and .claude/commands - #30629
feat(config): discover commands from .agents/commands and .claude/commands#30629mugnimaestra wants to merge 1 commit into
Conversation
…mands Add external command discovery that mirrors the existing skill discovery paths. Commands are now loaded from: - ~/.agents/commands/ and ~/.claude/commands/ (global) - .agents/commands/ and .claude/commands/ (project, walking up) - Custom paths via config.commands.paths .opencode/command(s)/ entries take precedence over external commands. Also adds ConfigCommandsV1 schema with a paths field for custom command folder paths, paralleling ConfigSkillsV1. Closesanomalyco#27972Closesanomalyco#14240
The following comment was made by an LLM, it may be inaccurate: I found one related PR that should be checked: Related PR: This PR appears related to command discovery from the |
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
mysticfall
commented
Aug 3, 2026
Can we reopen this PR? This is the last missing piece needed to standardise a workflow over 40+ subprojects in my company. |
Issue for this PR
Closes#27972
Closes#14240
Type of change
What does this PR do?
Discovers slash commands from external directories (
.agents/commands/,.claude/commands/) in addition to the existing.opencode/command(s)/paths. Brings command discovery to parity with how skills are already discovered from multiple paths.Commands placed in
.agents/commands/or.claude/commands/are automatically discovered:Custom paths via
opencode.json:{ "commands": { "paths": ["my-team/commands"] } }Discovery precedence (lowest → highest): global
~/.agents/commands/and~/.claude/commands/, then project.agents/commands/and.claude/commands/(walking up), thencommands.pathscustom folders, then.opencode/command(s)/(existing, wins).How did you verify your code works?
bun typecheckfrompackages/opencode— no errors from changed filesbun test test/config/config.test.ts— 96/96 pass including 4 new tests:loads commands from .agents/commandsloads commands from .claude/commands.opencode/command overrides .agents/commandsloads commands from config.commands.pathsbun test test/skill/skill.test.ts— 16/16 pass, no regressionChecklist