From rider-mcp-enforcer
Routing rules for code search in JetBrains Rider projects — use the Rider MCP symbol/reference/file tools instead of Bash grep. Use whenever searching for a symbol, definition, function, variable, type, or finding usages/references in a C#/.NET or Unreal C++ codebase open in Rider.
How this skill is triggered — by the user, by Claude, or both
Slash command
/rider-mcp-enforcer:rider-searchThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This project is open in JetBrains Rider with the Rider MCP server connected (server name: `rider-search`). Karpathy-style rules: do the listed thing, do not improvise.
This project is open in JetBrains Rider with the Rider MCP server connected (server name: rider-search). Karpathy-style rules: do the listed thing, do not improvise.
search_symbol (args: q, limit, include_external, paths, projectPath). Never grep/rg for this.search_file or find_files_by_name_keyword / find_files_by_glob. Never find -name for source files.search_text / search_regex (or search_in_files_by_text / search_in_files_by_regex).get_symbol_info (args: filePath, line, column).rename_refactoring (args: pathInProject, symbolName, newName). Never sed/replace across files for a rename.read_file / get_file_text_by_path to read, not cat.projectPath is omitted. Pass projectPath, or have
the user set RIDER_PROJECT_PATH so the proxy injects it. If a call returns "Unable to determine the
target project" with a numbered project list, ask the user which project, then pass its path.This Rider MCP build has no semantic find-references/find-usages tool. To find references, use
search_text/search_regex on the symbol name (string match, like grep but indexed + token-capped).
Don't claim semantic usage results you didn't get.
code-locator subagentcode-locator subagent in one call. It runs every lookup in its own context and returns one compact
file:line table, so the raw results never pile up in yours.Renaming a function, variable, class, field, or type is a semantic operation. Rider does it correctly across the whole project; a text find-and-replace does not.
rename_refactoring (args: pathInProject, symbolName, newName, plus
projectPath when known). Rider updates every reference project-wide, including other files, and
won't touch a substring, a comment, or a same-named but unrelated symbol. This is ALWAYS how you
rename. Never use sed/perl -i, a multi-file Edit, or replace_text_in_file to rename a symbol —
those hit partial matches and comments, miss overloads and cross-file refs, and silently break the build.move_type_to_namespace (args: filePath,
typeName, targetNamespace). Updates the declaration and all references across the solution.reformat_file.replace_text_in_file is for a literal text edit (a string literal, a comment), NOT for renaming a symbol.A rename is a single semantic call that does the whole job, so run it inline — it is not a
multi-step investigation and needs no subagent. If you don't know the exact symbolName or its path,
do one search_symbol first, then rename. If the result carries a ⚠ INCOMPLETE banner or Rider
reports the symbol is ambiguous, stop and confirm with the user before renaming.
If a tool result contains a ⚠ INCOMPLETE RESULTS banner, the proxy already auto-raised the limit
once and the match set is STILL not exhaustive. You are seeing a partial list.
RIDER_MAX_RESULTS/limit,
narrow with paths, or confirm partial is OK).Never silently treat a banner-flagged result as complete.
search_symbol uses Rider's index (no full-tree scan, token-capped by the proxy).search_symbol quality varies (may return file/name matches rather than the
exact class). Verify the result; fall back to search_text if the symbol result looks off.If a rider-search tool errors with "not connected" (or only a rider_status tool exists),
Rider MCP is OFF. Tell the user to enable it (Rider → Settings | Tools | MCP Server → Enable →
Copy SSE Config) and set RIDER_MCP_SSE_URL. Until then, code-grep is blocked by the hook — the
user can set RIDER_ENFORCE=0 to allow grep as a fallback. Do not loop on blocked grep; surface the
fix and move on.
Note: tool names above match the JetBrains Rider MCP server (2025.2+). If a name differs in your Rider build, check the
rider-searchtool list and map accordingly.
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
npx claudepluginhub jsungmin/rider-mcp-enforcer --plugin rider-mcp-enforcer