dynamo-codebase-patterns

Discovers and enforces non-obvious architectural patterns in the Dynamo C# codebase during code review.

2.0k|679|Updated Feb 9, 2012
One-click install
npx skills add https://github.com/DynamoDS/Dynamo --skill dynamo-codebase-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dynamo-codebase-patterns
Source: https://github.com/DynamoDS/Dynamo/tree/main/.claude/skills/dynamo-codebase-patterns
Command: npx skills add https://github.com/DynamoDS/Dynamo --skill dynamo-codebase-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers unfamiliar with the Dynamo repository repeatedly make the same structural mistakes — misusing WebView2 initialization, skipping RegisterAllPorts(), or reading workspace state on the scheduler thread — because these patterns are not derivable from standard .NET documentation. This Skill maintains a living catalog of Dynamo-specific patterns and enforces them during PR review.

Core Features & Use Cases

  • Pattern Catalog Management: Maintains up to 40 pattern files in patterns/ with a lifecycle of candidate, confirmed, legacy, and retired statuses, promoted after 3 validated sightings.
  • Scan Mode: Scans one subsystem at a time (e.g. DynamoCore/Nodes, Engine, ViewExtensions) and proposes 3-5 candidate patterns that pass a four-question filter for Dynamo-specificity.
  • Review Mode: Loads only domain-matching confirmed patterns when reviewing a PR, flags deviations with concrete corrected examples, and never flags unconfirmed candidates.
  • Use Case: When reviewing a PR that adds a new AsyncTask subclass, the Skill checks it against dp-006 (two-phase init) and dp-014 (CanMergeWithCore) and flags any scheduler-thread access to live workspace state.

Quick Start

Ask the agent to review the changed files in this pull request against the confirmed patterns in the patterns folder for their subsystem.

Frequently Asked Questions about dynamo-codebase-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review a Dynamo PR for architectural pattern violations?

Identify which subsystem the changed files belong to, load only the confirmed patterns from the patterns folder whose domain matches, and check each applicable pattern. Flag deviations with the pattern name, why it applies, and a concrete corrected code example.

What qualifies as a codebase pattern worth documenting?

A pattern must pass four checks: not derivable from standard .NET docs, references Dynamo-specific types like NodeModel or IScheduler, would trip up an outside developer on first attempt, and appears consistently across multiple files as intentional design rather than legacy debt.

How does a candidate pattern become confirmed?

A candidate pattern is promoted to confirmed after it has been validated against three or more real file examples. Each time it is flagged in a PR review, its sightings count increments and the PR is recorded in seen_in.

Why must WebView2 initialization go through DynamoWebView2 instead of EnsureCoreWebView2Async?

DynamoWebView2 wraps initialization with disposal-safe logic that captures the init task, preventing a race condition crash if Dispose is called during async initialization. Calling EnsureCoreWebView2Async directly bypasses this protection, and ConfigureSettings must follow Initialize because CoreWebView2 is null beforehand.

When should a pattern be retired from the catalog?

Retire a pattern when fewer than two files still implement it, or when a migration has replaced all instances with a new form. In the migration case, create the new pattern first and then retire the old one.