Skip to content

Conversation

@Luodian
Copy link
Contributor

@Luodian Luodian commented Feb 9, 2026

Summary

Merges the separate skill tool into the existing slashcommand tool, eliminating duplicate skill list descriptions that waste ~2,400+ tokens per session.

Fixes #1666

Problem

The skill list was duplicated across multiple tool descriptions:

Location Content
skill tool description Full <available_skills> XML with every skill name + description
slashcommand tool description Full <available_skills> with every skill + command
Sisyphus system prompt Skill table with name + description for each skill

With ~80 installed skills at ~30 tokens each, this wastes ~4,800+ tokens on pure duplication.

Solution

  1. Removed skill tool registration - slashcommand already handles both skills and commands
  2. Enhanced slashcommand with MCP capability formatting (previously only in skill tool)
  3. Removed skill table from Sisyphus prompt - replaced with reference to slashcommand tool
  4. Updated all references from skill tool to slashcommand tool in prompts

Changes

  • src/index.ts - Removed skill tool creation and registration, pass MCP options to slashcommand
  • src/tools/index.ts - Removed createSkillTool export
  • src/tools/slashcommand/tools.ts - Added extractSkillBody(), formatMcpCapabilities(), MCP support in formatLoadedCommand()
  • src/tools/slashcommand/types.ts - Added mcpManager and getSessionID options
  • src/tools/skill-mcp/tools.ts - Updated hint to reference slashcommand tool
  • src/agents/sisyphus.ts - Updated tool references from skill to slashcommand
  • src/agents/sisyphus-prompt-builder.ts - Removed duplicate skill table, updated references

Token Savings

  • Skill list in tool descriptions: 1 copy instead of 2 (~2,400 tokens saved)
  • Skill table in Sisyphus prompt: removed (~2,400 tokens saved)
  • Total: ~4,800+ tokens saved per session for users with many skills

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

    • Removed the skill tool; prompts/agents now reference slashcommand for skills.
    • Slashcommand returns skill output when the name matches a skill: extracts the skill body, shows the base directory, lists MCP tools/resources/prompts; injects git-master config with defaults preserved.
    • Added and wired options: mcpManager, getSessionID, and gitMasterConfig; updated tool registry and types; updated skill_mcp hint.
  • Migration

    • Update any custom prompts or workflows that call the "skill" tool to use "slashcommand".

Written for commit 41b454c. Summary will update on new commits.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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加载

@Luodian Luodian force-pushed the fix/merge-skill-into-slashcommand branch from a59e18e to 41b454c Compare February 9, 2026 16:01
marlon-costa-dc pushed a commit to marlon-costa-dc/oh-my-opencode that referenced this pull request Feb 10, 2026
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.

[Bug]: Oversized System Prompt

1 participant