--- name: ansight-install-dotnet description: Use this skill when installing and integrating Ansight into a .NET application, including package installation, runtime initialization, pairing setup, and optional tool registration. --- # Ansight .NET Install Skill Use this skill when a user asks an AI agent to install and integrate Ansight into a .NET application. ## Goal Produce a working local-development Ansight integration for a .NET app, verify the build, and explain any required manual steps such as Studio install, MCP configuration, and pairing. ## Inputs To Confirm - target app type such as .NET MAUI, Xamarin legacy migration, or another .NET host - whether the user wants only the base SDK or additional tool suites - whether developer pairing, QR pairing, or both should be enabled - whether screen views, lifecycle tracking, or app log capture should also be added ## Required Constraints - keep Ansight scoped to local development workflows - do not enable remote tools unless the user explicitly asks for them - do not assume release or app-store builds should ship with Ansight enabled - prefer narrow tool registration and least-privilege access - preserve existing app startup patterns instead of rewriting unrelated initialization code ## Workflow 1. Inspect the current app startup and dependency setup before editing anything. 2. If the user is also setting up an AI agent workflow, remind them to install Ansight Studio and configure their MCP client to use `http://127.0.0.1:45125/mcp/`. 3. Add the base `Ansight` package. 4. Add only the requested tool-suite packages. 5. Initialize Ansight with `Options.CreateBuilder()` and `Runtime.InitializeAndActivate(options)`. 6. Enable host pairing with `.WithHostPairing()`. 7. Add optional features only when requested: - screen views - app lifecycle state tracking - runtime event logging - tool suites 8. If bundled pairing profiles are used, ensure `ansight.json` and any developer-pairing profile are embedded resources with the expected logical names. 9. Keep the integration portable across runtimes. Do not use MAUI-only asset items when embedded resources are sufficient. 10. Build the project or solution and report any remaining manual steps in Studio. ## Default Runtime Shape ```csharp using Ansight; var options = Options.CreateBuilder() .WithHostPairing() .Build(); Runtime.InitializeAndActivate(options); ``` ## Tool-Suite Guidance - add tool packages only when they are actually needed - keep allow-lists narrow for preferences and secure storage - prefer read-only access unless writes are required - explain the security profile of any tool suite the agent enables ## Done Criteria - the app compiles - Ansight is initialized from the app startup path - pairing flow is clearly documented for the user - optional tools or telemetry are only enabled when requested - the final response lists the files changed and any follow-up step the user must perform in Studio