Agent skill

property-patterns

MSBuild property definition patterns: conditional defaults, composition/concatenation, path normalization, trailing-slash handling, TFM detection helpers, and evaluation order. USE FOR: diagnosing and fixing property definition issues and shared-property anti-patterns in .props/.csproj; DefineConstants or NoWarn overwritten instead of appended; unconditional assignments that block project-level overrides; unquoted conditions that fail on empty properties; hardcoded paths that break cross-platform builds; setting overridable defaults; property evaluation order and last-write-wins semantics. DO

.NET Platform4,927★ · 1 repos on radarProfile →
claude-codeMIT
Install
npx skills add dotnet/skills --skill property-patterns --agent claude-code

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

Facts
Files in the skill folder: 1
SKILL.md size: 7 KB
Bundled scripts: none
Path: plugins/dotnet-msbuild/skills/property-patterns/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 Property Patterns Canonical property definition and manipulation patterns from the MSBuild repository. ## Conditional Defaults — The Foundational Pattern Set a property **only if not already set**, allowing callers to override: ```xml <PropertyGroup> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> <Platform Condition="'$(Platform)' == ''">AnyCPU</Platform> <BuildInParallel Condition="'$(BuildInParallel)' == ''">true</BuildInParallel> </PropertyGroup> ``` ### Rules - Always quote both sides: `'$(Prop)' == ''` - In `.props`: creates overridable defaults. In `.targets`: creates fallbacks. - Properties without the condition **cannot be overridden** by earlier imports. ## Nested Conditional Groups Group related properties under a shared condition: ```xml <PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))"> <DefineConstants>$(DefineConstants);FEATURE_APARTMENT_STATE</DefineConstants> <DefineConstants>$(DefineConstants);FEATURE_APM</DefineConstants> <FeatureAppDomain>true</FeatureAppDomain> </PropertyGroup> <PropertyGroup Condition="'$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)'))' == '.NETCoreApp'"> <NetCoreBuild>true</Net

What's inside
Steps it walks through
  1. Conditional Defaults — The Foundational Pattern
  2. Rules
  3. Nested Conditional Groups
  4. Composition — Semicolon Concatenation
  5. Path Normalization and Trailing Slashes
  6. Preferred path functions
  7. Target Framework Detection Helpers
  8. Guard Properties
  9. Feature Gating by MSBuild Version
  10. Fallback Chains
  11. Last Write Wins — Evaluation Order
  12. Common Pitfalls
More from skills
All skills →
About this skill
What does the property-patterns skill do?

MSBuild property definition patterns: conditional defaults, composition/concatenation, path normalization, trailing-slash handling, TFM detection helpers, and evaluation order. USE FOR: diagnosing and fixing property definition issues and shared-property anti-patterns in .props/.csproj; DefineConstants or NoWarn overwritten instead of appended; unconditional assignments that block project-level overrides; unquoted conditions that fail on empty properties; hardcoded paths that break cross-platform builds; setting overridable defaults; property evaluation order and last-write-wins semantics. DO

How do I install it?

Run `npx skills add dotnet/skills --skill property-patterns --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