Agent skill · Design & Presentation

extension-points

Guide for MSBuild extensibility: CustomBefore/CustomAfter hooks, wildcard imports with alphabetic ordering, import gating with control properties, NuGet package build extension layout (build/buildTransitive), and the MicrosoftCommonPropsHasBeenImported guard. USE FOR: diagnosing and fixing MSBuild import and hook patterns, reviewing and fixing extension point anti-patterns in Directory.Build files, fixing missing Exists() guards on imports that break fresh clones, fixing NuGet package hooks being silently dropped instead of appended, making build targets extensible for other projects, injectin

dotnetgithub.com/dotnetGitHub ↗
claude-codeMIT
Install
npx skills add dotnet/skills --skill extension-points --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 12 KB
Bundled scripts: none
Path: plugins/dotnet-msbuild/skills/extension-points/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 4,927
Language: C#
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# MSBuild Extension Points How the MSBuild pipeline provides hooks for SDKs, NuGet packages, repos, and users to inject custom logic. ## CustomBefore / CustomAfter Hooks Every major `.targets` file defines import hooks: ```xml <PropertyGroup> <CustomBeforeMicrosoftCommonTargets Condition="'$(CustomBeforeMicrosoftCommonTargets)' == ''"> $(MSBuildExtensionsPath)\v$(MSBuildToolsVersion)\Custom.Before.Microsoft.Common.targets </CustomBeforeMicrosoftCommonTargets> </PropertyGroup> <Import Project="$(CustomBeforeMicrosoftCommonTargets)" Condition="'$(CustomBeforeMicrosoftCommonTargets)' != '' and Exists('$(CustomBeforeMicrosoftCommonTargets)')"/> <!-- ... core targets ... --> <Import Project="$(CustomAfterMicrosoftCommonTargets)" Condition="'$(CustomAfterMicrosoftCommonTargets)' != '' and Exists('$(CustomAfterMicrosoftCommonTargets)')"/> ``` ### Rules - Default path includes version (`v$(MSBuildToolsVersion)`) for side-by-side installations. - Always check `Exists()`. The file may not be present on every machine. - **Append** to the property (don't overwrite) to chain multiple hooks: ```xml <PropertyGroup> <CustomBeforeMicrosoftCommonTargets> $(CustomBeforeMicrosoftCommonTargets);$(MSBui

What's inside
Steps it walks through
  1. CustomBefore / CustomAfter Hooks
  2. Rules
  3. Wildcard Import Directories
  4. Key paths
  5. Import Gating — Control Properties
  6. Available control properties
  7. NuGet Package Build Extension Layout
  8. Forwarding chain: buildTransitive/ → build/ → shared
  9. Source Tree vs Packed Layout
  10. Implication for reviewers
  11. Import Guard Pattern
  12. Directory.Build Discovery
  13. Creating Your Own Extension Point
  14. Common Pitfalls
More from skills
All skills →
About this skill
What does the extension-points skill do?

Guide for MSBuild extensibility: CustomBefore/CustomAfter hooks, wildcard imports with alphabetic ordering, import gating with control properties, NuGet package build extension layout (build/buildTransitive), and the MicrosoftCommonPropsHasBeenImported guard. USE FOR: diagnosing and fixing MSBuild import and hook patterns, reviewing and fixing extension point anti-patterns in Directory.Build files, fixing missing Exists() guards on imports that break fresh clones, fixing NuGet package hooks being silently dropped instead of appended, making build targets extensible for other projects, injectin

How do I install it?

Run `npx skills add dotnet/skills --skill extension-points --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From dotnet/skills, a repository with 4,927 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going