Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add christian289/dotnet-with-claudecode --skill wpf-rule-rendering-antipatternsgit clone --depth 1 https://github.com/christian289/dotnet-with-claudecodeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/christian289/dotnet-with-claudecode/wpf-rule-rendering-antipatterns)<a href="https://agentmods.dev/skills/christian289/dotnet-with-claudecode/wpf-rule-rendering-antipatterns"><img src="https://agentmods.dev/badge/skills/christian289/dotnet-with-claudecode/wpf-rule-rendering-antipatterns/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/christian289/dotnet-with-claudecode/wpf-rule-rendering-antipatterns"><img src="https://agentmods.dev/badge/skills/christian289/dotnet-with-claudecode/wpf-rule-rendering-antipatterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00031 | $0.00491 |
| Opus 5.5 | $0.00012 | $0.00196 |
| Sonnet 5.5 | $0.00006 | $0.00098 |
| Haiku 4.5 | $0.00003 | $0.00049 |
Grade A, and why
wpf-rule-rendering-antipatterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
Rendering Anti-Patterns
Common WPF rendering mistakes that cause performance problems or visual corruption.
Anti-Pattern 1: InvalidateVisual() in a Loop
Calling InvalidateVisual() inside a loop schedules a separate render pass for each iteration.
WPF does not coalesce these — each call queues a layout/render cycle, causing frame drops or freezes.
// Prohibited: InvalidateVisual inside a loop
foreach (var item in items)
{
item.Value = ComputeNewValue(item);
InvalidateVisual(); // ← queues N render passes
}
Correct: Batch Update Pattern
Mutate all state first, then invalidate once after the loop completes.
// Correct: one invalidation after all state is updated
foreach (var item in items)
{
item.Value = ComputeNewValue(item);
}
InvalidateVisual(); // ← single render pass
For data-driven scenarios where items notify individually, suppress notifications during bulk update and raise a single reset at the end:
// Correct: bulk update with deferred notification
_suppressNotifications = true;
try
{
foreach (var item in items)
item.Value = ComputeNewValue(item);
}
finally
{
_suppressNotifications = false;
InvalidateVisual();
}
Anti-Pattern 2: Creating Resources in OnRender
OnRender is called on every render pass (layout changes, animations, window resize).
Allocating Brush, Pen, Geometry, or other objects inside OnRender creates garbage on every frame.
// Prohibited: resource allocation inside OnRender
protected override void OnRender(DrawingContext dc)
{
var brush = new SolidColorBrush(Colors.Red); // ← allocated every frame
var pen = new Pen(brush, 1.0); // ← allocated every frame
dc.DrawEllipse(brush, pen, _center, _rx, _ry);
}
Move resource creation to the constructor or a property setter.
See freezable-performance.md for the correct constructor-initialize-and-freeze pattern.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 76 lines · 31 tokens per session scan A 985821bbf1dd
wpf-rule-rendering-antipatterns is a skill published in the GitHub repository christian289/dotnet-with-claudecode (42 stars, last pushed 4mo ago), licensed MIT. It adds 31 tokens to every session and 491 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
wpf-rule-rendering-antipatterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| wpf-rule-rendering-antipatternschristian289/dotnet-with-claudecode | Skill | 42 | 4mo ago | MIT | A | 31 | Claude Code |
| maui-ai-debuggingdotnet/maui-labs | Skill | 244 | yesterday | MIT | A | 62 | Claude Code, Codex |
| chrome-devtools-mcpmanagedcode/dotnet-skills | Skill | 527 | 17d ago | MIT | A | 130 | Claude Code, Codex |
| managedcode-orleans-graphmanagedcode/dotnet-skills | Skill | 527 | 17d ago | MIT | A | 114 | Claude Code, Codex |
| asynkron-profilermanagedcode/dotnet-skills | Skill | 527 | 17d ago | MIT | A | 122 | Claude Code, Codex |
| devflow-connectdotnet/maui-labs | Skill | 244 | yesterday | MIT | A | 53 | Claude Code, Codex |
| roslyn-codelensMarcelRoozekrans/roslyn-codelens-mcp | Skill | 78 | today | MIT | A | 104 | Claude Code |