clarioncom-webview2-validate
Validates WebView2 COM controls for RegFree COM compliance, WebView2 configuration, and wwwroot structure
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Validates WebView2 COM controls for RegFree COM compliance, WebView2 configuration, and wwwroot structure
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Analyze Clarion code generation traces to find recurring failure patterns. Uses evidence-gating (2+ occurrences) to identify real issues. Suggests improvements for the /clarion skill. Triggers on '/clarion-analyze', 'analyze clarion traces', 'what mistakes am I making'.
Benchmark Clarion code generation quality by running test prompts and scoring the output. Measures improvement over time. Triggers on '/clarion-benchmark', 'benchmark clarion', 'test clarion code quality'.
Convert a Clarion dictionary from one file driver to another (e.g., TopSpeed to SQLite). Exports the dictionary to .dctx, transforms driver settings, regenerates GUIDs, creates a new .dct from blank template, and prepares for import. User must perform the final import manually in the IDE.
Create Clarion IDE addins with proper project structure, templates, and SharpDevelop integration. Use when creating new IDE tools, pads, embeditor toolbar buttons, or menu commands for the Clarion IDE.
Clarion language programming reference with syntax rules, data types, control structures, Windows API integration patterns, and template-authoring gotchas (#AT,
Compile C# COM projects for Clarion using MSBuild with correct paths, error handling, and build verification. Supports public releases with changelog management. Auto-applies for building .NET Framework COM components. Verification steps use parallel execution.
基于 SOC 职业分类
| name | clarioncom-webview2-validate |
| description | Validates WebView2 COM controls for RegFree COM compliance, WebView2 configuration, and wwwroot structure |
| version | 1.0.0 |
powershell -ExecutionPolicy Bypass -Command "& ([Environment]::GetFolderPath('ApplicationData') + '\ClarionCOM\scripts\clarioncom-env.ps1') home"
This skill validates WebView2-based COM controls for correct configuration, dependencies, and deployment readiness.
Interface File (IControlName.cs)
[ComVisible(true)] attribute present[Guid("...")] attribute with valid GUID[InterfaceType(ComInterfaceType.InterfaceIsDual)] attribute[DispId(n)] with sequential numbersEvents Interface File (IControlNameEvents.cs)
[ComVisible(true)] attribute present[Guid("...")] attribute with valid GUID (different from main interface)[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)] attribute[DispId(n)] with sequential numbersImplementation File (ControlName.cs)
[ComVisible(true)] attribute present[Guid("...")] attribute with valid GUID (different from interfaces)[ProgId("Namespace.ClassName")] attribute[ClassInterface(ClassInterfaceType.None)] attribute[ComSourceInterfaces(typeof(IControlNameEvents))] attributeAssemblyInfo.cs
[assembly: ComVisible(true)] attribute[assembly: Guid("...")] with valid TypeLib GUID{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}<clrClass> element (NOT <comClass>)clsid matches Class GUIDprogid matches ProgId attributename is fully qualified (Namespace.ClassName)runtimeVersion="v4.0.30319" presentthreadingModel="Apartment" presentprocessorArchitecture="x86" in assemblyIdentitytlbid matches TypeLib GUIDwwwroot/ folder exists in project rootwwwroot/css/ folder existswwwroot/js/ folder existswwwroot/controls/ folder existswwwroot/controls/{name}/index.html existswwwroot/controls/{name}/app.js exists (or equivalent)Check index.html contains:
sendToCSharp function or equivalentCheck control implementation for:
SetVirtualHostNameToFolderMapping calllocalapp.clarioncontrols (or project-specific)[ComVisible(true)][ClassInterface(ClassInterfaceType.AutoDual)]AddHostObjectToScript call in WebView2 initializationCheck for proper async initialization:
OnHandleCreated override for initializationEnsureCoreWebView2Async callAfter build, verify in output folder:
After deployment, verify in Clarion folder:
=== WebView2 COM Control Validation Report ===
Project: [ProjectName]
Path: [ProjectPath]
--- Standard COM Validation ---
[PASS] Interface GUID valid: {guid}
[PASS] Events GUID valid: {guid}
[PASS] Class GUID valid: {guid}
[PASS] TypeLib GUID valid: {guid}
[PASS] All GUIDs are unique
[PASS] Manifest uses clrClass
[PASS] ProgId matches: Namespace.ClassName
--- WebView2 Validation ---
[PASS] WebView2 NuGet package referenced
[PASS] wwwroot folder exists
[PASS] wwwroot/controls/index.html exists
[PASS] Virtual host mapping configured
[PASS] Host object implemented
[PASS] WebView2 initialization pattern correct
--- Deployment Validation ---
[PASS] DLL built successfully
[PASS] WebView2Loader.dll present
[PASS] wwwroot deployed to output
[PASS] Files copied to Clarion folder
=== Validation Complete ===
Issues Found: 0
Status: READY FOR DEPLOYMENT
Remediation: Ensure Microsoft.Web.WebView2 NuGet package is installed and build target copies native DLLs
Remediation: Add to .csproj:
<ItemGroup>
<Content Include="wwwroot\**\*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
Remediation: Add in WebView2 initialization:
_webView.CoreWebView2.SetVirtualHostNameToFolderMapping(
"localapp.clarioncontrols",
wwwrootPath,
CoreWebView2HostResourceAccessKind.Allow);
Remediation: Ensure host object class has [ComVisible(true)] and [ClassInterface(ClassInterfaceType.AutoDual)] attributes
Remediation: Replace <comClass> with <clrClass> and add required attributes (name, runtimeVersion)