nuget-package-propertychanged-sourcegenerator
Use when simplifying C# view-model property-change notification code, keeping computed properties updated, or reacting to property changes with…
Skill by Cologler
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/cologler-nuget-package-propertychanged-sourcegenerator
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/nuget-package-propertychanged-sourcegenerator
What's inside
- Skill name
nuget-package-propertychanged-sourcegenerator- Description
- Use when simplifying C# view-model property-change notification code, keeping computed properties updated, or reacting to property changes with PropertyChanged.SourceGenerator.
- License
- MIT
- Metadata
- version: PropertyChanged.SourceGenerator 1.1.2 · homepage: https://github.com/canton7/PropertyChanged.SourceGenerator · generated-by: gpt-6 · last-updated: 2026-10-16
- Instructions
- 83 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# PropertyChanged.SourceGenerator
## Prerequisite
For a project-local skill, inspect every project in the consuming repository or solution for `PropertyChanged.SourceGenerator`, including imported package references and resolved dependencies. A central `PackageVersion` entry alone does not prove installation. If no project references it, ask whether to install the package or remove this skill, and wait for the user's choice. Only if installation is chosen, run `dotnet add <project.csproj> package PropertyChanged.SourceGenerator`. This check does not apply to the skill catalog itself.
## When and why
Use this source generator to simplify `INotifyPropertyChanged` boilerplate and improve readability in C# view models, with or without an MVVM framework. Annotated fields replace repetitive property setters, equality checks, and notification calls; dependency declarations and hooks keep related behavior close to the property definitions.
The generator adds source code during compilation; it does not rewrite existing property setters. Version 1.1.x requires Visual Studio 2022 17.3 or .NET SDK 6.0.304 or later to build, without requiring the application to target .NET 6.
## Generate notifying properties
Use a `partial` class and put `[Notify]` on backing fields:
```csharp
using PropertyChanged.SourceGenerator;
public partial class PersonViewModel
{
[Notify] private string _firstName = "";
[Notify] private string _lastName = "";
public string FullName => $"{FirstName} {LastName}";
public void Rename(string firstName, string lastName)
{
// Use the generated setters so bindings and dependent properties are notified.
FirstName = firstName;
LastName = lastName;
}
}
```
By default, `_firstName` becomes a public `FirstName` property with public accessors. Its setter compares values using `EqualityComparer<T>.Default` and raises notifications only when the value differs. The generator supplies missing `INotifyPropertyChanged` infrastructure. Do not redeclare generated properties or write directly to their backing fields when notifications are required.
Use `[Notify("DisplayName")]` to override a property name, or `[Notify(Setter.Private)]` to restrict its setter. XML documentation placed before `[Notify]` is copied to the generated property.
Existing notification implementations and base classes are supported. When generation fails with an existing base class, inspect the generator diagnostic and its event-raising method signature before adding duplicate infrastructure.
## Dependent properties
In the example, changes to either generated name property also notify `FullName`. Automatic detection requires getters to read properties on the same instance, not backing fields; it does not observe properties on other objects.
When dependencies cannot be inferred, choose the direction that best expresses the relationship:
1. Put `[DependsOn(nameof(FirstName), nameof(LastName))]` on the dependent property, such as `FullName`.
2. Alternatively, put `[Notify, AlsoNotify(nameof(FullName))]` on each source backing field.
Use property names, not field names. `[DependsOn(...)]` replaces automatic detection for that property, so list all intended dependencies; empty `[DependsOn]` disables automatic detection for it. These attributes raise notifications, not assignments or recalculations of stored property values.
## React to changes
Define an ordinary method in the same partial class using the generated property name:
```csharp
using PropertyChanged.SourceGenerator;
public partial class SearchViewModel
{
[Notify] private string _query = "";
[Notify(Setter.Private)] private bool _hasResults;
private void OnQueryChanged(string oldValue, string newValue)
{
// Results for the previous query are no longer valid.
HasResults = false;
}
}
```
Supported property hooks are `OnQueryChanged()` or `OnQueryChanged(string oldValue, string newValue)`. For a hook reached through a dependent-property notification, the old value can be `default(T)`.
Before-change notifications are opt-in: the class or a base class must implement `INotifyPropertyChanging`. Its property hooks are `OnQueryChanging()` or `OnQueryChanging(string oldValue)`.
## Further reference
The [project homepage](https://github.com/canton7/PropertyChanged.SourceGenerator) covers details intentionally omitted here: `[IsChanged]` tracking, type-wide hooks, inherited dependency handling, supported base-class event-raising signatures, virtual properties, forwarding attributes with `[PropertyAttribute]`, `.editorconfig` customization, and version-specific build compatibility or workarounds. Consult it only when the task needs those details.
Do not fetch the homepage for information already covered here.From Cologler/Skills, MIT.
More from Cologler/Skills
- 0.570score
justfile-docs
Cologler
Use this skill for questions about using just and justfiles, including writing or reviewing recipes, variables, parameters, dependencies, settings, shell…
SkillAFreshness: AClaude Code +9 - 0.570score
tiged-tool
Cologler
Download a repository snapshot without Git metadata.
SkillAFreshness: AClaude Code +9 - 0.567score
whats-new-in-csharp
Cologler
Consult version-specific C# language and .NET runtime updates when writing or reviewing C# code or discussing new C# or .NET features.
SkillAFreshness: AClaude Code +9 - 0.565score
nuget-package-dependencypropertygenerator
Cologler
Use when simplifying dependency-property or attached-property code in C# UI controls and improving its readability with DependencyPropertyGenerator.
SkillAFreshness: AClaude Code +9 - 0.565score
poethepoet-tool
Cologler
Run and manage Poe the Poet tasks in Python projects.
SkillAFreshness: AClaude Code +9 - 0.565score
httpie-docs
Cologler
Use this skill for questions about HTTPie CLI syntax and behavior, including requests, methods, URLs, query parameters, headers, JSON, forms, file uploads…
SkillAFreshness: AClaude Code +9 - 0.565score
nuget-package-contextfreetasks
Cologler
Use when writing C# async library methods that should avoid capturing the synchronization context without repeating ConfigureAwait(false), or when adapting…
SkillAFreshness: AClaude Code +9 - 0.565score
tlrc-tool
Cologler
Show simplified, community-driven man pages (TL;DR pages) for CLI tools.
SkillAFreshness: AClaude Code +9 - 0.561score
whats-new-in-python
Cologler
Consult version-specific Python syntax, built-in type, and typing updates when writing or reviewing Python code or discussing new Python features.
SkillAFreshness: AClaude Code +9 - 0.558score
cli-toolkit-catalog
Cologler
Read before executing any shell command to consider commonly available CLI tools.
SkillAFreshness: AClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 15, 2026 (14 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- PropertyChanged.SourceGenerator 1.1.2
- License
- MIT
- Repository
- github.com/Cologler/Skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Cologler
- 0.570score
justfile-docs
Cologler
Use this skill for questions about using just and justfiles, including writing or reviewing recipes, variables, parameters, dependencies, settings, shell…
SkillAFreshness: AClaude Code +9 - 0.570score
tiged-tool
Cologler
Download a repository snapshot without Git metadata.
SkillAFreshness: AClaude Code +9 - 0.567score
whats-new-in-csharp
Cologler
Consult version-specific C# language and .NET runtime updates when writing or reviewing C# code or discussing new C# or .NET features.
SkillAFreshness: AClaude Code +9 - 0.565score
nuget-package-dependencypropertygenerator
Cologler
Use when simplifying dependency-property or attached-property code in C# UI controls and improving its readability with DependencyPropertyGenerator.
SkillAFreshness: AClaude Code +9 - 0.565score
poethepoet-tool
Cologler
Run and manage Poe the Poet tasks in Python projects.
SkillAFreshness: AClaude Code +9 - 0.565score
httpie-docs
Cologler
Use this skill for questions about HTTPie CLI syntax and behavior, including requests, methods, URLs, query parameters, headers, JSON, forms, file uploads…
SkillAFreshness: AClaude Code +9
Cite this page
nuget-package-propertychanged-sourcegenerator skill. Agent Mart. https://agentmart.dev/skills/cologler-nuget-package-propertychanged-sourcegenerator (last updated 2026-10-24)