Skip to content

Conversation

@hannesrudolph
Copy link
Collaborator

@hannesrudolph hannesrudolph commented Jan 29, 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 29, 2026
@roomote
Copy link
Contributor

roomote bot commented Jan 29, 2026

Oroocle Clock   See task on Roo Cloud

Review status: 1 issue still outstanding.

  • Align skill tool JSON schema with implementation: args should not be required (or update implementation to accept/handle null).
Previous reviews

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

hannesrudolph and others added 14 commits January 29, 2026 11:56
- 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
- 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
@hannesrudolph hannesrudolph force-pushed the refactor/replace-fetch-instructions-with-built-in-skills-2 branch from ccd072c to 42e113b Compare January 29, 2026 18:57
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 29, 2026
roomote[bot]
roomote bot previously requested changes Jan 29, 2026
Copy link
Contributor

@roomote roomote bot left a comment

Choose a reason for hiding this comment

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

One issue is still outstanding: the skill tool schema requires args. Please remove args from the required list or update the implementation to handle null.

Update the args parameter in NativeToolArgs and SkillParams to allow
null in addition to string, matching the JSON schema definition where
args has type: ['string', 'null'] and is in the required array.

This aligns the TypeScript interface with the OpenAI strict mode
pattern used by other tools like codebase_search and execute_command.
@hannesrudolph hannesrudolph dismissed roomote[bot]’s stale review January 29, 2026 19:42

Fixed in cdc2dca by updating the TypeScript types to allow null for args:

  • src/shared/tools.ts: args?: string | null
  • src/core/tools/SkillTool.ts: args?: string | null

This aligns with the existing pattern used by other tools (e.g., codebase_search, execute_command) where parameters with type: ['string', 'null'] are in required but the TypeScript types explicitly allow null.

@hannesrudolph hannesrudolph merged commit f848795 into main Jan 29, 2026
15 of 17 checks passed
@hannesrudolph hannesrudolph deleted the refactor/replace-fetch-instructions-with-built-in-skills-2 branch January 29, 2026 19:47
@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:XL This PR changes 500-999 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