[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69B6FDXF7VSNN4VH8MJ2230":3,"skill-same:01M69B6FDXF7VSNN4VH8MJ2230":70},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":41,"linkOnly":42,"markdownContent":43,"markdownBody":44,"frontMatter":45,"refName":46,"commitSha":47,"skillDirectory":48,"forksCount":49,"repositoryHtmlUrl":50,"repositoryHomepageUrl":51,"ownerHtmlUrl":52,"ownerBlogUrl":53,"ownerDescription":54,"updatedAt":55,"install":56,"resources":69},"01M69B6FDXF7VSNN4VH8MJ2230","presets-vs-kits",null,"Use when writing or reviewing code that must work in both CMake Presets and Kits\u002FVariants modes. Covers configure, build, test, environment, and generator paths. Triggers: \"presets vs kits\", \"useCMakePresets\", \"works in both modes\".","microsoft\u002Fvscode-cmake-tools","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M69B5ZETEJ3WM91BA2ZYMTYT",1688,"MIT","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode-cmake-tools\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fpresets-vs-kits\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],"presets vs kits","use","when","variants","modes","generator","reviewing code","paths","triggers","build","writing","environment","work","configure","code","cmake","test","2026-11-10 10:12:30",false,"---\nname: presets-vs-kits\ndescription: >\n  Use when writing or reviewing code that must work in both CMake Presets and\n  Kits\u002FVariants modes. Covers configure, build, test, environment, and generator\n  paths. Triggers: \"presets vs kits\", \"useCMakePresets\", \"works in both modes\".\n---\n\n# Presets Mode vs Kits\u002FVariants Mode\n\nGuide for writing code that works correctly in **both** operating modes of CMake Tools. Any shared code path (configure, build, test, environment, targets) **must** handle both modes.\n\n---\n\n## The two modes\n\nCMake Tools operates in one of two mutually exclusive modes per project folder:\n\n| | **Presets mode** | **Kits\u002Fvariants mode** |\n|---|---|---|\n| **Source of truth** | `CMakePresets.json` \u002F `CMakeUserPresets.json` | Kit selection + variant settings |\n| **When active** | `cmake.useCMakePresets` is `'always'`, or `'auto'` and preset files exist | `cmake.useCMakePresets` is `'never'`, or `'auto'` and no preset files exist |\n| **Runtime check** | `CMakeProject.useCMakePresets === true` | `CMakeProject.useCMakePresets === false` |\n\n### How the mode is determined\n\n```typescript\n\u002F\u002F src\u002Fconfig.ts\nexport type UseCMakePresets = 'always' | 'never' | 'auto';\n\n\u002F\u002F src\u002FcmakeProject.ts — doUseCMakePresetsChange()\nconst usingCMakePresets =\n    useCMakePresets === 'always' ? true :\n    useCMakePresets === 'never'  ? false :\n    await this.hasPresetsFiles();          \u002F\u002F 'auto' — check for CMakePresets.json\n```\n\nThe resolved boolean is stored in `CMakeProject._useCMakePresets` and exposed via the `useCMakePresets` getter.\n\n---\n\n## When you MUST handle both modes\n\n**Any shared code path** that touches configure, build, test, environment setup, or target resolution must branch on the mode. Omitting the check for one mode is a latent bug.\n\n### The canonical branching pattern\n\n```typescript\n\u002F\u002F From src\u002FcmakeProject.ts — configure validation (real code)\nif (!this.useCMakePresets) {\n    \u002F\u002F Kits mode: require a kit and variant\n    if (!this.activeKit) {\n        await vscode.window.showErrorMessage(\n            localize('cannot.configure.no.kit', 'Cannot configure: No kit is active for this CMake project')\n        );\n        return { exitCode: -1, resultType: ConfigureResultType.Other };\n    }\n    if (!this.variantManager.haveVariant) {\n        await this.variantManager.selectVariant();\n    }\n} else if (!this.configurePreset) {\n    \u002F\u002F Presets mode: require a configure preset\n    void vscode.window.showErrorMessage(\n        localize('cannot.configure.no.config.preset', 'Cannot configure: No configure preset is active')\n    );\n    return { exitCode: -1, resultType: ConfigureResultType.Other };\n}\n```\n\n### Another real example — default build targets\n\n```typescript\n\u002F\u002F src\u002FcmakeProject.ts — getDefaultBuildTargets()\nif (this.useCMakePresets && (!defaultTarget || defaultTarget === this.targetsInPresetName)) {\n    targets = this.buildPreset?.targets;\n}\nif (!this.useCMakePresets && !defaultTarget) {\n    targets = await this.allTargetName;\n}\n```\n\n---\n\n## Canonical data access — Presets mode\n\n### Merged preset tree\n\nUse `PresetsController` (in `src\u002Fpresets\u002FpresetsController.ts`) to access the merged, expanded preset tree. **Never** re-parse `CMakePresets.json` or `CMakeUserPresets.json` directly — the controller handles `include` chaining, expansion, and file watching.\n\n### Active presets on `CMakeProject`\n\n```typescript\nCMakeProject.configurePreset   \u002F\u002F ConfigurePreset | null\nCMakeProject.buildPreset       \u002F\u002F BuildPreset | null\nCMakeProject.testPreset        \u002F\u002F TestPreset | null\nCMakeProject.packagePreset     \u002F\u002F PackagePreset | null\nCMakeProject.workflowPreset    \u002F\u002F WorkflowPreset | null\n```\n\n### Preset types\n\nAll preset interfaces are defined in `src\u002Fpresets\u002Fpreset.ts`. Key types include `ConfigurePreset`, `BuildPreset`, `TestPreset`, `PackagePreset`, `WorkflowPreset`.\n\n### CMake executable override\n\nIn presets mode, the configure preset can override the CMake path:\n\n```typescript\n\u002F\u002F src\u002FcmakeProject.ts\nconst overWriteCMakePathSetting = this.useCMakePresets\n    ? this.configurePreset?.cmakeExecutable\n    : undefined;\n```\n\n---\n\n## Canonical data access — Kits\u002Fvariants mode\n\n### Active kit\n\n```typescript\nCMakeProject.activeKit   \u002F\u002F Kit | null — from src\u002Fkits\u002Fkit.ts\n```\n\n### Kit environment\n\n```typescript\nimport { effectiveKitEnvironment } from '@cmt\u002Fkits\u002Fkit';\n\n\u002F\u002F Used in src\u002Fdrivers\u002FcmakeDriver.ts:\nthis._kitEnvironmentVariables = await effectiveKitEnvironment(kit, this.expansionOptions);\n```\n\nThis merges compiler paths, VS Developer Environment (on Windows via `vcvarsall.bat`), and any custom `environmentVariables` defined on the kit.\n\n### SpecialKits — always check before treating a kit as a real compiler\n\n```typescript\n\u002F\u002F src\u002Fkits\u002Fkit.ts\nexport enum SpecialKits {\n    ScanForKits = '__scanforkits__',\n    Unspecified = '__unspec__',\n    ScanSpecificDir = '__scan_specific_dir__',\n}\n```\n\nThese sentinel values appear in the kit list as UI actions. Before using `kit.compilers`, `kit.toolchainFile`, or `kit.preferredGenerator`, check:\n\n```typescript\nif (kit.name === SpecialKits.Unspecified || kit.name === SpecialKits.ScanForKits) {\n    \u002F\u002F Not a real kit — skip compiler logic\n}\n```\n\n### Kit interface\n\n```typescript\n\u002F\u002F src\u002Fkits\u002Fkit.ts (key fields)\nexport interface Kit extends KitDetect {\n    name: string;\n    description?: string;\n    preferredGenerator?: CMakeGenerator;\n    cmakeSettings?: Record\u003Cstring, string | string[]>;\n    compilers?: Record\u003Cstring, string>;\n    toolchainFile?: string;\n    environmentVariables?: Record\u003Cstring, string>;\n    environmentSetupScript?: string;\n    visualStudio?: string;\n    visualStudioArchitecture?: string;\n}\n```\n\n### Variant handling\n\nVariants (`src\u002Fkits\u002Fvariant.ts`) provide build type and other CMake variable overrides in kits mode. The `VariantManager` is only initialized when **not** using presets:\n\n```typescript\n\u002F\u002F src\u002FcmakeProject.ts\nif (!this.useCMakePresets) {\n    await this.variantManager.initialize(this.folderName);\n    await drv.setVariant(this.variantManager.activeVariantOptions, ...);\n}\n```\n\n---\n\n## Generator handling in both modes\n\n### Multi-config vs single-config\n\nAlways check the generator before any build-type logic:\n\n```typescript\nimport { isMultiConfGeneratorFast } from '@cmt\u002Futil';\n\n\u002F\u002F src\u002Futil.ts\nexport function isMultiConfGeneratorFast(gen?: string): boolean {\n    return gen !== undefined\n        && (gen.includes('Visual Studio') || gen.includes('Xcode') || gen.includes('Multi-Config'));\n}\n```\n\n| Generator type | Examples | Build type mechanism |\n|---|---|---|\n| **Single-config** | Ninja, Unix Makefiles | `CMAKE_BUILD_TYPE` set at **configure** time |\n| **Multi-config** | Visual Studio, Xcode, Ninja Multi-Config | `--config \u003Ctype>` passed at **build** time |\n\n### Exception: `cmake.setBuildTypeOnMultiConfig`\n\nWhen this setting is `true`, `CMAKE_BUILD_TYPE` is also set at configure time for multi-config generators (used by some CMake scripts that read it). See `src\u002Fdrivers\u002FcmakeDriver.ts`.\n\n### How it shows up in both modes\n\n- **Presets mode**: The generator is embedded in `configurePreset.generator`. The preset may also set `CMAKE_BUILD_TYPE` in `cacheVariables` or use `configuration` in the build preset.\n- **Kits mode**: The generator comes from `Kit.preferredGenerator.name` or is auto-detected. Build type comes from the active variant.\n\n---\n\n## Common mistakes\n\n### 1. Testing only one mode\n\nIf you add or change behavior in a shared code path, you must verify it works in **both** presets mode and kits\u002Fvariants mode. Many bugs ship because the developer only tested with presets (or only with kits).\n\n### 2. Assuming single-config generator\n\nNever assume `CMAKE_BUILD_TYPE` is the way to set the build configuration. Always check `isMultiConfGeneratorFast()` first.\n\n```typescript\n\u002F\u002F ❌ Wrong — breaks with Visual Studio \u002F Ninja Multi-Config\nargs.push(`-DCMAKE_BUILD_TYPE=${buildType}`);\n\n\u002F\u002F ✅ Correct\nif (!isMultiConfGeneratorFast(generator)) {\n    args.push(`-DCMAKE_BUILD_TYPE=${buildType}`);\n}\n```\n\n### 3. Reading preset files directly\n\n```typescript\n\u002F\u002F ❌ Wrong — bypasses include chaining, expansion, and caching\nconst presets = JSON.parse(fs.readFileSync('CMakePresets.json', 'utf8'));\n\n\u002F\u002F ✅ Correct — use the PresetsController\nconst configPreset = this.configurePreset;\n```\n\n### 4. Not checking for SpecialKits sentinel values\n\n```typescript\n\u002F\u002F ❌ Wrong — crashes when kit is '__unspec__' or '__scanforkits__'\nconst compiler = kit.compilers?.['C'];\n\n\u002F\u002F ✅ Correct\nif (kit.name !== SpecialKits.Unspecified && kit.name !== SpecialKits.ScanForKits) {\n    const compiler = kit.compilers?.['C'];\n}\n```\n\n### 5. Forgetting the driver instance guard\n\nIn kits mode, no driver is created without a kit:\n\n```typescript\n\u002F\u002F src\u002FcmakeProject.ts\nif (!this.useCMakePresets && !this.activeKit) {\n    log.debug(localize('not.starting.no.kits', 'Not starting CMake driver: no kit selected'));\n    return null;\n}\n```\n\nAlways handle `null` driver returns in calling code.\n\n---\n\n## Testing checklist\n\n- [ ] Verified in **presets mode** (create a `CMakePresets.json` with configure + build presets)\n- [ ] Verified in **kits\u002Fvariants mode** (remove preset files or set `cmake.useCMakePresets: \"never\"`)\n- [ ] Verified with a **single-config** generator (Ninja or Unix Makefiles)\n- [ ] Verified with a **multi-config** generator (Visual Studio, Ninja Multi-Config, or Xcode)\n- [ ] `SpecialKits` sentinel values handled (no crash on `__unspec__` kit)\n- [ ] `null` driver \u002F `null` preset \u002F `null` kit cases handled gracefully\n- [ ] Windows, macOS, and Linux path differences considered\n\n---\n\nSee also: [`.github\u002Fcopilot-instructions.md`](..\u002Fcopilot-instructions.md) for project-wide conventions.\n","# Presets Mode vs Kits\u002FVariants Mode\n\nGuide for writing code that works correctly in **both** operating modes of CMake Tools. Any shared code path (configure, build, test, environment, targets) **must** handle both modes.\n\n---\n\n## The two modes\n\nCMake Tools operates in one of two mutually exclusive modes per project folder:\n\n| | **Presets mode** | **Kits\u002Fvariants mode** |\n|---|---|---|\n| **Source of truth** | `CMakePresets.json` \u002F `CMakeUserPresets.json` | Kit selection + variant settings |\n| **When active** | `cmake.useCMakePresets` is `'always'`, or `'auto'` and preset files exist | `cmake.useCMakePresets` is `'never'`, or `'auto'` and no preset files exist |\n| **Runtime check** | `CMakeProject.useCMakePresets === true` | `CMakeProject.useCMakePresets === false` |\n\n### How the mode is determined\n\n```typescript\n\u002F\u002F src\u002Fconfig.ts\nexport type UseCMakePresets = 'always' | 'never' | 'auto';\n\n\u002F\u002F src\u002FcmakeProject.ts — doUseCMakePresetsChange()\nconst usingCMakePresets =\n    useCMakePresets === 'always' ? true :\n    useCMakePresets === 'never'  ? false :\n    await this.hasPresetsFiles();          \u002F\u002F 'auto' — check for CMakePresets.json\n```\n\nThe resolved boolean is stored in `CMakeProject._useCMakePresets` and exposed via the `useCMakePresets` getter.\n\n---\n\n## When you MUST handle both modes\n\n**Any shared code path** that touches configure, build, test, environment setup, or target resolution must branch on the mode. Omitting the check for one mode is a latent bug.\n\n### The canonical branching pattern\n\n```typescript\n\u002F\u002F From src\u002FcmakeProject.ts — configure validation (real code)\nif (!this.useCMakePresets) {\n    \u002F\u002F Kits mode: require a kit and variant\n    if (!this.activeKit) {\n        await vscode.window.showErrorMessage(\n            localize('cannot.configure.no.kit', 'Cannot configure: No kit is active for this CMake project')\n        );\n        return { exitCode: -1, resultType: ConfigureResultType.Other };\n    }\n    if (!this.variantManager.haveVariant) {\n        await this.variantManager.selectVariant();\n    }\n} else if (!this.configurePreset) {\n    \u002F\u002F Presets mode: require a configure preset\n    void vscode.window.showErrorMessage(\n        localize('cannot.configure.no.config.preset', 'Cannot configure: No configure preset is active')\n    );\n    return { exitCode: -1, resultType: ConfigureResultType.Other };\n}\n```\n\n### Another real example — default build targets\n\n```typescript\n\u002F\u002F src\u002FcmakeProject.ts — getDefaultBuildTargets()\nif (this.useCMakePresets && (!defaultTarget || defaultTarget === this.targetsInPresetName)) {\n    targets = this.buildPreset?.targets;\n}\nif (!this.useCMakePresets && !defaultTarget) {\n    targets = await this.allTargetName;\n}\n```\n\n---\n\n## Canonical data access — Presets mode\n\n### Merged preset tree\n\nUse `PresetsController` (in `src\u002Fpresets\u002FpresetsController.ts`) to access the merged, expanded preset tree. **Never** re-parse `CMakePresets.json` or `CMakeUserPresets.json` directly — the controller handles `include` chaining, expansion, and file watching.\n\n### Active presets on `CMakeProject`\n\n```typescript\nCMakeProject.configurePreset   \u002F\u002F ConfigurePreset | null\nCMakeProject.buildPreset       \u002F\u002F BuildPreset | null\nCMakeProject.testPreset        \u002F\u002F TestPreset | null\nCMakeProject.packagePreset     \u002F\u002F PackagePreset | null\nCMakeProject.workflowPreset    \u002F\u002F WorkflowPreset | null\n```\n\n### Preset types\n\nAll preset interfaces are defined in `src\u002Fpresets\u002Fpreset.ts`. Key types include `ConfigurePreset`, `BuildPreset`, `TestPreset`, `PackagePreset`, `WorkflowPreset`.\n\n### CMake executable override\n\nIn presets mode, the configure preset can override the CMake path:\n\n```typescript\n\u002F\u002F src\u002FcmakeProject.ts\nconst overWriteCMakePathSetting = this.useCMakePresets\n    ? this.configurePreset?.cmakeExecutable\n    : undefined;\n```\n\n---\n\n## Canonical data access — Kits\u002Fvariants mode\n\n### Active kit\n\n```typescript\nCMakeProject.activeKit   \u002F\u002F Kit | null — from src\u002Fkits\u002Fkit.ts\n```\n\n### Kit environment\n\n```typescript\nimport { effectiveKitEnvironment } from '@cmt\u002Fkits\u002Fkit';\n\n\u002F\u002F Used in src\u002Fdrivers\u002FcmakeDriver.ts:\nthis._kitEnvironmentVariables = await effectiveKitEnvironment(kit, this.expansionOptions);\n```\n\nThis merges compiler paths, VS Developer Environment (on Windows via `vcvarsall.bat`), and any custom `environmentVariables` defined on the kit.\n\n### SpecialKits — always check before treating a kit as a real compiler\n\n```typescript\n\u002F\u002F src\u002Fkits\u002Fkit.ts\nexport enum SpecialKits {\n    ScanForKits = '__scanforkits__',\n    Unspecified = '__unspec__',\n    ScanSpecificDir = '__scan_specific_dir__',\n}\n```\n\nThese sentinel values appear in the kit list as UI actions. Before using `kit.compilers`, `kit.toolchainFile`, or `kit.preferredGenerator`, check:\n\n```typescript\nif (kit.name === SpecialKits.Unspecified || kit.name === SpecialKits.ScanForKits) {\n    \u002F\u002F Not a real kit — skip compiler logic\n}\n```\n\n### Kit interface\n\n```typescript\n\u002F\u002F src\u002Fkits\u002Fkit.ts (key fields)\nexport interface Kit extends KitDetect {\n    name: string;\n    description?: string;\n    preferredGenerator?: CMakeGenerator;\n    cmakeSettings?: Record\u003Cstring, string | string[]>;\n    compilers?: Record\u003Cstring, string>;\n    toolchainFile?: string;\n    environmentVariables?: Record\u003Cstring, string>;\n    environmentSetupScript?: string;\n    visualStudio?: string;\n    visualStudioArchitecture?: string;\n}\n```\n\n### Variant handling\n\nVariants (`src\u002Fkits\u002Fvariant.ts`) provide build type and other CMake variable overrides in kits mode. The `VariantManager` is only initialized when **not** using presets:\n\n```typescript\n\u002F\u002F src\u002FcmakeProject.ts\nif (!this.useCMakePresets) {\n    await this.variantManager.initialize(this.folderName);\n    await drv.setVariant(this.variantManager.activeVariantOptions, ...);\n}\n```\n\n---\n\n## Generator handling in both modes\n\n### Multi-config vs single-config\n\nAlways check the generator before any build-type logic:\n\n```typescript\nimport { isMultiConfGeneratorFast } from '@cmt\u002Futil';\n\n\u002F\u002F src\u002Futil.ts\nexport function isMultiConfGeneratorFast(gen?: string): boolean {\n    return gen !== undefined\n        && (gen.includes('Visual Studio') || gen.includes('Xcode') || gen.includes('Multi-Config'));\n}\n```\n\n| Generator type | Examples | Build type mechanism |\n|---|---|---|\n| **Single-config** | Ninja, Unix Makefiles | `CMAKE_BUILD_TYPE` set at **configure** time |\n| **Multi-config** | Visual Studio, Xcode, Ninja Multi-Config | `--config \u003Ctype>` passed at **build** time |\n\n### Exception: `cmake.setBuildTypeOnMultiConfig`\n\nWhen this setting is `true`, `CMAKE_BUILD_TYPE` is also set at configure time for multi-config generators (used by some CMake scripts that read it). See `src\u002Fdrivers\u002FcmakeDriver.ts`.\n\n### How it shows up in both modes\n\n- **Presets mode**: The generator is embedded in `configurePreset.generator`. The preset may also set `CMAKE_BUILD_TYPE` in `cacheVariables` or use `configuration` in the build preset.\n- **Kits mode**: The generator comes from `Kit.preferredGenerator.name` or is auto-detected. Build type comes from the active variant.\n\n---\n\n## Common mistakes\n\n### 1. Testing only one mode\n\nIf you add or change behavior in a shared code path, you must verify it works in **both** presets mode and kits\u002Fvariants mode. Many bugs ship because the developer only tested with presets (or only with kits).\n\n### 2. Assuming single-config generator\n\nNever assume `CMAKE_BUILD_TYPE` is the way to set the build configuration. Always check `isMultiConfGeneratorFast()` first.\n\n```typescript\n\u002F\u002F ❌ Wrong — breaks with Visual Studio \u002F Ninja Multi-Config\nargs.push(`-DCMAKE_BUILD_TYPE=${buildType}`);\n\n\u002F\u002F ✅ Correct\nif (!isMultiConfGeneratorFast(generator)) {\n    args.push(`-DCMAKE_BUILD_TYPE=${buildType}`);\n}\n```\n\n### 3. Reading preset files directly\n\n```typescript\n\u002F\u002F ❌ Wrong — bypasses include chaining, expansion, and caching\nconst presets = JSON.parse(fs.readFileSync('CMakePresets.json', 'utf8'));\n\n\u002F\u002F ✅ Correct — use the PresetsController\nconst configPreset = this.configurePreset;\n```\n\n### 4. Not checking for SpecialKits sentinel values\n\n```typescript\n\u002F\u002F ❌ Wrong — crashes when kit is '__unspec__' or '__scanforkits__'\nconst compiler = kit.compilers?.['C'];\n\n\u002F\u002F ✅ Correct\nif (kit.name !== SpecialKits.Unspecified && kit.name !== SpecialKits.ScanForKits) {\n    const compiler = kit.compilers?.['C'];\n}\n```\n\n### 5. Forgetting the driver instance guard\n\nIn kits mode, no driver is created without a kit:\n\n```typescript\n\u002F\u002F src\u002FcmakeProject.ts\nif (!this.useCMakePresets && !this.activeKit) {\n    log.debug(localize('not.starting.no.kits', 'Not starting CMake driver: no kit selected'));\n    return null;\n}\n```\n\nAlways handle `null` driver returns in calling code.\n\n---\n\n## Testing checklist\n\n- [ ] Verified in **presets mode** (create a `CMakePresets.json` with configure + build presets)\n- [ ] Verified in **kits\u002Fvariants mode** (remove preset files or set `cmake.useCMakePresets: \"never\"`)\n- [ ] Verified with a **single-config** generator (Ninja or Unix Makefiles)\n- [ ] Verified with a **multi-config** generator (Visual Studio, Ninja Multi-Config, or Xcode)\n- [ ] `SpecialKits` sentinel values handled (no crash on `__unspec__` kit)\n- [ ] `null` driver \u002F `null` preset \u002F `null` kit cases handled gracefully\n- [ ] Windows, macOS, and Linux path differences considered\n\n---\n\nSee also: [`.github\u002Fcopilot-instructions.md`](..\u002Fcopilot-instructions.md) for project-wide conventions.\n",{"name":5,"description":7},"main","e0969b894e56d8ea5e6641d48a82e5ba3babcc38",".github\u002Fskills\u002Fpresets-vs-kits",559,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode-cmake-tools","https:\u002F\u002Faka.ms\u002Fvscode-cmake-tools","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-11 06:52:38",{"source":8,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add microsoft\u002Fvscode-cmake-tools --skill presets-vs-kits",{"tool":62,"command":63},"bunx","bunx skills add microsoft\u002Fvscode-cmake-tools --skill presets-vs-kits",{"tool":65,"command":66},"pnpm","pnpm dlx skills add microsoft\u002Fvscode-cmake-tools --skill presets-vs-kits","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode-cmake-tools\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fpresets-vs-kits\u002FSKILL.md",true,[],[71,97,115,151,169,186],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":78,"publishedAt":41},"01M69B6J924HHBDH1G30RG9DT3","validation-project","Creates a validation project for testing a specific vscode-cmake-tools pull request. Use this skill when asked to create a validation project, test a PR, validate a pull request, or set up a PR validation environment. The skill creates a structured project directory with documentation, metadata, and checklists for systematically validating PR changes.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode-cmake-tools\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fvalidation-project\u002FSKILL.md",[77],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[79,80,81,82,83,40,84,85,86,87,88,39,89,90,91,92,35,25,93,94,95,96,26],"validation project","validation","project","testing","directory","vscode","validate","documentation","pr","pull request","create","pull","SET","Tools","up","with","for","request",{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":41},"01M69B6CQT3K9X5HSCQ10ZX54T","pr-readiness","Verify that a pull request into microsoft\u002Fvscode-cmake-tools meets contribution requirements. Use when preparing, reviewing, or finalizing a PR to check for a descriptive title, a meaningful description, a properly formatted CHANGELOG entry, code correctness, regression risks, adherence to existing patterns, and whether documentation updates are needed.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode-cmake-tools\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fpr-readiness\u002FSKILL.md",[],[87,104,105,9,84,86,88,39,38,106,90,107,108,25,109,110,111,112,95,113,114,26],"pr readiness","readiness","changelog","regression","check","requirements","contribution","correctness","updates","Existing","title",{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":136,"publishedAt":41},"01M69B69SPZQSR8YNAZMMNERE4","backend-tests","Use when writing unit tests under test\u002Funit-tests\u002Fbackend\u002F*.test.ts that run in Node with Mocha+Chai and no VS Code API. For pure logic: parsers, helpers, env merging. Triggers: \"backend test\", \"unit test\", \"mocha test without vscode\".","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode-cmake-tools\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fbackend-tests\u002FSKILL.md",[121,122,125,128,133],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":123,"categoryName":124,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":126,"categoryName":127,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":129,"categoryName":130,"taxonomyType":131,"taxonomyTypeDesc":132},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",{"categoryNo":134,"categoryName":135,"taxonomyType":131,"taxonomyTypeDesc":132},"01JBSEEDCAT000000000000036","内容创作者",[137,138,139,34,40,84,140,141,38,142,143,144,25,32,145,146,147,148,95,149,26,150],"backend tests","backend","tests","unit tests","run","api","parsers","node","chai","unit","unit-tests","mocha","unit test","helpers",{"skillNo":152,"name":153,"nameZh":6,"description":154,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":155,"categories":156,"keywords":157,"publishedAt":41},"01M69B67VACEFYYR745B6WBF4J","add-setting","Use when adding a new cmake.* configuration setting. Touches package.json (contributes.configuration), package.nls.json, src\u002Fconfig.ts (interface + getter), docs\u002Fcmake-settings.md, and CHANGELOG.md. Triggers: \"add setting\", \"new setting\", \"add configuration\".","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode-cmake-tools\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fadd-setting\u002FSKILL.md",[],[158,159,160,161,39,106,162,163,164,165,25,166,32,167,26,168],"add setting","add","docs","config","package","src","json","settings","configuration","interface","new",{"skillNo":170,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":173,"categories":174,"keywords":175,"publishedAt":41},"01M69B64R9S01TGSH17SSHW9V6","add-diagnostic-parser","Use when adding a compiler or tool output parser for the Problems panel. Touches src\u002Fdiagnostics\u002F\u003Cname>.ts, src\u002Fdiagnostics\u002Fbuild.ts, package.json (cmake.enabledOutputParsers), and package.nls.json. Triggers: \"add parser\", \"new diagnostic parser\", \"parse compiler output\".","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode-cmake-tools\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fadd-diagnostic-parser\u002FSKILL.md",[],[176,177,159,178,179,180,39,162,181,163,182,25,33,32,183,184,95,185,26,168],"add diagnostic parser","parser","add diagnostic","diagnostic","diagnostics","compiler","tool","panel","output","parse",{"skillNo":187,"name":188,"nameZh":6,"description":189,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":190,"categories":191,"keywords":192,"publishedAt":41},"01M69B622J8838QDVAQMQ0854Z","add-command","Use when adding a new cmake.* command to CMake Tools. Touches package.json (contributes.commands), package.nls.json, src\u002Fextension.ts (funs array), and CHANGELOG.md. Triggers: \"add command\", \"register command\", \"new command palette entry\".","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode-cmake-tools\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fadd-command\u002FSKILL.md",[],[193,194,159,39,195,106,162,92,163,164,25,196,32,197,198,199,200,26,168],"add command","command","command palette","commands","extension","register","palette","entry"]