SQL Optimization
github/awesome-copilot
Universal SQL performance optimization assistant for comprehensive query tuning, indexing strategies, and database performance analysis across all SQL databases (MySQL, PostgreSQL, SQL Server…
Guide for optimizing MSBuild incremental builds. An agent skill from microsoft/testfx.
$ npx skills add microsoft/testfx --skill incremental-build -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install microsoft/testfx incremental-build --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/microsoft/testfx.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/incremental-build .claude/skills/incremental-build && rm -rf skills-srcUse ~/.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/
Install the "incremental-build" agent skill from https://github.com/microsoft/testfx/tree/main/.agents/skills/incremental-build into .claude/skills/incremental-build/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "incremental-build", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/microsoft/testfx/tree/main/.agents/skills/incremental-buildType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add microsoft/testfx --skill incremental-build -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install microsoft/testfx incremental-build --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/testfx.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/incremental-build .agents/skills/incremental-build && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "incremental-build" agent skill from https://github.com/microsoft/testfx/tree/main/.agents/skills/incremental-build into .agents/skills/incremental-build/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "incremental-build", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add microsoft/testfx --skill incremental-build -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install microsoft/testfx incremental-build --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/testfx.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/incremental-build .cursor/skills/incremental-build && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "incremental-build" agent skill from https://github.com/microsoft/testfx/tree/main/.agents/skills/incremental-build into .cursor/skills/incremental-build/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "incremental-build", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/microsoft/testfx.git --path .agents/skills/incremental-build--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add microsoft/testfx --skill incremental-build -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install microsoft/testfx incremental-build --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/testfx.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/incremental-build .gemini/skills/incremental-build && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "incremental-build" agent skill from https://github.com/microsoft/testfx/tree/main/.agents/skills/incremental-build into .gemini/skills/incremental-build/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "incremental-build", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install microsoft/testfx incremental-buildInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add microsoft/testfx --skill incremental-build -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/microsoft/testfx.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/incremental-build .github/skills/incremental-build && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "incremental-build" agent skill from https://github.com/microsoft/testfx/tree/main/.agents/skills/incremental-build into .github/skills/incremental-build/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "incremental-build", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add microsoft/testfx --skill incremental-build -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install microsoft/testfx incremental-build --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/testfx.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/incremental-build .opencode/skills/incremental-build && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "incremental-build" agent skill from https://github.com/microsoft/testfx/tree/main/.agents/skills/incremental-build into .opencode/skills/incremental-build/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "incremental-build", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
incremental-buildGuide for optimizing MSBuild incremental builds. An agent skill from microsoft/testfx.
Incremental Build is an agent skill from microsoft/testfx, published by the product's own GitHub organization. Guide for optimizing MSBuild incremental builds. USE FOR: builds slower than expected on subsequent runs, 'nothing changed but it rebuilds anyway', diagnosing why targets re-execute unnecessarily, fixing broken no-op builds. Covers 8 common causes: missing Inputs/Outputs on custom targets, volatile properties in output paths (timestamps/GUIDs), file writes outside tracked Outputs, missing FileWrites registration, glob changes, Visual Studio Fast Up-to-Date Check (FUTDC) issues. Key diagnostic: look for 'Building…
Its SKILL.md is about 3.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
The repository describes itself as: This repository holds the source code of Microsoft.Testing.Platform (MTP), a lightweight alternative to VSTest, as well as MSTest adapter and framework. The licence is MIT.
8 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 44b9dcc. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
dotnetFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Incremental Build loads about 3.7k tokens when it runs. Until then it costs about 194 tokens; SKILL.md has 1,537 words of instructions outside code blocks.
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.
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.
The full file from microsoft/testfx at commit 44b9dcc, republished under its MIT licence (© microsoft). 1,537 words, ~3,659 tokens.
.claude/skills/incremental-build/SKILL.md (or your agent's skills folder).MSBuild's incremental build mechanism allows targets to be skipped when their outputs are already up to date, dramatically reducing build times on subsequent runs.
Inputs and Outputs attributes: MSBuild compares the timestamps of all files listed in Inputs against all files listed in Outputs. If every output file is newer than every input file, the target is skipped entirely.Inputs/Outputs: The target runs every time the build is invoked. This is the default behavior and the most common cause of slow incremental builds.Incremental attribute on targets: Targets can explicitly opt in or out of incremental behavior. Setting Incremental="false" forces the target to always run, even if Inputs and Outputs are specified.<!-- This target is incremental: skipped if Output is newer than all Inputs -->
<Target Name="Transform"
Inputs="@(TransformFiles)"
Outputs="@(TransformFiles->'$(OutputPath)%(Filename).out')">
<!-- work here -->
</Target>
<!-- This target always runs because it has no Inputs/Outputs -->
<Target Name="PrintMessage">
<Message Text="This runs every build" />
</Target>Missing Inputs/Outputs on custom targets — Without both attributes, the target always runs. This is the single most common cause of unnecessary rebuilds.
Volatile properties in Outputs path — If the output path includes something that changes between builds (e.g., a timestamp, build number, or random GUID), MSBuild will never find the previous output and will always rebuild.
File writes outside of tracked Outputs — If a target writes files that aren't listed in its Outputs, MSBuild doesn't know about them. The target may be skipped (because its declared outputs are up to date), but downstream targets may still be triggered.
Missing FileWrites registration — Files created during the build but not registered in the FileWrites item group won't be cleaned by dotnet clean. Over time, stale files can confuse incremental checks.
Glob changes — When you add or remove source files, the item set (e.g., @(Compile)) changes. Since these items feed into Inputs, the set of inputs changes and triggers a rebuild. This is expected behavior but can be surprising.
Property changes — Properties that feed into Inputs or Outputs paths (e.g., $(Configuration), $(TargetFramework)) will cause rebuilds when changed. Switching between Debug and Release is a full rebuild by design.
NuGet package updates — Changing a package version updates project.assets.json and potentially many resolved assembly paths. This changes the inputs to ResolveAssemblyReferences and CoreCompile, triggering a rebuild.
Build server VBCSCompiler cache invalidation — The Roslyn compiler server (VBCSCompiler) caches compilation state. If the server is recycled (timeout, crash, or manual kill), the next build may be slower even though MSBuild's incremental checks pass, because the compiler must repopulate its in-memory caches.
Use binary logs (binlogs) to understand exactly why targets ran instead of being skipped.
dotnet build /bl:first.binlog
dotnet build /bl:second.binlogsecond.binlog.Use the binlog MCP server (Microsoft.AITools.BinlogMcp, exposed under the binlog MCP namespace) to analyze the second binlog:
Replay the second binlog to a diagnostic text log:
dotnet msbuild second.binlog -noconlog -fl -flp:v=diag;logfile=second-full.log;performancesummaryThen search for targets that actually executed:
grep 'Building target\|Target.*was not skipped' second-full.logIn a perfectly incremental build, most targets should be skipped.
Inspect non-skipped targets by looking for their execution messages in the diagnostic log. Check for "out of date" messages that indicate why a target ran.
Look for key messages in the binlog:
"Building target 'X' completely" — means MSBuild found no outputs or all outputs are missing; this is a full target execution."Building target 'X' incrementally" — means some (but not all) outputs are out of date."Skipping target 'X' because all output files are up-to-date" — target was correctly skipped.Search for "is newer than output" messages to find the specific input file that triggered the rebuild:
grep "is newer than output" second-full.logThis reveals exactly which input file's timestamp caused MSBuild to consider the target out of date.
first.binlog and second.binlog side by side in the MSBuild Structured Log Viewer to see what changed.grep 'Target Performance Summary' -A 30 second-full.log to see which targets consumed the most time in the second build — these are your optimization targets.The FileWrites item group is MSBuild's mechanism for tracking files generated during the build. It powers dotnet clean and helps maintain correct incremental behavior.
FileWrites item: Register any file your custom targets create so that dotnet clean knows to remove them. Without this, generated files accumulate across builds and may confuse incremental checks.FileWritesShareable item: Use this for files that are shared across multiple projects (e.g., shared generated code). These files are tracked but not deleted if other projects still reference them.dotnet clean won't remove them, and they may cause stale data issues or confuse up-to-date checks.Add generated files to FileWrites inside the target that creates them:
<Target Name="MyGenerator" Inputs="..." Outputs="$(IntermediateOutputPath)generated.cs">
<!-- Generate the file -->
<WriteLinesToFile File="$(IntermediateOutputPath)generated.cs" Lines="@(GeneratedLines)" />
<!-- Register for clean -->
<ItemGroup>
<FileWrites Include="$(IntermediateOutputPath)generated.cs" />
</ItemGroup>
</Target>Visual Studio has its own up-to-date check (Fast Up-to-Date Check, or FUTDC) that is separate from MSBuild's Inputs/Outputs mechanism. Understanding the difference is critical for diagnosing "it rebuilds in VS but not on the command line" issues.
<PropertyGroup>
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
</PropertyGroup>CopyToOutputDirectory items that are newer than the last buildContent or None items with CopyToOutputDirectory="PreserveNewest" that have been modifiedThe following is a complete example of a well-structured incremental custom target:
<Target Name="GenerateConfig"
Inputs="$(MSBuildProjectFile);@(ConfigInput)"
Outputs="$(IntermediateOutputPath)config.generated.cs"
BeforeTargets="CoreCompile">
<!-- Generate file only if inputs changed -->
<WriteLinesToFile File="$(IntermediateOutputPath)config.generated.cs" Lines="..." />
<ItemGroup>
<FileWrites Include="$(IntermediateOutputPath)config.generated.cs" />
<Compile Include="$(IntermediateOutputPath)config.generated.cs" />
</ItemGroup>
</Target>Key points in this example:
Inputs includes $(MSBuildProjectFile): This ensures the target reruns if the project file itself changes (e.g., a property that affects generation is modified).Inputs includes @(ConfigInput): The actual source files that drive generation.Outputs uses $(IntermediateOutputPath): Generated files go in the obj/ directory, which is managed by MSBuild and cleaned automatically.BeforeTargets="CoreCompile": The generated file is available before the compiler runs.FileWrites registration: Ensures dotnet clean removes the generated file.Compile inclusion: Adds the generated file to the compilation without requiring it to exist at evaluation time.<!-- BAD: No Inputs/Outputs — runs every build -->
<Target Name="BadTarget" BeforeTargets="CoreCompile">
<Exec Command="generate-code.exe" />
</Target>
<!-- BAD: Volatile output path — never finds previous output -->
<Target Name="BadTarget2"
Inputs="@(Compile)"
Outputs="$(OutputPath)gen_$([System.DateTime]::Now.Ticks).cs">
<Exec Command="generate-code.exe" />
</Target>
<!-- GOOD: Stable paths, registered outputs -->
<Target Name="GoodTarget"
Inputs="@(Compile)"
Outputs="$(IntermediateOutputPath)generated.cs"
BeforeTargets="CoreCompile">
<Exec Command="generate-code.exe -o $(IntermediateOutputPath)generated.cs" />
<ItemGroup>
<FileWrites Include="$(IntermediateOutputPath)generated.cs" />
<Compile Include="$(IntermediateOutputPath)generated.cs" />
</ItemGroup>
</Target>MSBuild provides built-in tools to understand what's running and why.
/clp:PerformanceSummary — Appends a summary at the end of the build showing time spent in each target and task. Use this to quickly identify the most expensive operations:
dotnet build /clp:PerformanceSummaryThis shows a table of targets sorted by cumulative time, making it easy to spot targets that shouldn't be running in an incremental build.
/pp:preprocess.xml — Generates a single XML file with all imports inlined, showing the fully evaluated project. This is invaluable for understanding what targets, properties, and items are defined and where they come from:
dotnet msbuild /pp:preprocess.xmlSearch the preprocessed output to find where Inputs and Outputs are defined for any target, or to understand the full chain of imports.
Use both together to understand what's running (PerformanceSummary) and what's imported (/pp), then cross-reference with binlog analysis for a complete picture.
Inputs and Outputs to custom targets — This is the single most impactful change for incremental build performance. Without both attributes, the target runs every time.$(IntermediateOutputPath) for generated files — Files in obj/ are tracked by MSBuild's clean infrastructure and won't leak between configurations.FileWrites — Ensures dotnet clean removes them and prevents stale file accumulation.Returns instead of Outputs when you need to pass items without creating incremental build dependency — Outputs serves double duty: it defines the incremental check AND the items returned from the target. If you only need to pass items to calling targets without affecting incrementality, use Returns instead:<!-- Outputs: affects incremental check AND return value -->
<Target Name="GetFiles" Outputs="@(DiscoveredFiles)">...</Target>
<!-- Returns: only affects return value, no incremental check -->
<Target Name="GetFiles" Returns="@(DiscoveredFiles)">...</Target>© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/incremental-build of microsoft/testfx.
Open the folder on GitHubat commit 44b9dcc
We found 4 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 3 other GitHub owners. This page covers the copy in microsoft/testfx, which our catalogue first saw on October 7, 2026.
Incremental Build 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Incremental Build this skillmicrosoft/testfx | 1k | 3 repos | ~3.7k | Automated safety check: Pass | MIT | |
| SQL Optimizationgithub/awesome-copilot | 40k | 2 repos | ~2.3k | Automated safety check: Pass | MIT | |
| Agent Performance Optimizerruvnet/ruflo | 74k | 2 repos | ~3.6k | Automated safety check: Pass | MIT | |
| Database Optimizerdavila7/claude-code-templates | 32k | 7 repos | ~2.5k | Automated safety check: Pass | MIT | |
| Prompt Optimizeraffaan-m/ECC | 274k | 2 repos | ~2.4k | Automated safety check: Pass | MIT | |
| Cost Optimizeruvnet/ruflo | 74k | — | ~997 | Automated safety check: Notes | MIT |
github/awesome-copilot
Universal SQL performance optimization assistant for comprehensive query tuning, indexing strategies, and database performance analysis across all SQL databases (MySQL, PostgreSQL, SQL Server…
ruvnet/ruflo
Agent skill for performance-optimizer - invoke with $agent-performance-optimizer
davila7/claude-code-templates
Expert database optimizer specializing in modern performance tuning, query optimization, and scalable architectures.
affaan-m/ECC
分析原始提示,识别意图和差距,匹配ECC组件(技能/命令/代理/钩子),并输出一个可直接粘贴的优化提示。仅提供咨询角色——绝不自行执行任务。触发时机:当用户说“优化提示”、“改进我的提示”、“如何编写提示”、“帮我优化这个指令”或明确要求提高提示质量时。中文等效表达同样触发:“优化prompt”、“改进prompt”、“怎么写prompt”、“帮我优化这个指令”。不触发时机:当用户希望直接执行任…
ruvnet/ruflo
Analyze token usage patterns and recommend cost optimizations with estimated savings
JuliusBrussee/caveman
Turns a Caveman report-only optimization observation into one minimal code change and a paired baseline evaluation, after the operator picks which to pursue.
microsoft/testfx
Guide for organizing MSBuild infrastructure with Directory.Build.props, Directory.Build.targets, Directory.Packages.props, and Directory.Build.rsp.
microsoft/testfx
Analyze MSBuild binary logs to diagnose build failures. An agent skill from microsoft/testfx.
microsoft/testfx
Project-wide code coverage and CRAP (Change Risk Anti-Patterns) score analysis for .NET projects.
microsoft/testfx
Guide for modernizing and migrating MSBuild project files to SDK-style format.
microsoft/testfx
Catalog of MSBuild anti-patterns with detection rules and fix recipes.
microsoft/testfx
Guide for interpreting ResolveProjectReferences time in MSBuild performance summaries.
Guide for optimizing MSBuild incremental builds. An agent skill from microsoft/testfx. Incremental Build is an agent skill from microsoft/testfx, published by the product's own GitHub organization. Guide for optimizing MSBuild incremental builds.
Incremental Build fits situations like: : builds slower than expected on subsequent runs; nothing changed but it rebuilds anyway; diagnosing why targets re-execute unnecessarily; fixing broken no-op builds.
Run `npx skills add microsoft/testfx --skill incremental-build -a claude-code`. Or copy the skill folder (.agents/skills/incremental-build in microsoft/testfx) into .claude/skills/incremental-build in your project. Claude Code loads it when a task matches its description.
Run `npx skills add microsoft/testfx --skill incremental-build -a codex`. Or copy the skill folder (.agents/skills/incremental-build in microsoft/testfx) into .agents/skills/incremental-build in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/testfx --skill incremental-build -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/incremental-build, .gemini/skills/incremental-build, .github/skills/incremental-build and .opencode/skills/incremental-build in your project.
Going by SKILL.md and its folder, Incremental Build needs the command-line tools its instructions call (dotnet).
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
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.
Incremental Build is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.7k tokens (SKILL.md is roughly 15k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Incremental Build: SQL Optimization (github/awesome-copilot, 40k stars), Agent Performance Optimizer (ruvnet/ruflo, 74k stars), Database Optimizer (davila7/claude-code-templates, 32k stars) and Prompt Optimizer (affaan-m/ECC, 274k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
microsoft (a GitHub organization, an official publisher) maintains it in microsoft/testfx, which has 1,047 GitHub stars. The repository holds 44 skills in this directory. The repository was last updated on October 7, 2026.
Source: microsoft/testfx on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.