MSVC cl.exe and clang-cl skill for Windows C/C++ projects. An agent skill from mohitmishra786/low-level-dev-skills.

MITAuto-check passedWriting & Content

Install Msvc Cl

skills CLI
$ npx skills add mohitmishra786/low-level-dev-skills --skill msvc-cl -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mohitmishra786/low-level-dev-skills msvc-cl --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/compilers/msvc-cl .claude/skills/msvc-cl && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
msvc-cl
GitHub stars
252
Token cost
~1.3k tokens
SKILL.md length
446 words
Files
2 (incl. references)
Skills in repo
138
Repo updated
First seen
Licence
MIT

At a glance

MSVC cl.exe and clang-cl skill for Windows C/C++ projects. An agent skill from mohitmishra786/low-level-dev-skills.

  • Works in 7 steps: Set up the environment → Flag translation: GCC → MSVC → Runtime library selection → …
  • Configuring Visual Studio builds
  • SKILL.md covers Purpose, Triggers, Workflow and Related skills
  • Calls cmake

What it does

Msvc Cl is an agent skill from mohitmishra786/low-level-dev-skills. MSVC cl.exe and clang-cl skill for Windows C/C++ projects. Use when configuring Visual Studio builds, MSBuild, or clang-cl as a drop-in MSVC replacement. Covers translating GCC/Clang flags to MSVC equivalents, runtime library selection, Windows SDK setup, and diagnosing MSVC-specific errors. Activates on queries about cl.exe, clang-cl, /O flags, /MT vs /MD, PDB files, Windows ABI, or MSVC project settings.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/flags.md`).

It sits in Writing & Content, covering Translation. It works with C++. The repository describes itself as: A curated suite of AI agent skills for systems and low-level programming with C/C++, Rust, and Zig toolchains, covering compilers, debuggers, profilers, build systems…. The licence is MIT.

When your agent uses it

  • Configuring Visual Studio builds
  • Clang-cl as a drop-in MSVC replacement

Example prompts

  • “/msvc-cl”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Set up the environment
  2. Flag translation: GCC → MSVC
  3. Runtime library selection
  4. clang-cl
  5. PDB files and debugging
  6. Common LNK errors
  7. Useful cl.exe flags

What it can do on your machine

Read from SKILL.md and the folder at commit bdc5847. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • cmake

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • learn.microsoft.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Msvc Cl loads about 1.3k tokens when it runs, and up to ~2k if it reads all its reference files. Until then it costs about 104 tokens; SKILL.md has 446 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~104
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from mohitmishra786/low-level-dev-skills at commit bdc5847, republished under its MIT licence (© mohitmishra786). 446 words, ~1,278 tokens.

Download SKILL.mdSave it as .claude/skills/msvc-cl/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
msvc-cl
description
MSVC cl.exe and clang-cl skill for Windows C/C++ projects. Use when configuring Visual Studio builds, MSBuild, or clang-cl as a drop-in MSVC replacement. Covers translating GCC/Clang flags to MSVC equivalents, runtime library selection, Windows SDK setup, and diagnosing MSVC-specific errors. Activates on queries about cl.exe, clang-cl, /O flags, /MT vs /MD, PDB files, Windows ABI, or MSVC project settings.

MSVC cl.exe and clang-cl

Purpose

Guide agents through Windows C/C++ compilation: MSVC cl.exe, clang-cl as MSVC-compatible driver, MSBuild project settings, and runtime library choices.

Triggers

  • "How do I compile with MSVC from the command line?"
  • "What is the MSVC equivalent of -O2?"
  • "/MT vs /MD — which do I use?"
  • "How do I use clang-cl instead of cl.exe?"
  • "I'm getting LNK errors on Windows"
  • "How do I generate PDB files?"

Workflow

1. Set up the environment

MSVC requires the Visual Studio environment variables. Use the Developer Command Prompt or set up manually:

cmd
REM x64 native
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"

REM x86 cross (host x64, target x86)
"...\vcvarsamd64_x86.bat"

REM Check compiler version
cl /?

In CMake, use the "Visual Studio 17 2022" generator or pass -DCMAKE_GENERATOR="Visual Studio 17 2022".

2. Flag translation: GCC → MSVC
GCC/ClangMSVC cl.exeNotes
-O0/OdDebug, no optimisation
-O1/O1Minimise size
-O2/O2Maximise speed
-O3/OxFull optimisation
-Os/OsFavour size
-g/ZiPDB debug info
-g (embedded)/Z7Debug info in object file
-Wall/W3 or /W4Warning level
-Werror/WXWarnings as errors
-std=c++17/std:c++17Standard selection
-DFOO=1/DFOO=1Preprocessor define
-I path/I pathInclude path
-c/cCompile only (no link)
-o out/Fe:out.exe or /Fo:out.objOutput file
-shared/LDBuild DLL
-fPIC(implicit on Windows)Not needed on Windows
-flto/GL (compile) + /LTCG (link)Whole program optimisation
3. Runtime library selection

This is the most common source of LNK errors on Windows.

FlagRuntimeUse case
/MDMSVCRT.dll (dynamic)Release, DLL linkage (recommended default)
/MDdMSVCRTd.dll (debug dynamic)Debug builds
/MTStatic CRTStandalone exe; avoid mixing with DLLs
/MTdStatic CRT debugDebug + static

Rule: All objects and libraries in a link must use the same runtime. Mixing /MT and /MD causes LNK2038: mismatch detected.

Show full SKILL.md (170 more words)Show less
4. clang-cl

clang-cl is Clang's MSVC-compatible driver. It accepts cl.exe-style flags and can replace cl.exe in most MSBuild/CMake projects.

cmd
REM Install: part of LLVM Windows release or VS "LLVM" component

REM Basic usage (MSVC-style flags)
clang-cl /O2 /std:c++17 /MD src.cpp /Fe:prog.exe

REM Pass Clang-native flags with /clang:
clang-cl /O2 /clang:-Rpass=inline src.cpp /Fe:prog.exe

REM Use in CMake
cmake -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl ..

Minimum Clang version for MSVC STL compatibility: Clang 8+. For C++20 features with MSVC STL: Clang 14+.

Source: https://learn.microsoft.com/en-us/cpp/build/clang-support-msbuild

5. PDB files and debugging
cmd
REM Compile with /Zi (external PDB) and /Fd (PDB name)
cl /Zi /Fd:prog.pdb /O2 src.cpp /link /DEBUG

REM /Z7: debug info embedded in .obj (no separate PDB for objects)
cl /Z7 /O2 src.cpp /link /DEBUG /PDB:prog.pdb

For WinDbg or VS debugger, ensure the PDB is alongside the executable or set the symbol path.

6. Common LNK errors
ErrorCauseFix
LNK2019: unresolved externalMissing .libAdd library in project settings or /link foo.lib
LNK2038: mismatch detected for 'RuntimeLibrary'Mixed /MT and /MDUnify all to /MD or /MT
LNK1104: cannot open file 'foo.lib'Library not in search pathAdd path via /LIBPATH: or LIB env var
LNK2005: already definedMultiple definitionsUse __declspec(selectany) or check for duplicate definitions
LNK4098: defaultlib 'LIBCMT' conflictsRuntime mismatchExplicitly pass /NODEFAULTLIB:LIBCMT or unify runtimes
7. Useful cl.exe flags
cmd
REM Preprocessed output
cl /P src.cpp       # produces src.i

REM Assembly output
cl /FA /O2 src.cpp  # produces src.asm (MASM syntax)
cl /FAs             # interleave source + asm

REM Show include files
cl /showIncludes src.cpp

REM Compiler version
cl /?  2>&1 | findstr /i "version"

For flag details, see references/flags.md.

  • Use skills/compilers/clang for clang-cl's Clang-native diagnostics
  • Use skills/build-systems/cmake for CMake toolchain configuration on Windows
  • Use skills/debuggers/lldb or WinDbg for debugging MSVC-built binaries

© mohitmishra786, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/compilers/msvc-cl of mohitmishra786/low-level-dev-skills.

  • SKILL.md
  • references/flags.md

Open the folder on GitHubat commit bdc5847

Compare with similar skills

Msvc Cl next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Msvc Cl compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Msvc Cl this skillmohitmishra786/low-level-dev-skills252—~1.3kAutomated safety check: PassMIT
Translationdoxygen/doxygen6.6k—~5.2kAutomated safety check: PassGPL-2.0
Smooth Translationopenforecast-org/smooth107—~2.2kAutomated safety check: PassLGPL-2.1
C Cpp To Lean4 TranslatorArabelaTso/Skills-4-SE253—~2.5kAutomated safety check: PassApache-2.0
Code TranslationArabelaTso/Skills-4-SE253—~3.1kAutomated safety check: PassApache-2.0
Cpp To Dafny TranslatorArabelaTso/Skills-4-SE253—~2.9kAutomated safety check: PassApache-2.0

Similar skills

  • Translation

    doxygen/doxygen

    Keeps all Doxygen and Doxywizard translations up to date across three mechanisms: translator C++ classes (src/translatorxx.h), Qt .ts locale files for the Doxywizard GUI (addon/doxywizard/i18n/)…

    6.6k GitHub stars~5.2k tokensUpdated 10 days ago
    Writing & ContentAuto-check passed
  • Smooth Translation

    openforecast-org/smooth

    Port a feature from the R smooth package to the Python port, or check how an R name maps to Python.

    107 GitHub stars~2.2k tokensUpdated yesterday
    Writing & ContentAuto-check passed
  • C Cpp To Lean4 Translator

    ArabelaTso/Skills-4-SE

    Translate C or C++ programs into equivalent Lean4 code, preserving program semantics and ensuring the generated code is well-typed, executable, and can run successfully.

    253 GitHub stars~2.5k tokensUpdated 1 mo ago
    Writing & ContentAuto-check passed
  • Code Translation

    ArabelaTso/Skills-4-SE

    Convert code between programming languages while preserving functionality and semantics.

    253 GitHub stars~3.1k tokensUpdated 1 mo ago
    Writing & ContentAuto-check passed
  • Cpp To Dafny Translator

    ArabelaTso/Skills-4-SE

    Translate C/C++ programs to equivalent Dafny code while preserving semantics and ensuring verification.

    253 GitHub stars~2.9k tokensUpdated 1 mo ago
    Writing & ContentAuto-check passed
  • D2mcpp Authoring

    mcpp-community/d2mcpp

    Authoring conventions, design principles, and file formats for the d2mcpp (D2X) Modern C++ tutorial project.

    1.8k GitHub stars~2.7k tokensUpdated 2 mo ago
    DevelopmentAuto-check passed

More from mohitmishra786/low-level-dev-skills

All 138 skills in this repo
  • ARM and AArch64 Assembly

    mohitmishra786/low-level-dev-skills

    Guides reading and writing AArch64 and ARM Thumb assembly: compiler output, inline asm, registers, the AAPCS calling convention and NEON or SVE basics.

    252 GitHub stars~1.9k tokensUpdated 3 mo ago
    Auto-check passed
  • RISC-V Assembly Guide

    mohitmishra786/low-level-dev-skills

    Reference for RISC-V assembly on RV32 and RV64: register names and calling convention, extension naming, GCC and Clang inline asm, and QEMU with GDB debugging.

    252 GitHub stars~1.8k tokensUpdated 3 mo ago
    Auto-check passed
  • x86-64 Assembly Reference

    mohitmishra786/low-level-dev-skills

    Explains x86-64 registers, the System V AMD64 calling convention, and how to read compiler-generated or inline assembly.

    252 GitHub stars~1.5k tokensUpdated 3 mo ago
    Auto-check passed
  • Bazel for C and C++

    mohitmishra786/low-level-dev-skills

    Guides your agent through Bazel for C/C++ projects: BUILD files, Bzlmod dependencies, toolchain registration, remote execution, dependency queries and sandbox debugging.

    252 GitHub stars~1.5k tokensUpdated 3 mo ago
    Auto-check passed
  • Binary Hardening

    mohitmishra786/low-level-dev-skills

    Binary hardening skill for security-hardened C/C++ builds. An agent skill from mohitmishra786/low-level-dev-skills.

    252 GitHub stars~2k tokensUpdated 3 mo ago
    Auto-check passed
  • Binutils

    mohitmishra786/low-level-dev-skills

    GNU binutils skill for binary manipulation and analysis. An agent skill from mohitmishra786/low-level-dev-skills.

    252 GitHub stars~1.2k tokensUpdated 3 mo ago
    Auto-check passed

Works with

Questions about Msvc Cl

What does Msvc Cl do?

MSVC cl.exe and clang-cl skill for Windows C/C++ projects. An agent skill from mohitmishra786/low-level-dev-skills. Msvc Cl is an agent skill from mohitmishra786/low-level-dev-skills.exe and clang-cl skill for Windows C/C++ projects.

When should I use Msvc Cl?

Msvc Cl fits situations like: configuring Visual Studio builds; clang-cl as a drop-in MSVC replacement.

How do I install Msvc Cl in Claude Code?

Run `npx skills add mohitmishra786/low-level-dev-skills --skill msvc-cl -a claude-code`. Or copy the skill folder (skills/compilers/msvc-cl in mohitmishra786/low-level-dev-skills) into .claude/skills/msvc-cl in your project. Claude Code loads it when a task matches its description.

How do I install Msvc Cl in Codex?

Run `npx skills add mohitmishra786/low-level-dev-skills --skill msvc-cl -a codex`. Or copy the skill folder (skills/compilers/msvc-cl in mohitmishra786/low-level-dev-skills) into .agents/skills/msvc-cl in your project. Codex loads it when a task matches its description.

Can I use Msvc Cl in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mohitmishra786/low-level-dev-skills --skill msvc-cl -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/msvc-cl, .gemini/skills/msvc-cl, .github/skills/msvc-cl and .opencode/skills/msvc-cl in your project.

What does Msvc Cl need to run?

Going by SKILL.md and its folder, Msvc Cl needs the command-line tools its instructions call (cmake).

Does Msvc Cl access the network?

SKILL.md names 1 domain. As links in the text: learn.microsoft.com. This is read from the text; nothing was executed.

Is Msvc Cl safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Msvc Cl use?

Msvc Cl is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Msvc Cl use?

About 1.3k tokens (SKILL.md is roughly 5.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 682 tokens, read only when the agent opens those files.

What are the alternatives to Msvc Cl?

Skills that share tags, products or a category with Msvc Cl: Translation (doxygen/doxygen, 6.6k stars), Smooth Translation (openforecast-org/smooth, 107 stars), C Cpp To Lean4 Translator (ArabelaTso/Skills-4-SE, 253 stars) and Code Translation (ArabelaTso/Skills-4-SE, 253 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Msvc Cl?

mohitmishra786 (a GitHub user) maintains it in mohitmishra786/low-level-dev-skills, which has 252 GitHub stars. The repository holds 138 skills in this directory. The repository was last updated on June 27, 2026.

Source: mohitmishra786/low-level-dev-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.