[FEATURE]: Tool call descriptions as skills #4450

Open
opened 2026-02-16 17:43:49 -05:00 by yindo · 4 comments
Owner

Originally created by @imqqmi on GitHub (Jan 8, 2026).

Originally assigned to: @thdxr on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

In the endless quest to reduce the initial token cost I'd like to be able to move all the tool call descriptions to skills I can place globally or in my projects (instead of always placing them in the system prompt). That way I can also improve them and make them more explicit with examples for smaller models that struggle with tool calling. And LLMs with baked in/trained in tool calling might not even need the descriptions anyway, reducing token usage.

In many situations most of the tools aren't even used, so offloading them to skills (or maybe internal skills?) to load them on demand would be great.

Originally created by @imqqmi on GitHub (Jan 8, 2026). Originally assigned to: @thdxr on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request In the endless quest to reduce the initial token cost I'd like to be able to move all the tool call descriptions to skills I can place globally or in my projects (instead of always placing them in the system prompt). That way I can also improve them and make them more explicit with examples for smaller models that struggle with tool calling. And LLMs with baked in/trained in tool calling might not even need the descriptions anyway, reducing token usage. In many situations most of the tools aren't even used, so offloading them to skills (or maybe internal skills?) to load them on demand would be great.
yindo added the discussion label 2026-02-16 17:43:49 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 8, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #7269: Reduce token overhead: Task tool injects all subagent descriptions into system prompt
  • #7351: Add systemPrompt option to SDK like Claude Agent SDK
  • #7101: Allow custom prompts in global, project or custom directories
  • #3195: Dynamic system prompts for custom agents

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 8, 2026): This issue might be a duplicate of existing issues. Please check: - #7269: Reduce token overhead: Task tool injects all subagent descriptions into system prompt - #7351: Add systemPrompt option to SDK like Claude Agent SDK - #7101: Allow custom prompts in global, project or custom directories - #3195: Dynamic system prompts for custom agents Feel free to ignore if none of these address your specific case.
Author
Owner

@einarpersson commented on GitHub (Jan 10, 2026):

Yes! This is such a natural thing to do.

Anything tool related that can be put in a agent file should be able to be moved to a skill file. That would make skills actually useful. It is ironic that it is called "skill" but in the current state it is just "lookup information". Being able to move tool permissions there would actually make skills into.. skills!

@einarpersson commented on GitHub (Jan 10, 2026): Yes! This is such a natural thing to do. Anything tool related that can be put in a agent file should be able to be moved to a skill file. That would make skills actually useful. It is ironic that it is called "skill" but in the current state it is just "lookup information". Being able to move tool permissions there would actually make skills into.. skills!
Author
Owner

@imqqmi commented on GitHub (Jan 11, 2026):

It could be implemented like this:

  • When no tool call skills are defined by the user the system works as is so that existing configurations work as before
  • When tool call skills exists in either ~/.config/opencode/skills or project /.opencode/skills tool call descriptions won't be loaded in system prompt but just the short skill descriptions
  • Add an option to fully load the skill tool calls instructions into the system prompt so that models that struggle with skills work the same as before, but with the option to fine tune the tool calling and add new tool calls.
  • Option to export tool call descriptions as skills into project folder ie opencode --export-toolcalls . With "opencode --export-toolcalls ." it'll be exported to the project .opencode/skills. No path will export to the global opencode config, or use --global explicitly. Something like that.
  • Check if existing skills interfere with opencode tool call skills before exporting. A --force overwrites them for example. Could add a rename existing skill, but that could be confusing.
  • The models .json file could contain sensible defaults. ie if some models are known to struggle with skill tool calls, default would be to always load them fully into system prompt. LLMs that don't really need tool call instructions could default to no skill descriptions at all, if that will ever happen.
  • One could consider tool call instructions with different verbosity levels so that LLMs that struggle get the full clear description with examples and more capable models can do with more short, concise and succinct instructions without examples. Just like there are different agent prompts for Anthropic, Codex, Qwen with varying degrees of verbosity etc.

Thoughts?

@imqqmi commented on GitHub (Jan 11, 2026): It could be implemented like this: - When no tool call skills are defined by the user the system works as is so that existing configurations work as before - When tool call skills exists in either ~/.config/opencode/skills or project /.opencode/skills tool call descriptions won't be loaded in system prompt but just the short skill descriptions - Add an option to fully load the skill tool calls instructions into the system prompt so that models that struggle with skills work the same as before, but with the option to fine tune the tool calling and add new tool calls. - Option to export tool call descriptions as skills into project folder ie opencode --export-toolcalls <path>. With "opencode --export-toolcalls ." it'll be exported to the project .opencode/skills. No path will export to the global opencode config, or use --global explicitly. Something like that. - Check if existing skills interfere with opencode tool call skills before exporting. A --force overwrites them for example. Could add a rename existing skill, but that could be confusing. - The models .json file could contain sensible defaults. ie if some models are known to struggle with skill tool calls, default would be to always load them fully into system prompt. LLMs that don't really need tool call instructions could default to no skill descriptions at all, if that will ever happen. - One could consider tool call instructions with different verbosity levels so that LLMs that struggle get the full clear description with examples and more capable models can do with more short, concise and succinct instructions without examples. Just like there are different agent prompts for Anthropic, Codex, Qwen with varying degrees of verbosity etc. Thoughts?
Author
Owner

@einarpersson commented on GitHub (Jan 11, 2026):

Maybe it is because I am tired, but I don't follow

Why does it have to be so complicated?

  1. Make it possible to add tools (permission) to a SKILL.md frontmatter in the same way as you can in an agent definition file
  2. When a skill which contains tools are loaded then the tools / permissions in it are added to the current session

I really don't feel opencode need 10x more features , it is already getting hard to grasp. I just want the base features that are already implemented to be more universal, predictable, flexible.

@einarpersson commented on GitHub (Jan 11, 2026): Maybe it is because I am tired, but I don't follow **Why does it have to be so complicated?** 1. Make it possible to add tools (permission) to a `SKILL.md` frontmatter in the same way as you can in an agent definition file 2. When a skill which contains tools are loaded then the tools / permissions in it are added to the current session I really don't feel opencode need 10x more features , it is already getting hard to grasp. I just want the base features that are already implemented to be more universal, predictable, flexible.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4450