skills/audit-deep/SKILL.md
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.
npx skillsauth add darylmcd/Roslyn-Backed-MCP audit-deepInstall 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.
Run a comprehensive Roslyn-MCP audit against the current repository. The skill bundles its own audit prompt — no per-repo prompt copy is required.
This skill is a null-op without the Roslyn MCP server. The audit's entire purpose is to exercise the server's live surface — without it, the run produces no audit-grade evidence.
Verify mcp__roslyn__server_info appears in your current tool surface and call it. The response must include connection.state: "ready".
If the call fails, the tool is missing, or connection.state is initializing / degraded / absent, stop and report:
"This skill requires the Roslyn MCP server (
mcp__roslyn__*tools must be callable,connection.statemust beready). Start the server — for exampledotnet tool run roslynmcpor ensure the plugin's stdio entry is active in your client config — confirmmcp__roslyn__server_inforeturnsready, then re-invoke this skill."
Do not substitute Read, Grep, Bash: dotnet build, or any other host-side fallback. There is no generic non-MCP audit fallback in this skill — a broken server precondition halts the run.
$ARGUMENTS and pick the mode promptRecognized tokens (the only valid values for mode):
mode=full (default) — full-repo sweep, including refactor pass with apply-mode mutations on a disposable worktree.mode=promotion-only — exercise the experimental-tier surface to produce a promotion scorecard. No Phase 6 product mutations.mode=read-only — preview-only / read-only across the entire surface. No applies anywhere. Promotion scorecard skipped (writers default to needs-more-evidence).Unrecognized modes — including the historical focused value — are not supported; reject with a one-line message and ask the user to pick one of the three above.
Resolve the prompt body in this order:
mode=full → read ${CLAUDE_PLUGIN_ROOT}/skills/audit-deep/prompts/full.md and run it verbatim.mode=promotion-only → read ${CLAUDE_PLUGIN_ROOT}/skills/audit-deep/prompts/promotion-only.md and run it verbatim.mode=read-only → read ${CLAUDE_PLUGIN_ROOT}/skills/audit-deep/prompts/read-only.md and run it verbatim.The mode prompts are the source of truth for phase content, output schema, and hard-gate checkpoints. This SKILL.md supplies the orchestration wrapper: when a phase is listed in the phase-runner offload map below, execute that phase through the audit-phase-runner subagent when the host supports subagents; otherwise run the same phase inline and record phase-runner: inline fallback in the report header.
The audit is read-only against the audited repository's main branch. Phase 6 (refactor pass, mode=full only) writes apply-mode mutations, but only inside a disposable worktree the prompt creates and tracks. The flow is:
main branch is never directly mutated.mode=promotion-only and mode=read-only skip Phase 6 entirely — no apply chains run, and the disposable worktree is optional.
Use the repo-local audit-phase-runner subagent for phases that are long-running or log-heavy but not workspace-version-sensitive:
| Phase | Execution owner | Summary expected |
|---|---|---|
| Phase 1 — broad diagnostics scan | audit-phase-runner when available; inline fallback otherwise | diagnostics counts, top failures, elapsed time |
| Phase 2 — code quality metrics | audit-phase-runner when available; inline fallback otherwise | hotspot counts, metric bands, elapsed time |
| Phase 8 — build and test validation | audit-phase-runner when available; inline fallback otherwise | build/test verdict, pass/fail counts, failing names |
| Phase 8b — concurrency audit | audit-phase-runner when available; inline fallback otherwise | concurrency matrix counts, anomalies, elapsed time |
Run these phases inline in the main audit context: Phase -1, 0, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 16b, 17, and 18.
Hard boundary: Phase 6 and every preview/apply chain stay inline. Do not delegate workspace-version-sensitive mutations, even in mode=full, because the runner does not share the main audit context's preview evidence or disposable-checkout mutation ledger.
When delegating, pass a compact brief with:
phase: one of 1, 2, 8, or 8bmode: the selected moderepoRoot: absolute audited repo rootworkspaceId: loaded workspace id when applicablesolutionPath: loaded solution or project pathreportPath: current audit report draft pathThe runner must return the ## Audit Phase Runner Summary markdown table defined in .claude/agents/audit-phase-runner.md. Paste that table into the phase's report slot. If the runner is unavailable, run the phase inline and emit the same summary table yourself.
Read the resolved prompt file in full and follow it phase by phase. Persist the audit draft after each phase as the prompt instructs — the canonical report path lives in the prompt's Output Format section.
/surface-audit for live-surface drift detectionThe mode prompts' Phase 0 includes a live-surface drift detection sub-step that diffs the seeded coverage ledger against names referenced in the prompt's phase guidance. When a separate /surface-audit skill is available in the host's tool surface, prefer delegating that diff to it (one structured table back) instead of re-walking the live catalog from scratch in this skill's main agent.
/surface-audit is available — invoke it with the audited repo root, take the returned drift table, and paste it under Phase 0's drift-detection output slot. The two output buckets (guidance gap and prompt drift) map directly onto the structured table /surface-audit returns./surface-audit is not available — fall through to the in-prompt logic in Phase 0 step 14. Do not block the audit on the optional skill: the prompt's drift-detection still produces a valid result without it. Note in the report header which path you took (drift-detection: delegated to /surface-audit vs drift-detection: in-prompt).Delegation is a performance and consistency optimization, not a correctness requirement; the in-prompt logic remains the authoritative fallback.
scripts/archive-old-reports.ps1Reports written to the audit-reports directory accumulate over time. The skill ships a small PowerShell wrapper at skills/audit-deep/scripts/archive-old-reports.ps1 that moves *.md files older than N days (default 30) into a year-stamped archive/<YYYY>/ subdirectory, where <YYYY> is each file's LastWriteTime year. The reports directory path defaults to the audit-deep convention and can be overridden via -ReportsRelativePath.
Invocation (Bash on Windows or any shell with pwsh on path):
# Preview the archive plan without mutating anything.
pwsh -NoProfile -File skills/audit-deep/scripts/archive-old-reports.ps1 -DryRun
# Archive reports older than 60 days under the default reports directory.
pwsh -NoProfile -File skills/audit-deep/scripts/archive-old-reports.ps1 -OlderThanDays 60
# Archive against a non-default reports directory in a host repo.
pwsh -NoProfile -File skills/audit-deep/scripts/archive-old-reports.ps1 -ReportsRelativePath docs/audits
Behavior contract:
README.md and deep-review-session-checklist.md stay in place regardless of age.-DryRun is set — no filesystem mutations occur; the script reports what it would do.The script is invoked manually (no automatic scheduler today). Recommended cadence: run once at the end of each release cut or at the start of a new audit pass.
mcp__roslyn__server_info is not callable or connection.state is not ready, halt.main. All apply-mode mutations confine to the disposable worktree the prompt creates. Never push or merge from inside this skill.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
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.
tools
Update the Roslyn MCP plugin. Use when: server_info shows an update is available, the user wants to update to the latest version, or the plugin reports an older version than NuGet. Handles both the global tool binary (Layer 1) and the Claude Code plugin metadata (Layer 2).