add-setting
Skill1.7k starsChanged 7 months agoMITView on GitHub
Use when adding a new cmake.* configuration setting. Touches package.json (contributes.configuration), package.nls.json, src/config.ts (interface + getter), docs/cmake-settings.md, and CHANGELOG.md. Triggers: "add setting", "new setting", "add configuration".
Trending
Quiet this year.thin dataabout the whole repository
Who's talking about microsoft/vscode-cmake-tools
- clangd/vscode-clangd“support commands in settings”GitHub · Jun 27, 2020 · 17 reactions
- fredericbonnet/cmake-test-explorer“trigger BuildBeforeRun also by running a test in the testexplorer”GitHub · Mar 12, 2021 · 8 reactions
- twxs/vs.language.cmake“CMake Tools Extension & twxs.cmake extension”GitHub · Jan 29, 2024 · 5 reactions
- disroop/vs-code-conan“configuration provider for cpptools / IntelliSense”GitHub · Jan 14, 2021 · 3 reactions
- microsoft/vscode-cmake-tools-api“Update APIs”GitHub · Aug 1, 2025 · 2 reactions
The biggest 5 of 14 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 14
Talked about on GitHub (14 times).
On GitHub · 14
- Jun 27, 2020support commands in settings — clangd/vscode-clangd17 reactions · 8 comments
- Mar 12, 2021trigger BuildBeforeRun also by running a test in the testexplorer — fredericbonnet/cmake-test-explorer8 reactions
- Jan 29, 2024CMake Tools Extension & twxs.cmake extension — twxs/vs.language.cmake5 reactions · 1 comment
- Jan 14, 2021configuration provider for cpptools / IntelliSense — disroop/vs-code-conan3 reactions · 5 comments
- Aug 1, 2025Update APIs — microsoft/vscode-cmake-tools-api2 reactions · 4 comments
9 more on GitHub
- Nov 15, 2024Add C++26 support (setting values only) — microsoft/vscode-cpptools2 reactions · 3 comments
- Oct 25, 2024cmake-kits.json incorrect CXX compiler — raspberrypi/pico-vscode2 reactions · 3 comments
- Oct 24, 2024Add support for `${command:<name-of-command>}` in c_cpp_properties.json — microsoft/vscode-cpptools2 reactions · 7 comments
- Feb 28, 2022Add support for resolving commands — microsoft/vscode-cpptools2 reactions · 4 comments
- Jun 19, 2025Cleanup standard version handling. — microsoft/vscode-makefile-tools1 reaction
- Mar 5, 2025Pixi builds / VSCode / CMake issues and differences — FreeCAD/FreeCAD1 reaction · 15 comments
- Jan 31, 2025Feature request: Improved variable and command substitution for build directories setting — JacquesLucke/gcov-viewer1 reaction
- Sep 26, 2024Replace CMake grammar — github-linguist/linguist1 reaction
- Sep 16, 2024Newest macos-latest environment update not working for VS Code tests — actions/runner-images1 reaction · 2 comments
In this repository7 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- add-commandSkill
- add-diagnostic-parserSkill
- backend-testsSkill
- presets-vs-kitsSkill
- pr-readinessSkill
- validation-projectSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
Add an entry inside contributes.configuration.properties.
- Very specific: line 63
Add the NLS key (without the % wrappers) and its English text:
- Distinctive: line 124
Add a row to the settings table.
- Very specific: line 143
Add an entry under the current version in CHANGELOG.md, in the Features: or Improvements: section.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Adding a New Configuration Setting
Recipe for adding a new cmake.* setting to CMake Tools.
Files you must touch
| File | What to add |
package.json | Setting declaration in contributes.configuration.properties |
package.nls.json | English description string |
src/config.ts | Interface property + EventEmitter + getter |
docs/cmake-settings.md | Row in the settings table |
CHANGELOG.md | Entry under the current version |
Step 1 — Declare the setting in package.json
Add an entry inside contributes.configuration.properties. Key format is cmake.<settingName>.
// package.json → contributes.configuration.properties
"cmake.myNewSetting": {
"type": "boolean",
"default": false,
"description": "%cmake-tools.configuration.cmake.myNewSetting.description%",
"scope": "resource"
}Rules
type—"boolean","string","number","array","object", or use"oneOf"for union types.default— always required.scope— use"resource"for project-specific settings (most common),"window"for global UI settings,"machine-overridable"for tool paths.descriptionormarkdownDescription— must use an NLS key, never a bare string.- NLS key format:
%cmake-tools.configuration.cmake.<settingName>.description%(wrapped in%).
Real example — cmake.saveBeforeBuild
"cmake.saveBeforeBuild": {
"type": "boolean",
"default": true,
"description": "%cmake-tools.configuration.cmake.saveBeforeBuild.description%",
"scope": "resource"
}Step 2 — Add the English string to package.nls.json
Add the NLS key (without the % wrappers) and its English text:
"cmake-tools.configuration.cmake.myNewSetting.description": "Description of what this setting does."Do not modify any file under
i18n/. Translations are handled separately.
Step 3 — Wire up src/config.ts (three changes)
3a — Add property to ExtensionConfigurationSettings
// src/config.ts → ExtensionConfigurationSettings interface
export interface ExtensionConfigurationSettings {
// ... existing properties ...
myNewSetting: boolean;
}The type must match what you declared in package.json.
3b — Add EventEmitter to the emitters map
// src/config.ts → ConfigurationReader.emitters
private readonly emitters: EmittersOf<ExtensionConfigurationSettings> = {
// ... existing emitters ...
myNewSetting: new vscode.EventEmitter<boolean>(),
};The emitter type parameter must match the interface property type.
3c — Add a getter
Simple pass-through getter (most settings):
get myNewSetting(): boolean {
return this.configData.myNewSetting;
}Getter with transformation logic (e.g., sourceDirectory normalizes to array):
get sourceDirectory(): string[] {
if (!Array.isArray(this.configData.sourceDirectory)) {
return [this.configData.sourceDirectory];
}
return this.configData.sourceDirectory;
}Step 4 — Document in docs/cmake-settings.md
Add a row to the settings table. Keep alphabetical order.
| `cmake.myNewSetting` | Description of what this setting does. | `false` | no |Table columns:
| Column | Content |
| Setting | Backtick-quoted cmake.<name> |
| Description | Plain-English description |
| Default value | Backtick-quoted default |
| Supports substitution | yes if ${variable} expansion applies, otherwise no |
Step 5 — Add a CHANGELOG entry
Add an entry under the current version in CHANGELOG.md, in the Features: or Improvements: section.
Verification checklist
package.json— setting declared with correct type, default, scope, and NLS keypackage.nls.json— English string addedsrc/config.ts— interface property, emitter, and getter all addeddocs/cmake-settings.md— table row added in alphabetical orderCHANGELOG.md— entry addedyarn compilesucceeds (ornpm run compile)- No files under
i18n/were modified
See also: .github/copilot-instructions.md for project-wide conventions.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

