refactor: merge skill tool into slashcommand to reduce system prompt size#1698
Open
Luodian wants to merge 2 commits intocode-yeongyu:devfrom
Open
refactor: merge skill tool into slashcommand to reduce system prompt size#1698Luodian wants to merge 2 commits intocode-yeongyu:devfrom
Luodian wants to merge 2 commits intocode-yeongyu:devfrom
Conversation
There was a problem hiding this comment.
No issues found across 7 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: Large refactor merging skill tool into slashcommand tool (118 lines added). Changes MCP integration, tool routing, and core agent prompts. Cannot be 100% sure of no regressions without testing skill加载
a59e18e to
41b454c
Compare
marlon-costa-dc
pushed a commit
to marlon-costa-dc/oh-my-opencode
that referenced
this pull request
Feb 10, 2026
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
Merges the separate
skilltool into the existingslashcommandtool, eliminating duplicate skill list descriptions that waste ~2,400+ tokens per session.Fixes #1666
Problem
The skill list was duplicated across multiple tool descriptions:
skilltool description<available_skills>XML with every skill name + descriptionslashcommandtool description<available_skills>with every skill + commandWith ~80 installed skills at ~30 tokens each, this wastes ~4,800+ tokens on pure duplication.
Solution
skilltool registration -slashcommandalready handles both skills and commandsslashcommandwith MCP capability formatting (previously only in skill tool)skilltool toslashcommandtool in promptsChanges
src/index.ts- Removed skill tool creation and registration, pass MCP options to slashcommandsrc/tools/index.ts- RemovedcreateSkillToolexportsrc/tools/slashcommand/tools.ts- AddedextractSkillBody(),formatMcpCapabilities(), MCP support informatLoadedCommand()src/tools/slashcommand/types.ts- AddedmcpManagerandgetSessionIDoptionssrc/tools/skill-mcp/tools.ts- Updated hint to referenceslashcommandtoolsrc/agents/sisyphus.ts- Updated tool references fromskilltoslashcommandsrc/agents/sisyphus-prompt-builder.ts- Removed duplicate skill table, updated referencesToken Savings
Summary by cubic
Merged the skill tool into slashcommand to eliminate duplicate skill lists and cut ~4.8k tokens per session. Slashcommand now shows skill details (incl. MCP capabilities) and preserves git-master config defaults.
Refactors
Migration
Written for commit 41b454c. Summary will update on new commits.