refactor: merge skill tool into slashcommand to reduce system prompt size #1698
+156
−12
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.