windows-compat

A Rust repository audit for Windows compatibility, including file-path handling, long command lines, index keys, and assumptions about folder layouts.

In plain words
What is it for?
Use it when Rust code builds, compares, prints, or stores filesystem paths, or when hardening a code-graph project for Windows users.
Why use it?
Code that works on Linux or macOS can fail on Windows when the same path is written or compared in different forms, or when Windows limits are overlooked.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/sdsrss/code-graph-mcp/windows-compat
Any agent
npx skills add sdsrss/code-graph-mcp --skill windows-compat
Clone the repo
git clone --depth 1 https://github.com/sdsrss/code-graph-mcp

Made for: Claude Code, Codex.

Per session 165 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,205 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00165 $0.02205
Opus 5 $0.00082 $0.01103
Sonnet 5 $0.00033 $0.00441
Haiku 4.5 $0.00016 $0.00220

Measured 2d ago against content hash 65b3b3afdfd2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

windows-compat 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 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/audit.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

docs/skills/windows-compat/SKILL.md · 196 lines

How it starts

The opening of the file, as written. The whole thing — 196 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Windows compatibility (code-graph-mcp)

Three defects reached a Windows user from one root cause: two spellings of the same path compared unequal. CI already ran windows-latest and caught none of them, because nothing asserted on path spellings at all. Closing that gap is what this skill is for.

The invariant everything hangs off

indexer::merkle::normalize_rel_path stores every indexed path as a /-separated relative path, rewriting separators only under #[cfg(windows)]. So any path that becomes a lookup key, a dedup key, or stdout must land in exactly that spelling.

Almost every defect below is one producer handing over a different spelling of the same file. The producer table and the full catalogue are in references/failure-modes.md — read it before changing path-handling code. It is short and every entry is a real defect with its shipped fix.

The doctrine: platform is a parameter, not a cfg!

This is the single rule that makes everything else testable.

// NO — the Windows branch only runs on Windows, so the Linux and macOS legs
// prove nothing, and a Windows-only CI failure is expensive to debug.
fn normalize(path: &str) -> String {
    if cfg!(windows) { path.replace('\\', "/") } else { path.into() }
}

// YES — one thin cfg! entry point, all logic in a function taking the platform.
fn normalize(path: &str) -> String {
    normalize_on(path, cfg!(windows))
}
fn normalize_on(path: &str, backslash_is_sep: bool) -> String { ... }

Then assert both values from any platform:

assert_eq!(normalize_on(r"src\a.rs", true), "src/a.rs");   // Windows behaviour
assert_eq!(normalize_on(r"src\a.rs", false), r"src\a.rs"); // `\` is a legal Unix filename char

Live examples: merkle.rs::normalize_rel_str_on (the crate's single separator-rewriting implementation — everything else delegates to it), cli.rs::normalize_path_display_on, cli.rs::relativize_path_on.

Skip dunce / path-slash here. They do the right thing but decide internally on cfg(windows), forfeiting exactly the property that makes the Linux leg useful.

Read the full file on GitHub · 196 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 2d ago First seen · 196 lines · 165 tokens per session scan A 65b3b3afdfd2

Subscribe to this mod's changes

windows-compat is a skill published in the GitHub repository sdsrss/code-graph-mcp (70 stars, last pushed 6d ago), licensed MIT. It adds 165 tokens to every session and 2,205 once invoked, about $0.0008 per session on Opus 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.

Related

Other skills, from other repositories

gograph

Go repository intelligence for Claude Code. Use when reading, navigating, editing, reviewing, or refactoring a Go codebase. Exposes 64 query, analysis, and workflow capabilities through the local gograph MCP server, including bounded first-call exploration, AST-aware call graphs, blast-radius analysis, impact, and…

ozgurcd/gograph · 69 tokens

gossiphs

Use when you need to find related files, understand code dependencies, or analyze impact scope. Triggers when the user asks about: "Which files use this function/class?" "What files will be affected if I change this?" "Find code related to X" "What does this file depend on?" "Where is this symbol defined/referenced?"…

williamfzc/gossiphs · 87 tokens

frigg-first-code-search

Prefer Frigg MCP for indexed source. resulthandle + readmatch for proof.

bnomei/frigg · 0 tokens

test-harness

Test codeweave-mcp tools against any project using TestHarness. Use this whenever verifying tool behavior, testing a code change, or running custom assertions — e.g. "test the harness", "run tests against X project", "does semanticsearch work correctly".

semihkayan/codeweave-mcp · 57 tokens

risk-assessment

Assess project/domain health — scan risk zones across dimensions (bugs, hotspots, tech debt). Use when asked evaluate risks, find problematic areas, assess code health, identify zones needing attention — NOT for specific bug symptoms (use bug-hunt instead).

artk0de/TeaRAGs-MCP · 53 tokens

executing-plans

Execute written implementation plan whose Tasks edit code, per-Task SAFE/CAUTION/UNSAFE git-signal verdict before edit AND code-style cascade for code-generation Tasks (style from silo authors, strategy+template from proven neighbors). Triggers on "execute the plan", "start Task N", "выполни план", "начни задачу"…

artk0de/TeaRAGs-MCP · 125 tokens