Skip to content

Conversation

@hannesrudolph
Copy link
Collaborator

@hannesrudolph hannesrudolph commented Jan 23, 2026

Closes #11062

Summary

image image

This PR replaces the fetch_instructions tool with a new unified skill tool system, making it easier for Roo to load specialized instructions for common tasks.

What Changed

New Skill Tool

  • Roo now uses a skill tool to load instructions for tasks like creating MCP servers or custom modes
  • Skills can be built-in (shipped with the extension), global (user-defined), or project-specific
  • Skills are automatically approved, removing the need for manual confirmation when loading instructions

Built-in Skills

Two built-in skills are now included:

  • create-mcp-server: Instructions for creating MCP servers that expose tools and resources
  • create-mode: Instructions for creating custom modes in Roo Code

Removed Settings

  • The "Enable MCP Server Creation" checkbox has been removed from MCP settings
  • MCP server creation instructions are now always available via the built-in skill when needed

New Diff Toggle Setting

  • Added a diffEnabled setting to control whether diff-based editing tools are available

How This Affects You

For most users: No action required. Roo will automatically use the new skill system when you ask it to create MCP servers or custom modes.

For users with custom skills: Your existing project and global skills continue to work and take priority over built-in skills.

For users who disabled MCP server creation: The toggle has been removed. If you don't want Roo to create MCP servers, simply don't ask it to—the instructions are only loaded on demand.

Why This Change

  • Consistency: Skills now work the same way whether they're built-in, global, or project-specific
  • Extensibility: The skill system is more flexible and easier to extend with new capabilities
  • Simplicity: Fewer settings to manage—instructions are loaded when needed rather than requiring upfront configuration

Follow-up Work

⚠️ A follow-up PR is needed to update the mode creation and MCP server creation instructions in the built-in skills to reflect current best practices and documentation.

@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   Follow along on Roo Cloud

Re-review: 1 new issue found.

  • skill tool schema: args is documented optional but is required (see bd37b049a0)
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
@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
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. size:XL This PR changes 500-999 lines, ignoring generated files. labels Jan 28, 2026
- 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'
…L.md files

- Add generate-built-in-skills.ts script to parse SKILL.md files and generate TypeScript
- Add prebundle npm script to auto-generate before builds
- Create built-in/create-mode/SKILL.md for mode creation instructions
- Create built-in/mcp-builder/ with comprehensive MCP server development guide
- Add project-level .roo/skills/mcp-builder/ skill
- Add tests for the generation script
- Update built-in-skills.ts to be auto-generated (DO NOT EDIT DIRECTLY)

The source of truth is now the SKILL.md files. Run 'pnpm generate:skills' to regenerate.
The generator now runs prettier on the output file after generation.
This ensures the generated file is already formatted and won't change
when the pre-commit hook runs prettier via lint-staged.
- Rename built-in skill from 'mcp-builder' to 'create-mcp-server'
- Replace enhanced skill content with original fetch_instructions content
- Convert dynamic paths to static/generic instructions
- Remove mcp-builder reference docs, scripts, and LICENSE
- Update test to expect create-mcp-server instead of mcp-builder

The enhanced mcp-builder skill will be added in a separate PR.
Skills are informational content that don't perform any actions,
so they should be auto-approved like updateTodoList.
Skills execute silently without requiring user confirmation, similar
to how the old fetch_instructions worked. Removed:
- askApproval call from SkillTool
- handlePartial method (no streaming UI)
- ChatRow UI case for skill
- User rejection and partial block tests

Skills are read-only informational content that don't perform actions,
so they don't need approval.
…proval comment

- Replace fetchInstructions/fetch_instructions with skill in CLI types.ts
- Update CLI utils.ts display names for skill tool
- Add explanatory comment for skill auto-approval policy
@hannesrudolph hannesrudolph force-pushed the refactor/replace-fetch-instructions-with-built-in-skills branch from 8c2fe4d to 3d07128 Compare January 29, 2026 00:00
* Whether diff-based editing tools are enabled.
* When disabled, the extension should avoid providing diff strategies / diff-based tooling.
*/
diffEnabled: z.boolean().optional(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

I thought we got rid of diffEnabled?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@roomote get rid of any references to diffEnabled in this PR, we got rid of it

Copy link
Contributor

@roomote roomote bot Jan 29, 2026

Choose a reason for hiding this comment

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

Roo Code PR Fixer

Fixed: Removed all diffEnabled references from this PR.

Changes Made:

Type definitions:

  • packages/types/src/global-settings.ts: Removed diffEnabled from Zod schema
  • packages/types/src/vscode-extension-host.ts: Removed diffEnabled from ExtensionState Pick type

Implementation files:

  • src/core/prompts/system.ts: Removed diffEnabled parameter from SYSTEM_PROMPT function signature
  • src/core/webview/ClineProvider.ts: Removed diffEnabled from destructuring, getState(), and getStateToPostToWebview()
  • src/core/webview/generateSystemPrompt.ts: Removed diffEnabled argument from SYSTEM_PROMPT call
  • src/core/task/Task.ts: Removed diffEnabled argument from getSystemPrompt() call

Test files:

  • src/core/webview/__tests__/ClineProvider.spec.ts: Removed diffEnabled from mock state, removed property expectation, removed 3 test cases for diff enabled/disabled
  • src/core/prompts/__tests__/system-prompt.spec.ts: Removed diffEnabled parameter from all SYSTEM_PROMPT calls, removed 3 test cases specifically testing diffEnabled behavior
  • src/core/prompts/__tests__/add-custom-instructions.spec.ts: Removed diffEnabled parameter from all SYSTEM_PROMPT calls

Verification:

  • TypeScript type check: Passed
  • All tests pass: 117 tests passed (6 skipped - pre-existing)
  • ESLint: No warnings or errors

Commit: f997890

- Remove diffEnabled from global-settings.ts Zod schema
- Remove diffEnabled from ExtensionState Pick type in vscode-extension-host.ts
- Remove diffEnabled parameter from SYSTEM_PROMPT function signature in system.ts
- Remove diffEnabled from ClineProvider.ts (destructuring, getState, getStateToPostToWebview)
- Remove diffEnabled from generateSystemPrompt.ts
- Remove diffEnabled from Task.ts getSystemPrompt call
- Remove diffEnabled from test files (ClineProvider.spec.ts, system-prompt.spec.ts, add-custom-instructions.spec.ts)
- Remove test cases specifically testing diffEnabled behavior
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels Jan 29, 2026
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 29, 2026
@mrubens
Copy link
Collaborator

mrubens commented Jan 29, 2026

@roomote please resolve the merge conflicts with origin/main

@roomote
Copy link
Contributor

roomote bot commented Jan 29, 2026

Fixaroo Clock   See task on Roo Cloud

Resolved merge conflicts with origin/main. All local checks passed.

View commit | Revert commit

@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 29, 2026
@github-actions
Copy link
Contributor

🚀 Preview deployed!

Your changes have been deployed to Vercel:

Preview URL: https://roo-code-website-ild3l82xi-roo-code.vercel.app

This preview will be updated automatically when you push new commits to this PR.

description: ARGS_PARAMETER_DESCRIPTION,
},
},
required: ["skill", "args"],
Copy link
Contributor

Choose a reason for hiding this comment

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

In the OpenAI tool schema, args is documented as optional but is currently included in required, which forces callers to always provide it (usually as null). Making args truly optional avoids schema/documentation mismatch and reduces invalid tool payload risk if other tool-callers omit it.

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

@hannesrudolph hannesrudolph merged commit 67e568f into main Jan 29, 2026
17 checks passed
@hannesrudolph hannesrudolph deleted the refactor/replace-fetch-instructions-with-built-in-skills branch January 29, 2026 14:48
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jan 29, 2026
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

Replace fetch_instructions tool with unified skill tool system

4 participants