Skip to content

Conversation

@hannesrudolph
Copy link
Collaborator

@hannesrudolph hannesrudolph commented Jan 23, 2026

Summary

Replaces the fetch_instructions tool with a new skill tool and built-in skills system, following the same pattern used by built-in slash commands. This simplifies the codebase by consolidating the "just-in-time instruction delivery" mechanism into the existing skills system.

Changes

  • Add new skill native tool (src/core/tools/SkillTool.ts, src/core/prompts/tools/native-tools/skill.ts)
  • Add built-in skills (create-mcp-server, create-mode) in src/services/skills/built-in-skills.ts
  • Update SkillsManager to merge built-in skills with user skills (precedence: project > global > built-in)
  • Remove FetchInstructionsTool and related infrastructure:
    • src/core/tools/FetchInstructionsTool.ts
    • src/core/prompts/tools/native-tools/fetch_instructions.ts
    • src/core/prompts/instructions/ directory
  • Remove enableMcpServerCreation setting and UI checkbox (no longer needed since skills are always available)
  • Remove auto-approval logic for fetchInstructions
  • Update ChatRow.tsx to display skill loading with name, source badge, and description
  • Update tests to account for changes

How It Works Now

  1. The agent sees create-mcp-server and create-mode in the AVAILABLE SKILLS system prompt section
  2. When the task requires creating an MCP server or custom mode, the agent calls the skill tool with the skill name
  3. The SkillTool resolves the skill from built-in skills or user-defined skills (via SkillsManager)
  4. The skill instructions are returned to the agent to follow

Decisions Made

  1. Generic instructions for paths: Skills are static content, so dynamic path resolution (like getMcpServersPath()) was replaced with generic instructions
  2. Skills available in all modes: Granularity can be added later if needed
  3. Override precedence: Project skills > Global skills > Built-in skills
  4. New skill tool: Instead of removing tools entirely, the fetch_instructions tool was replaced with a more flexible skill tool that works with the unified skills system

@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Jan 23, 2026
@roomote
Copy link
Contributor

roomote bot commented Jan 23, 2026

Oroocle Clock   See task on Roo Cloud

Re-review: built-in skill loading and webview UI typing issues look resolved. Remaining item is CLI tool rendering support for the skill tool.

Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@hannesrudolph hannesrudolph force-pushed the refactor/replace-fetch-instructions-with-built-in-skills branch from d876abc to 99b424c Compare January 23, 2026 23:37

// Build approval message
const toolMessage = JSON.stringify({
tool: "skill",
Copy link
Contributor

Choose a reason for hiding this comment

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

SkillTool sends the approval payload as { "tool": "skill", ... }, but ClineSayTool in @roo-code/types does not include a "skill" variant and the webview ChatRow renderer has no case for it. In practice this can render as an unknown tool request (or fail type-safely elsewhere) when the UI tries to parse/display the approval.

Fix it with Roo Code or mention @roomote and request a fix.

@hannesrudolph hannesrudolph changed the title refactor: replace fetch_instructions tool with built-in skills refactor: replace fetch_instructions with skill tool and built-in skills Jan 24, 2026
| "imageGenerated"
| "runSlashCommand"
| "updateTodoList"
| "skill"
Copy link
Contributor

Choose a reason for hiding this comment

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

skill was added to packages/types/src/vscode-extension-host.ts:780, but the CLI tool renderer still lists fetchInstructions and does not recognize skill (see apps/cli/src/ui/components/tools/types.ts:18 and apps/cli/src/ui/components/tools/utils.ts:48). If the CLI is used, skill tool approvals/results can render as unknown/miscategorized.

Fix it with Roo Code or mention @roomote and request a fix.

- Add built-in skills (create-mcp-server, create-mode) following slash commands pattern
- Update SkillsManager to merge built-in skills with user skills
- Remove FetchInstructionsTool and related infrastructure
- Remove enableMcpServerCreation setting and UI checkbox
- Remove auto-approval logic for fetchInstructions
- Update system prompt sections to remove fetch_instructions references

Built-in skills are now available through the skills system with
override precedence: project > global > built-in
- Remove <location> from built-in skills in prompt (only show for file-based skills)
- Add 'skill' case to ChatRow.tsx for tool approval UI rendering
- Add 'skill' to ClineSayTool union type and interface
- Update i18n keys from 'instructions' to 'skill'
@hannesrudolph hannesrudolph force-pushed the refactor/replace-fetch-instructions-with-built-in-skills branch from b6f7fe0 to a0d5728 Compare January 24, 2026 00:56
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Jan 24, 2026
@hannesrudolph hannesrudolph force-pushed the refactor/replace-fetch-instructions-with-built-in-skills branch from d83a9c5 to 57f977f Compare January 24, 2026 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

2 participants