feat: support local command files and OpenCode skill roots - #1911
Merged
limityan merged 2 commits intoJul 31, 2026
Conversation
limityan
force-pushed
the
yanzhn/external-command-skill-compat
branch
from
July 30, 2026 18:46
f79a5a7 to
5233394
Compare
limityan
force-pushed
the
yanzhn/external-command-skill-compat
branch
from
July 30, 2026 23:42
5233394 to
2166d5c
Compare
limityan
marked this pull request as ready for review
July 31, 2026 00:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@filereferences in imported OpenCode and Claude Code Prompt Commands.skills.pathsand the currentskills: string[]configuration forms.Recommended design and competitor comparison
The design was checked against the local OpenCode source at
3f239b3834e7ef30a454af6830053d2e82af009f, plus the local Codex and Claude Code implementations.The recommended owner chain is:
ecosystem adapter -> ExternalSourceCoordinator/Product Assembly review -> existing Prompt Command or Skill Registry owner -> shared bounded filesystem servicesThis keeps protocol/config parsing in adapters, product policy in assembly, and loading/execution in existing owners. It does not introduce a generic extension runtime or a parallel Skill loader.
Behavior and safety boundaries
Prompt Command files
$ARGUMENTSexpansion before allocating the rendered prompt.OpenCode Skill roots
skills.pathsand current array-formskillsfrom additive OpenCode configuration documents.skills.urlsor HTTP(S) entries.SKILL.mdcandidates per root, 256 KiB perSKILL.md, and 64 KiB per optional policy file.The remaining same-user validate-to-open filesystem race is bounded by the read limits and documented in the design. Closing it completely would require platform-specific handle-relative filesystem APIs and is intentionally outside this compatibility PR.
Architecture impact
bitfun-core/external_sourcesremains the only composition owner that imports and constructs the adapter.LocalConfiguredSkillRootContribution; it does not import the adapter.Verification
node --test scripts/check-core-boundaries.test.mjspassed (16/16).node scripts/check-core-boundaries.mjspassed.pnpm run check:repo-hygienepassed.pnpm run fmt:rspassed.git diff --check gcwing/main...HEADpassed.cargo check --workspace --exclude bitfun-desktoppassed with pre-existing CLI warnings only.cargo check --workspacereached the desktop build script and stopped because the generatedsrc/mobile-web/distresource is absent in this worktree. No Rust compilation error was reported before that environment prerequisite.Independent adversarial review
The combined change received an isolated final review after implementation. Issues found around source precedence, overlapping roots, malformed arrays, output-size bypasses, adapter/Registry ownership, unbounded reads, policy-file traversal, and whole-root replacement were corrected. The final review found no remaining P0 or P1 issue.
Non-goals
Change size
28 files changed, 2,349 insertions and 252 deletions (2,601 lines of churn), within the requested 8k-line limit.