Route gh-aw workflow design/create/debug/upgrade requests to the right prompts.
日本語の概要は準備中です。原文の説明を表示しています。
Create, modify, debug, or review Windows Forms applications only when the request contains a concrete Windows Forms marker. USE FOR: WinForms, Windows Forms, System.Windows.Forms, WinForms Form or UserControl designer files (*.Designer.cs or *.Designer.vb), Visual Studio WinForms Designer, TableLayoutPanel, BindingSource, DataGridView, Control.InvokeAsync, component-tray ownership, or custom control serialization. DO NOT USE FOR: WPF or WPF XAML, including Window.InputBindings, KeyBinding, commands, or DataContext; .NET MAUI; Avalonia; or any request where none of the listed Windows Forms markers is present.
インストール方法を見るインストールする前に、エージェントに与えられる指示の中身を確認できます。
Implement WinForms changes that compile, behave correctly at runtime, and remain editable in the
Visual Studio Designer. Treat InitializeComponent and *.Designer.* as a serialization format,
not ordinary application code; keep behavior in the main partial class and verify designer
usability whenever the environment permits.
Before editing, list the workspace root and locate any task-specific validator, test script, or documented verification command. Read its scenario selector and required arguments before choosing an implementation. After editing:
A successful build never substitutes for an available layout, binding, serialization, or designer-safety validator. Do not finish after merely reading a validator or after a build succeeds.
Use the repository's actual command and arguments; the sequence should look like:
pwsh -NoProfile -File <task-validator.ps1> <scenario-arguments>
dotnet build <project> --nologo
Use this skill for:
Form, UserControl, or custom control.Do not use it to:
| Input | Required | How to obtain it |
|---|---|---|
| Requested UI behavior or defect | Yes | Use the user's request and reproduce the symptom when possible. |
| Project language and target framework | Yes | Inspect the project file; do not assume modern .NET or C#. |
| Existing Form/UserControl partial files | Yes | Find the main file, designer file, and matching .resx. |
| Repository conventions | Yes | Inspect nearby WinForms types, build scripts, analyzers, and package management. |
| Designer availability | No | Determine whether a compatible Visual Studio WinForms Designer can be opened. |
There are two code contexts:
| Context | Files | Rule |
|---|---|---|
| Designer serialization | *.Designer.cs, *.Designer.vb, InitializeComponent | Use simple, deterministic statements the designer can parse and regenerate. |
| Application behavior | Main partial class, services, view models | Use language features supported by the project's TFM and language version. |
In InitializeComponent and designer files:
Controls,
Items, Columns, or another serialized collection through a local variable.if, loops, switch, try/catch, lock, await, goto),
local functions, expression-bodied logic, collection expressions, null-conditional or
null-coalescing expressions, or other runtime decision logic.InitializeComponent and Dispose.Form/UserControl must have a usable parameterless construction path unless the project uses
an established custom designer pattern.BeginInit/EndInit, SuspendLayout/ResumeLayout, and container ownership balanced.Friend WithEvents fields and prefer Handles clauses in the main file.A safe InitializeComponent sequence is:
IContainer when owned components require it.BeginInit and SuspendLayout methods.EndInit, ResumeLayout, and PerformLayout where appropriate.Move anything more complex to the main partial class, usually after InitializeComponent has run.
Use the symptom to choose one WinForms-specific repair. Do not list several plausible patterns when the existing project and failure identify one.
| Symptom or request | Do | Never | Verify |
|---|---|---|---|
| A Form/UserControl builds but the Designer cannot instantiate it | Preserve the runtime constructor, add a designer-usable parameterless path, and defer dependency use until runtime load with an explicit design/null guard | Construct production services, open files, or query data from the designer path | The runtime composition root still supplies the real dependency; the design path reaches InitializeComponent without invoking it |
| Controls/components disappear, duplicate, or fail after Designer save/reopen | Restore the generated field/collection shape and balance every BeginInit/EndInit and SuspendLayout/ResumeLayout pair | Patch the symptom in OnLoad or move serialized controls into local variables | Save, close, reopen, and inspect the regenerated diff |
A designer-created Timer, BindingSource, image list, or similar component outlives the Form | Create the components container and pass it to the component constructor | Add ad hoc disposal while leaving designer ownership inconsistent | Closing the Form disposes the container-owned component and the component remains designer-managed |
| Adding/removing list items does not refresh a bound WinForms list control | Use BindingList<T> or the repository's adapter that raises WinForms list-change notifications | Treat ObservableCollection<T> as a drop-in WinForms DataSource | Mutate the list after binding and observe the control update |
| Nested content clips at DPI, font, or localization changes | Inspect AutoSize, AutoSizeMode, Dock, MinimumSize, MaximumSize, and row/column styles from the leaf through every parent; remove the actual growth cap while preserving intentional minimums; also inspect sibling controls positioned against the growing chain and keep them in responsive layout | Assume AutoSize = true is sufficient, increase one fixed Size, bypass a parent container, or leave a sibling where expanded content can overlap it | Exercise resize plus the relevant DPI/font/text expansion |
| UI work is posted but completion/errors are lost | Put the operation in a Task-returning method that callers/tests can await; let the required async void event handler do only await RefreshAsync(); update controls on the captured WinForms context or await InvokeAsync when execution can be off-context; restore control state in finally | Keep the whole operation inside async void, use _ =, BeginInvoke, a dead cancellation catch, or an application-wide exception hook as the normal path | Await the task-returning method through success and failure; verify the UI entry point delegates to it |
| Text must be localizable | Use the existing .resx and ComponentResourceManager.ApplyResources serialization pattern | Leave fallback UI text hard-coded in InitializeComponent | Build, switch culture when possible, and perform a Designer save/reopen |
| A VB app needs startup, single-instance, or unhandled-UI hooks | Extend ApplicationEvents.vb; qualify Microsoft.VisualBasic.ApplicationServices event-argument types when ambiguous; restore, activate, and bring the existing MainForm forward; log e.Exception; set e.ExitApplication = True explicitly | Invent Program.vb, add Sub Main, replace generated startup, or leave post-error continuation implicit | The configured StartupObject and generated application file remain unchanged, no new entry point exists, and the final report states the exit choice |
| Review finds no actual designer defect | Leave tracked project/source files byte-for-byte unchanged and report why the suspicious construct is harmless | Clean up warnings, reformat generated code, or modernize unrelated syntax | Run the narrow available check and focused build; confirm the source diff is empty |
| The workspace contains a task-specific validator or test script | Run the narrow repository-provided check after editing and before the generic build; treat its failure as evidence that the change is incomplete | Skip the specialized check because the project compiles, or claim a Designer round trip from static validation | Report the exact validator and build commands separately, then state whether runtime UI and Designer round-trip checks were actually available |
.resx for every affected Form/UserControl before
editing. Check base classes and nearby controls for repository conventions.InitializeComponent.For new or substantially revised layouts:
TableLayoutPanel, FlowLayoutPanel, SplitContainer, and nested UserControls over
brittle absolute positioning.AutoSize for caption/single-line rows and columns, Percent for expandable content,
and Absolute only for genuinely fixed-size content.AutoScaleMode. For new forms, choose scaling deliberately based
on the project conventions rather than copying coordinates from another DPI.Panel or GroupBox inside an autosized row can still clip its contents.For dialogs:
AcceptButton, CancelButton, and appropriate DialogResult values.async void event handler resumes on its captured UI synchronization context
after await unless that context was deliberately bypassed. Direct control access there is valid.
Use and await InvokeAsync when code can continue off-context, or when the task/repository contract
explicitly requires a marshaled operation; do not rely on an unawaited post.Control.InvokeAsync overload matching
whether the delegate is synchronous/asynchronous and whether it returns a value. Await the
returned operation; do not create fire-and-forget UI work.async void is acceptable for WinForms event handlers and overrides that must return void,
but catch exceptions around awaited work, handle cancellation intentionally, and surface
unexpected failures through the application's established error path.Application.ThreadException covers UI-thread exceptions; AppDomain.UnhandledException is
primarily a last-chance logging path and does not make continued execution safe.=> new ... or vice versa without confirming lifetime and disposal behavior.For application-wide startup:
Program.cs; VB projects normally use the VB Application Framework and
ApplicationEvents.vb, not a newly invented Program.vb.SystemAware when maintaining the normal .NET WinForms DPI behavior. Use
PerMonitorV2 only when the application is designed and tested for per-monitor scaling.For classic binding:
INotifyPropertyChanged for mutable bound objects and BindingList<T> or an established
adapter for list change notifications.BindingSource as the designer/runtime mediator when that matches the existing design.Binding.Format and Binding.Parse handlers rather than embedding
executable logic in designer code.Binding does not provide a
direct WPF-style mode. Document and test any workaround instead of implying native support.For modern WinForms MVVM APIs, first confirm the TFM contains the requested API:
Control.DataContext for ambient view-model context when available.ButtonBase.Command, ToolStripItem.Command, and CommandParameter when available..datasource and BindingSource pattern and verify it in the Designer.For custom Component/Control properties, choose one intentional CodeDOM serialization policy:
| Policy | Mechanism | Use |
|---|---|---|
| Serialize only when non-default | [DefaultValue(...)] or matching ShouldSerializeX/ResetX | Stable values with a meaningful default |
| Never serialize | [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] | Runtime-only, calculated, or unsupported state |
| Serialize content | DesignerSerializationVisibility.Content plus designer-compatible mutable content | Owned nested objects/collections intentionally edited in the property grid |
Import System.ComponentModel (or fully qualify its attributes). Keep default metadata and runtime
initialization directly aligned: for [DefaultValue(typeof(Color), "Yellow")], initialize the
property or its backing field directly with Color.Yellow; do not hide the actual default behind a
second constant or factory. Do not combine contradictory policies. Test property-grid editing and
save/reload behavior for custom serialization changes.
TabIndex order and verify keyboard-only traversal.DataGridView, icons, and custom painting, verify contrast in every supported
theme rather than assuming dark-mode adaptation.A change is complete only when the checks applicable to the environment are observable:
InitializeComponent contains unsupported runtime logic or unresolved fields,
handlers, resources, or unbalanced layout/initialization calls.If Visual Studio, the Designer, Windows desktop access, a required workload, or a target runtime is unavailable, report that validation as not run, state why, and list the exact checks that did run. A successful build is not evidence that the Designer opens. Do not report the work as fully designer-verified unless the design surface and serialization round trip were actually tested.
If a command fails:
Finish with a concise validation record:
Build: exact command and result.Runtime UI: exercised behavior, or not run with the blocking reason.Designer round trip: Form/UserControl opened, edited, saved, closed, and reopened; or not run
with the blocking reason.Preserved: project policy and generated/startup files intentionally left unchanged.| Pitfall | Corrective rule |
|---|---|
Treating InitializeComponent as normal modern C# | Keep it as simple designer serialization; move decisions and behavior to the main partial class. |
| Putting lambdas or local control variables in generated code | Use class-level fields and named handlers. |
| Editing only one partial file | Read and keep the main file, designer file, .resx, base type, and project metadata consistent. |
| Reformatting the entire designer file | Make a surgical diff that follows generated ordering and style. |
| Assuming a build proves designer health | Open, edit, save, close, and reopen the design surface. |
| Adding constructor dependencies to a designable type | Preserve a designer-usable parameterless path or an established custom designer solution. |
| Fixed-size nested containers clipping controls | Preserve an autosizing chain and test resize plus DPI scaling. |
| Using absolute colors for dark mode without testing | Prefer system colors or explicitly theme and contrast-test custom drawing. |
Treating ObservableCollection<T> as a drop-in WinForms list source | Use BindingList<T> or an adapter that bridges collection and property notifications. |
| Assuming WPF binding or converter features exist | Use WinForms Binding, BindingSource, Format, and Parse; verify TFM-specific APIs. |
| Fire-and-forget UI marshaling or uncaught async event errors | Await InvokeAsync; catch and surface failures in async void UI entry points. |
Inventing Program.vb for a VB application | Use the VB Application Framework and ApplicationEvents.vb conventions. |
| Changing DPI/theme/TFM/package policy during a UI fix | Preserve project policy unless the requested behavior requires and validates the change. |
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Route gh-aw workflow design/create/debug/upgrade requests to the right prompts.
日本語の概要は準備中です。原文の説明を表示しています。
Scans .NET code for ~50 performance anti-patterns across async, memory, strings, collections, LINQ, regex, serialization, and I/O with tiered severity classification. Use when analyzing .NET code for optimization opportunities, reviewing hot paths, or auditing allocation-heavy patterns.
日本語の概要は準備中です。原文の説明を表示しています。
Symbolicate the .NET runtime frames in an Android tombstone file. Extracts BuildIds and PC offsets from the native backtrace, downloads debug symbols from the Microsoft symbol server, and runs llvm-symbolizer to produce function names with source file and line numbers. USE FOR triaging a .NET MAUI or Mono Android app crash from a tombstone, resolving native backtrace frames in libmonosgen-2.0.so or libcoreclr.so to .NET runtime source code, or investigating SIGABRT, SIGSEGV, or other native signals originating from the .NET runtime on Android. DO NOT USE FOR pure Java/Kotlin crashes, managed .NET exceptions that are already captured in logcat, or iOS crash logs. INVOKES Symbolicate-Tombstone.ps1 script, llvm-symbolizer, Microsoft symbol server.
日本語の概要は準備中です。原文の説明を表示しています。
Symbolicate .NET runtime frames in Apple platform .ips crash logs (iOS, tvOS, Mac Catalyst, macOS). Extracts UUIDs and addresses from the native backtrace, locates dSYM debug symbols, and runs atos to produce function names with source file and line numbers. Automatically downloads .dwarf symbols from the Microsoft symbol server using Mach-O UUIDs. USE FOR triaging a .NET MAUI or Mono app crash from an .ips file on any Apple platform, resolving native backtrace frames in libcoreclr or libmonosgen-2.0 to .NET runtime source code, retrieving .ips crash logs from a connected iOS device or iPhone, or investigating EXC_CRASH, EXC_BAD_ACCESS, SIGABRT, or SIGSEGV originating from the .NET runtime. DO NOT USE FOR pure Swift/Objective-C crashes with no .NET components, or Android tombstone files. INVOKES Symbolicate-Crash.ps1 script, atos, dwarfdump, idevicecrashreport.
日本語の概要は準備中です。原文の説明を表示しています。
Analyze assertion quality, depth, variety, and false confidence in existing tests. ALWAYS USE when asked about weak, shallow, trivial, always-true, self-referential, assertion-free, presence/truthiness-only, or insufficiently diverse assertions, including MSTest, Jest, pytest, and Go. DO NOT USE for direct fixes: writing-mstest-tests owns supplied MSTest assertions; code-testing owns new cases. Use test-gap-analysis when asked whether tests would catch a production change, and test-anti-patterns for general severity-ranked audits.
日本語の概要は準備中です。原文の説明を表示しています。
Create or review Blazor components (.razor files) with correct architecture. USE FOR: writing new Blazor components that do NOT involve JavaScript interop, implementing parameters and EventCallback, RenderFragment slots, component lifecycle (OnInitializedAsync, OnParametersSet), async patterns, IAsyncDisposable, CancellationToken, CSS isolation, code-behind. DO NOT USE FOR: creating new projects (use create-blazor-project), JavaScript interop or calling browser APIs from Blazor (use use-js-interop), forms and validation (use collect-user-input), prerendering issues (use support-prerendering), HTTP data fetching patterns (use fetch-and-send-data), coordinating state between unrelated components (use coordinate-components).
日本語の概要は準備中です。原文の説明を表示しています。