Skip to content

feat(skill): expand shell directives in skill content (#10892)#17540

Open
rylwin wants to merge 1 commit intoanomalyco:devfrom
rylwin:feat/skill-shell-directives
Open

feat(skill): expand shell directives in skill content (#10892)#17540
rylwin wants to merge 1 commit intoanomalyco:devfrom
rylwin:feat/skill-shell-directives

Conversation

@rylwin
Copy link

@rylwin rylwin commented Mar 15, 2026

Issue for this PR

Closes #10892

Type of change

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

What does this PR do?

Support the !`command` syntax in skills to inject dynamic content at load time, compatible with Claude Code's implementation.

I know there's another PR implementing the same feature, but I think it's stalled out due to feedback needing to be addressed (#10891).

How did you verify your code works?

To manaully QA, I ran opencode with the following prompt (which references a personal skill of mine that uses a shell directive to include a script's help in the skill markdown file):

Load the browser-cli skill. What subcommands are offered?
Do not do anything except load the skill to find the answer.

When I run opencode on dev, I get answers like:

The skill loaded but the content is minimal. Let me check the actual browser-cli script to see what subcommands it offers.

When I run opencode on this branch / PR, I get answers like:

The browser-cli skill offers the following subcommands:
Setup / Lifecycle:
- install - Install native messaging host manifest
- launch - Kill Chrome and relaunch with extension loaded (--headless for Xvfb)
- stop - Kill Chrome and Xvfb
Navigation:
- navigate <url> (aliases: open, goto) - Navigate to URL
- back / forward / reload - Browser history navigation
- url - Get current URL
- title - Get page title
...

Checklist

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

Happy to address any feedback. And thanks for opencode!

@github-actions
Copy link
Contributor

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

Potential Duplicate Found:

Why they're related:
This PR (#17540) explicitly mentions PR #10891 in its description as an existing PR implementing the same feature. According to the current PR, #10891 is stalled due to feedback needing to be addressed. Both PRs are implementing support for the !command`` syntax to inject dynamic content into skills at load time, which is compatible with Claude Code's implementation. They address the same feature request (#10892).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Add !\command\`` dynamic context syntax in skills

1 participant