Skip to content

feat(cli): support skill mentions in run - #50430

Closed
dbpolito wants to merge 1 commit into
anomalyco:devfrom
dbpolito:run-skills
Closed

dbpolito wants to merge 1 commit into
anomalyco:devfrom
dbpolito:run-skills

Conversation

@dbpolito

Copy link
Copy Markdown
Contributor

Issue for this PR

No linked issue; feature PR adding the existing interactive skill-mention behavior to run.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds opencode run "@skill-id instructions". Resolves mentions by exact skill ID and sends skill attachments through the existing prompt API. Preserves prompt text, supports multiple mentions, deduplicates attachments, and leaves unknown mentions as text.

Skill discovery now waits for plugin activation so the first request against a cold server sees registered skills. Includes CLI docs and tests.

How did you verify your code works?

  • bun run check
  • CLI: bun test test/run/noninteractive.test.ts — 15 pass
  • Server: bun test test/skill.test.ts — 1 pass, first-request discovery
  • Live bun dev run --standalone --model openai/gpt-5.6-luna --format json "@opencode-dev This is a CLI smoke test. From the attached skill, name the tool used for interactive TUI testing. Respond with the tool name only. Do not use tools or change files." — returned termctrl, exit 0, without tool calls. Used the installed V2 database for provider credentials; also verified attached skill content in an earlier sample-skill smoke test.

Screenshots / recordings

CLI-only; JSON output verified above.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@thdxr
thdxr changed the base branch from v2 to dev October 10, 2026 19:13
@StephanDollberg

Copy link
Copy Markdown

any progress here?

@github-actions

Copy link
Copy Markdown
Contributor

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:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

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.

@smartneighbor

Copy link
Copy Markdown

Please reopen. This PR was auto-closed by the stale-PR cleanup, not on its merits, and the feature is still missing in V2 (v2.1.0).

opencode run has no way to invoke a skill, which worked in V1. The V2 migration guide says supported V1 behavior outside plugins, server API and tui config should stay compatible, so this is a compatibility gap. Scripted and scheduled opencode run jobs depend on it.

opencode run "@skill-id instructions" with exact-ID resolution, multiple mentions and unknown mentions left as text looks like the right shape. +1 from me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants