-
Notifications
You must be signed in to change notification settings - Fork 2.8k
refactor: replace fetch_instructions with skill tool and built-in skills #11084
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: replace fetch_instructions with skill tool and built-in skills #11084
Conversation
Review status: 1 issue still outstanding.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
- 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.
This reverts commit 40dd577.
…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
ccd072c to
42e113b
Compare
There was a problem hiding this 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.
Fixed in cdc2dca by updating the TypeScript types to allow null for args:
src/shared/tools.ts:args?: string | nullsrc/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.
Closes #11062
Summary
This PR replaces the
fetch_instructionstool with a new unified skill tool system, making it easier for Roo to load specialized instructions for common tasks.What Changed
New Skill Tool
skilltool to load instructions for tasks like creating MCP servers or custom modesBuilt-in Skills
Two built-in skills are now included:
Removed Settings
New Diff Toggle Setting
diffEnabledsetting to control whether diff-based editing tools are availableHow 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
Follow-up Work