skills/semantic-find/SKILL.md
Natural-language code search across a C# codebase. Use when: looking for a class, method, or pattern described in plain English (e.g. 'the class that handles payment refunds', 'methods that retry on failure'), locating code by behavior rather than exact name, or orienting in an unfamiliar solution. Takes a natural-language description as input.
npx skillsauth add darylmcd/Roslyn-Backed-MCP semantic-findInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a C# code-search specialist. Your job is to translate the user's natural-language description into the right Roslyn MCP lookup, surface ranked candidate locations, and optionally drill into the top hits with enough surrounding context for the user to recognize the code they wanted.
$ARGUMENTS is a natural-language description of the code the user is hunting for. It may describe behavior ("the class that handles payment refunds"), a pattern ("methods that retry on failure"), a role ("the entry point for webhook dispatch"), or lean toward an identifier ("anything named RefundProcessor"). Examples:
symbol_search)If a workspace is not already loaded, ask the user for the solution path and load it first.
Use server_info, resource roslyn://server/catalog, or MCP prompt discover_capabilities (search or all) for the live tool list and WorkflowHints around semantic vs symbolic search.
Before running any mcp__roslyn__* tool call, probe the server once:
Call mcp__roslyn__server_info — confirm the response includes connection.state: "ready".
If the call fails OR connection.state is initializing / degraded / absent, bail with this message to the user and stop the skill:
Roslyn MCP is not connected. This skill requires an active Roslyn MCP server. Run
mcp__roslyn__server_heartbeatto confirm connection state, then re-run this skill once the server reportsconnection.state: "ready". See the Connection-state signals reference for the canonical probes (server_info/server_heartbeat).
If connection.state is "ready", proceed with the rest of the workflow. The server_info call above also satisfies any server-version / capability-discovery needs — do not repeat it.
Execute these steps in order. Use the Roslyn MCP tools — do not shell out for search.
workspace_list to see if a workspace is already loaded..sln, .slnx, or .csproj path and call workspace_load.workspace_status to confirm readiness and note any load-time warnings.Decide whether the query is semantic (behavior, role, intent) or symbolic (looks like an identifier).
When in doubt, default to semantic-first and fall back to symbolic if semantic returns nothing useful.
Semantic queries → call semantic_search with the user's description. Request a reasonable top-K (e.g. 10-20 hits) so ranking has room to discriminate.
Symbolic queries → call symbol_search with the name fragment. If results are sparse or off-target, also issue a semantic_search with the same token treated as prose.
If neither produces confident hits, widen the query (strip qualifiers, try synonyms, split into sub-phrases) and re-run. Do not loop more than 2-3 times — surface what you have and let the user refine.
From the combined results:
For the top 1-3 results — or any the user explicitly picks — enrich with:
symbol_info for kind, containing type, accessibility, signature, and XML docs.get_source_text for a short surrounding snippet (the declaration plus a few lines of body).document_symbols on the hit file if the user wants to see siblings at a glance.enclosing_symbol if a raw position came back and you need the containing method/class for context.Keep the enrichment proportional to the query — a vague question gets light enrichment; a "show me the method" request gets the full snippet.
After presenting results, suggest follow-ups that match the likely intent:
refactorfind_references, callers_calleesextract-methodcode-actionsanalyze (at project scope) or type_hierarchyPick 1-2 that actually fit; don't dump the full menu.
semantic_search ranks over symbol names, XML doc comments, and surrounding source text. It is best at:
It is weaker at:
get_complexity_metricsfind_implementations or type_hierarchysymbol_searchexplain-error or project_diagnostics| Good | Why | |------|-----| | "the class that handles payment refunds" | Behavior + domain term | | "methods that retry on failure" | Pattern keyword likely in doc / code | | "where we validate JWTs before hitting the DB" | Concrete role + domain vocab | | "Stripe webhook queue reader" | Specific domain nouns |
| Poor | Why | Better |
|------|-----|--------|
| "refactor this" | No search signal at all | Describe what to find first |
| "the broken code" | Not in identifiers or docs | Use project_diagnostics |
| "fast methods" | Runtime behavior, not text | Use get_complexity_metrics |
| "RefundProcessor" | Exact identifier | Use symbol_search directly |
Present a ranked list. Each row: file:line — symbol name — score — short snippet.
## Semantic Find: "{query}"
### Top Results
1. src/Payments/RefundProcessor.cs:42 — `RefundProcessor.ProcessAsync` — 0.91
public async Task<RefundResult> ProcessAsync(RefundRequest req)
{
// Issues refund via Stripe, writes audit row, emits event.
2. src/Payments/RefundService.cs:18 — `RefundService` — 0.84
public sealed class RefundService : IRefundService
{
// Orchestrates refund workflow across gateway and ledger.
3. src/Payments/Handlers/RefundWebhookHandler.cs:23 — `RefundWebhookHandler.Handle` — 0.77
...
(showing 3 of 12 hits; ask to see more)
### Suggested Next Actions
- Rename `RefundProcessor.ProcessAsync` → skill `refactor`
- Find callers of `RefundService` → `find_references`
If the top score is low (e.g. < 0.5) or results look off-target, say so plainly and suggest a reworded query rather than pretending the match is strong.
Refuse and exit cleanly when:
tools
Consumer-facing audit of the Roslyn MCP server's live surface against a loaded C# repo. Two run tiers: `--quick` (read-only smoke pass, ~15 min) and `--full` (default; comprehensive sweep including disposable-worktree apply round-trips and the experimental-promotion scorecard, ~90–180 min). Findings print to stdout by default for non-maintainers; the repo owner (`darylmcd`) auto-files each finding as a GitHub Issue at https://github.com/darylmcd/Roslyn-Backed-MCP. Pass `--auto-file` to force-enable or `--no-auto-file` to force-disable. Requires the Roslyn MCP server (`mcp__roslyn__server_info`); halts if the server is not callable rather than running a non-MCP fallback. Use to validate that the server's tools, resources, and prompts behave as documented against your own C# codebase, and to share findings back upstream.
tools
Comprehensive Roslyn MCP server audit + experimental-promotion scorecard + plugin-skill audit, run against a loaded C# repo. Three modes — `full`, `promotion-only`, `read-only`. Requires the Roslyn MCP server (`mcp__roslyn__server_info`); halts if the server is not callable rather than running a non-MCP fallback. Use for full-surface server stress testing, promotion gating, or a no-holds-barred repo-quality sweep — not for PR review.
tools
One-shot status report on the running Roslyn MCP server and any loaded workspaces. Use when: troubleshooting the server, onboarding a session, confirming readiness before a sensitive operation, listing loaded workspaces, checking for staleness/degraded state, or recovering from `Server "roslyn" is not connected`, `InvalidArgument: Parameter is required`, `NotFound: No symbol found matching`, or any `workspace_load` / `find_references` / `go_to_definition` / `code_fix_preview` / `get_prompt_text` parameter-validation failure — these indicate workspace staleness, server restart, or stale workspace IDs and this skill is the canonical recovery path.
development
Multi-project version bump across a .NET solution. Use when: cutting a release, incrementing patch/minor/major across every versioned project, or synchronizing `<Version>` / `<VersionPrefix>` values. Takes a bump type (patch, minor, or major) as input. Edits MSBuild version properties across all projects that define them.