Borrowing it
Nothing to install: this file belongs to firish/claude_code_vs. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/firish/claude_code_vs/main/CLAUDE.mdgit clone --depth 1 https://github.com/firish/claude_code_vsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/firish/claude_code_vs/claude-md)<a href="https://agentmods.dev/instructions/firish/claude_code_vs/claude-md"><img src="https://agentmods.dev/badge/instructions/firish/claude_code_vs/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/firish/claude_code_vs/claude-md"><img src="https://agentmods.dev/badge/instructions/firish/claude_code_vs/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.12022 | $0.12022 |
| Opus 5.5 | $0.04809 | $0.04809 |
| Sonnet 5.5 | $0.02404 | $0.02404 |
| Haiku 4.5 | $0.01202 | $0.01202 |
Grade A, and why
claude_code_vs CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 206 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
Operating context for Claude Code when working in this repo. Future work and release plan live in ROADMAP.md.
What this is
A native Visual Studio 2026 extension that launches the real claude CLI and implements Claude Code's IDE-integration protocol (lockfile + localhost WebSocket speaking MCP/JSON-RPC 2.0). The CLI does all agent work; this extension provides the IDE half: a native diff window with accept/reject and automatic selection + diagnostics context. We do not reimplement the agent, and we do not build skills/plugins/hooks - those come from the CLI for free.
If you ever find yourself adding an LLM API call, an agent loop, or a tool the CLI already provides, stop - that's out of scope.
Working agreement (how we collaborate here)
- Build in chunks, then teach. Run free on a defined chunk of work (a phase or a well-scoped task), then - before moving on - explain everything the user needs to know/learn about what was built. The user is shipping this and learning the domain (VS SDK, the Claude Code IDE protocol) along the way, so keep code and decisions explainable and don't bury rationale.
- Ask before design decisions with tradeoffs. When a fork has real tradeoffs (not a choice with an obvious default), surface it with a recommendation and let the user decide. Decisions clearly load-bearing in the existing code don't need re-asking.
- Ask when an instruction is unclear rather than guessing and running.
Architecture (where things live)
src/ClaudeCodeVS.Protocol/- lockfile writer, WS server, MCP/JSON-RPC framing.src/ClaudeCodeVS/Tools/- oneIIdeToolper tool: the 12 IDE-protocol tools (openDiff, openFile, getDiagnostics, …) plus the debugger surface -DebugTools.cs(reads) +DriveTools.cs(gated drive) - plus the semantic surface -SemanticTools.cs(the 8vs-semanticRoslyn navigation tools, incl.vs_get_selection+vs_decompile) - plus the test surface -TestTools.cs(list/run/rerun-failed/debug/hunt/catch, onvs-debug) - plus the build surface -BuildTools.cs(vs_build+vs_read_output, also onvs-debug).src/ClaudeCodeVS/CodeModel/-RoslynReader(the semantic-model reader: search/find-references/go-to-definition/find-implementations/call-&-type-hierarchy over the liveVisualStudioWorkspace, plusFindTestMethodsAsync= Roslyn test discovery). The static-analysis twin ofDebugging/DebuggerReader; backs thevs-semanticMCP server. Roslyn binds in-proc (unlike ClrMD) -VisualStudioWorkspaceis the supported extension entry point.src/ClaudeCodeVS/Testing/- the test-runner:TestRunner(drives VS's Test Explorer engine in-proc via MEFIRequestFactory- list/run/debug/flaky-hunt/catch),HuntState(async background flaky-hunt registry),TestResultCallback(theReflection.Emit'd internalITestWindowDataCallbackthat captures real per-test results). Backs the test tools on thevs-debugserver; see the Test-integration section.src/ClaudeCodeVS/Building/-SolutionBuilder: drives the IDE's own build (asyncSolutionBuild.Build(false)+BuildStatepoll, never the UI-freezingBuild(true)thatTestRunneruses internally) and assembles the report. Backsvs_build; see the Build-integration section.src/ClaudeCodeVS/Edits/-EditHunks(pure line diff: current file content vs an edit's proposed content -> the hunks the panel offers as jump targets) +EditEntry(one panel row) +EditOutputLog(the session-long "Claude Code Edits" Output pane;OutputTaskItemStringplusFlushToTaskList()- without the flush the task items never materialize and the lines are inert, which is exactly how it shipped broken the first time. In VS 2026 those lines are NOT hyperlinks and double-click does nothing, but F8 steps them; the only way to get true links isCAT_BUILDCOMPILE, which would put edit rows in the Error List and undo 1.20.0's pollution fix - don't). Backs the panel's Edits this turn list (issue #44): the CLI printschanged Foo.cs:1234in the terminal and VS's terminal has NO link provider we can hook (ITerminalServicehands back aGuid, nothing else), so the jump targets live on a surface we own. Fed from/permission, which is a PreToolUse hook - the file on disk is still the "before" side when we're called, which is the whole reason a line-accurate diff is possible there. Turn-scoped:MarkTurnStaleon UserPromptSubmit, replaced by the next edit (NOT cleared at prompt time - the list must survive while the user is typing). Collapses to one row when a file is mostly new, judged by share of lines added rather than span, so two small edits at opposite ends of a file don't read as a rewrite.src/ClaudeCodeVS/Diff/- diff rendering + Accept/Reject InfoBar + write-back + tab registry.src/ClaudeCodeVS/Editor/- selection service + TextViewListener MEF component + Error List reader + RDT helpers +OutputWindowReader(Output-window pane reads, GUID-addressed for build/debug/general because pane NAMES are localized; backsvs_read_outputand the raw-log half ofvs_build).src/ClaudeCodeVS/Attachments/-AttachmentService(SelectionService-pattern static,Attach(server)from BridgeHost): the panel attach tray's engine. Stages pasted screenshots/dropped files (in-workspace = referenced in place; else copied to<ws>\.claude\attachments\behind a self-ignoring*gitignore, 7-day prune) and pushes each as anat_mentionednotification so the reference lands in the CLI composer. ONE framework for all formats: image/pdf/text read directly, BMP transcoded to PNG, everything else (xlsx/mp4/zip) mentioned with a 🧰 needs-tool label - never hard-rejected. Per-item token estimates ((w×h)/750 images, bytes/4 text). UI = the 📎 card inClaudeToolWindowControl(drop target, Paste button, chips: click = re-mention, ✕ = remove-and-delete-copy). A directory stages mention-only (no read, copy or estimate - folder@-mentions are first-class in the CLI, which walks the tree), which is what Solution Explorer's Add to Chat (ContextActions.AddSelectionToChatAsync, issue #30) routes selected files AND folders through - the tray buys it chips, re-mention and flush-on-connect for free. References (WasCopied=false: those files/folders, in-place drops, and the editor actions' ranged mentions viaMentionFileAsync) dedupe on path+range and re-send the existing chip. Dropped/pasted FILES also dedupe on the original path + its last-write time (FindBySource, checked before any copying), so re-attaching an out-of-workspace file re-mentions its chip instead of stagingfoo-2.png,foo-3.png- a file edited since staging still comes in fresh, because the staged copy froze the old bytes. Only contentless pastes (clipboard image, composer text) never dedupe: they have no source file, so each one is genuinely new. The tray is workspace-scoped:WorkspaceWatcherclears it whenever the workspace actually changes (solution/folder open or close) - chips carry workspace-relative mention paths and live in that workspace's staging folder, so they must not survive into the next one.src/ClaudeCodeVS/Capture/-WindowCapture: the Win32/GDI capture core behind thevs_capture_window/vs_capture_screentools (Tools/CaptureTools.cs, gated byBridgeStatus.AllowScreenCapture- the third safety toggle). PrintWindow(PW_RENDERFULLCONTENT) + blank-frame fallback (foreground → 350ms settle → re-rect → region copy, the path GPU browsers need). One shared eligibility predicate (visible + not DWM-cloaked + titled; min 200×120 filters browsers' taskbar-preview proxy HWNDs) backs BOTH the title matcher and the error'svisibleWindowslist so they never disagree; minimized matches error "restore first". Captures stage viaAttachmentService.StageCapturePng(chip + feed line,Sent=trueso never auto-mentioned) and return the PATH - never MCP image blocks (~10-20× token waste, upstream #31208 - bot-closed as stale, NOT fixed). Reference:docs/VISION.md.src/ClaudeCodeVS/Debugging/-DebuggerReader(EnvDTE reads: break state, stack, locals, threads, object-graph expansion,$exception, processes) +DebuggerDriver(EnvDTE/IVsDebuggerdrive: continue/step/breakpoints/session, break-on-thrown viaEnvDTE90.Debugger3, attach/detach + the await-break engine).src/ClaudeCodeVS/Hooks/- hook installer (PermissionHookInstaller) +McpInstaller(registers BOTH thevs-debugandvs-semanticMCP servers) + embedded scripts:vs-permission-hook.ps1,vs-usage-hook.ps1,vs-debug-context-hook.ps1,vs-notify-hook.ps1(Notification hook -> POST/notify-> in-IDE "Claude needs your input" notification),vs-mcp-shim.ps1(one shim, parameterized by-Routeso it backs both servers:/mcp= vs-debug,/mcp-semantic= vs-semantic).src/ClaudeCodeVS/Ui/- dockable panel (BridgeStatus state, ClaudeToolWindowControl WPF, ReasonDialog) +Notifier(turn-finished / needs-input notifications: ONE main-window InfoBar, superseded by the next, + a bounded taskbar flash when VS is backgrounded; turn-end rides the existing Stop hook's/usagePOST viaIdeWebSocketServer.StopReceived- no extra hook; gated by the panel's Notify toggle, default ON) +UpdateNotice(the once-per-MARQUEE-release "what's new" InfoBar: normally DISARMED -MarqueeVersion = null, releases ship silently; arming is an editorial act on headline/behavior-changing releases only: set the constant + rewriteMarqueeNoticeTextin both resx, disarm again next release; latched per-user in the VS settings store, written only after the bar actually rendered).src/ClaudeCodeVS/Resources/- UI localization (issue #20):Strings.resx(neutral English) +Strings.zh-Hans.resx(Simplified Chinese, maintained by Claude - the maintainer doesn't read Chinese) +Strings.cs(hand-written nameof-keyed accessors). Culture follows VS's display language (IUIHostLocale, read at package init). See convention #6 and the Localization section - every new user-facing string lands in all three files in the same change.src/ClaudeCodeVS/Terminal/-VsTerminalLauncher.cs: launchesclaudeinside VS's own native Terminal tool window viaMicrosoft.VisualStudio.Terminal.ITerminalService(undocumented, no NuGet package - reflection-loaded from the install dir at runtime, same pattern as the TestWindow integration inTesting/TestRunner.cs). Falls back to the externalcmd.execonsole (BridgeHost.LaunchClaudeAsync) on any failure OR a ~10s stall (raced timeout + linked cancellation - a cold ServiceHub must not leave the Launch button dead), since this surface could change or vanish across a VS update. The cached "Claude Code" terminal profile is deregistered right after launch (RemoveCachedProfile) so the profile dropdown stays clean; the panel's External console button (BridgeStatus.LaunchExternalAction->LaunchClaudeAsync(forceExternal: true)) skips the native path for users who want a standalone/VS-surviving window. User-facing reference (with notifications + attachments):docs/QOL.md.BridgeHost.cs- wires everything together; owns the/permissionhandler and CLI launcher.spike/- Phase 0 standalone console harness (net8.0), kept for protocol regression testing.src/ClaudeCodeVS.ClrMdWorker/- out-of-process ClrMD worker exe (net48/x64):waitchains/asyncstacks/heapstats/threadpool/roots/heapdiffcommands emit JSON; bundled in the .vsix underClrMdWorker\and shelled out byDebugging/ClrMdReader.cs(ClrMD can't load in-proc in devenv — Immutable binding conflict). To iterate on a ClrMD read, run the worker exe directly against a target PID (no VS needed).src/ClaudeCodeVS.DataBpComponent/- the managed data-breakpoint Concord (DkM) debug-engine component (net472): anIDkmCallStackFilter+IDkmDataBreakpointHitNotificationregistered via.vsdconfig(aDebuggerEngineExtensionVSIX asset). ArmsDkmPendingDataBreakpoints from the request thread and streams changes over file-IPC; driven byDebugging/DataBreakpointBridge.cs+ thevs_set/get/remove_data_breakpointtools (Tools/DataBpTools.cs).
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago Changed · +1 lines · +363 tokens per session 55bddd0c2349
- 1mo ago Changed · +3 lines · +463 tokens per session c786fe92db17
- 1mo ago First seen · 202 lines · 11,196 tokens per session scan A c1e72b335432
claude_code_vs CLAUDE.md is an instructions file published in the GitHub repository firish/claude_code_vs (102 stars, last pushed 1mo ago), licensed MIT. It adds 12,022 tokens to every session, about $0.0481 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
vscode model-prompts.instructions.md
Model-specific prompt authoring and registry guidelines.