Guides developers through CrestApps.Core 2.0 sample hosts: MVC with YesSql, Blazor with EF Core, Aspire with Ollama/Redis/pgvector, MCP/A2A clients, and shared library. Covers composition, running locally, App_Data layout, production rewrites, and rebuilding Vite chat assets.
Ships in crestapps-core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are a CrestApps.Core expert. Point developers at the right sample, then separate the framework calls they should copy from the sample plumbing they should replace.
| Project | Path | Composition | Best use |
|---|---|---|---|
| MVC reference host | src/Startup/CrestApps.Core.Mvc.Web | Every feature on YesSql over SQLite (App_Data/crestapps.db) | Broadest end-to-end reference |
| Blazor reference host | src/Startup/CrestApps.Core.Blazor.Web | The same features on Entity Framework Core over SQLite (App_Data/crestapps-blazor.db) | Blazor Server and EF Core reference |
| Aspire app host | src/Startup/CrestApps.Core.Aspire.AppHost | Both web hosts plus Ollama, Redis, PostgreSQL with pgvector, and both protocol clients | Composed local environment |
| MCP sample client | src/Startup/CrestApps.Core.Mvc.Samples.McpClient | Razor Pages client using the MCP SDK, with a server selector | Exercising a host's /mcp endpoint |
| A2A sample client | src/Startup/CrestApps.Core.Mvc.Samples.A2AClient | Razor Pages client for agent cards and tasks, with a server selector | Exercising a host's A2A endpoints |
| Shared sample library | src/Startup/CrestApps.Core.Startup.Shared | Site settings store, option bridges, sample authorization handlers, article demo | Patterns to copy, not to reference |
Both web hosts register usage tracking (AddUsageTracking()), OpenAI, Azure OpenAI, Ollama, Azure AI Inference, ElevenLabs and Cartesia (AddElevenLabs(), AddCartesia()), WebMCP with chat page tools (AddWebMcp(webMcp => webMcp.AddPageTools<AIChatHub>()) and app.MapWebMcpTools()), the AG-UI HTTP endpoint (app.MapAGUIChat<AIChatHub>(), so curl -N -X POST https://localhost:5100/api/ai/agui ... reaches the MVC host), Claude and Copilot orchestrators, Chat Interactions, document processing with OpenXml, PDF, Word and reference downloads, AI memory, personas, tool instances, A2A client and host, MCP client and server (with FTP, SFTP and knowledge resources), SignalR, Elasticsearch, Azure AI Search and PostgreSQL search, web crawlers, and file sources with file-system, FTP and SFTP connectors.
dotnet run --project ./src/Startup/CrestApps.Core.Mvc.Web/CrestApps.Core.Mvc.Web.csproj
dotnet run --project ./src/Startup/CrestApps.Core.Blazor.Web/CrestApps.Core.Blazor.Web.csproj
dotnet run --project ./src/Startup/CrestApps.Core.Aspire.AppHost/CrestApps.Core.Aspire.AppHost.csproj
https://localhost:5100 and the Blazor host on https://localhost:5200 from their launch profiles. Under Aspire they use https://localhost:7150 and https://localhost:5201, which the MCP and A2A clients target.SampleHostContentRootResolver.ResolveContentRoot(...) finds the project folder, so the commands work from the repository root.CrestApps:Admin in each host's appsettings.json. The MVC host also signs in ordinary users listed under CrestApps:Users (Username, Password pairs) in App_Data/appsettings.json, for checking that one user never sees another's conversations or memories.App_Data/appsettings.json; it is layered over the normal configuration chain. Set CrestApps:AppDataPath to move App_Data outside the source tree.OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_SERVICE_NAME for every project it runs, so under Aspire both hosts send traces, metrics and logs to the Aspire dashboard.deepseek-v2:16b into Ollama on first run and wires it through CrestApps__AI__Providers__Ollama__Connections__Default__ChatDeploymentName, so a chat deployment exists without manual configuration. Change ollamaModelName in the app host Program.cs for a smaller model.ModelName must match a pulled model exactly, or the provider returns 404.net10.0 and net11.0, but the sample hosts, the Aspire host (Aspire 13.6.5), the end-to-end tests and the benchmarks build for net10.0 only. Building the repository needs the .NET 11 SDK; running the unit tests on both frameworks also needs the .NET 10 runtime.builder.AddSharedSampleHostDefaults() - NLog, App_Data creation, App_Data/appsettings.json, data-protection keys under App_Data/DataProtection-Keys, and AddSharedSiteSettings(appDataPath) (the SiteSettingsStore plus IConfigureOptions bridges for GeneralAIOptions, DefaultAIDeploymentSettings, PromptSecurityOptions, AIVisitorIdentityOptions and others, refreshed through SiteSettingsOptionsChangeTokenSource<TOptions>).builder.AddSharedSampleOpenTelemetry() - only when OTEL_EXPORTER_OTLP_ENDPOINT is set: AddCrestAppsOpenTelemetry() with ASP.NET Core, HttpClient and System.Runtime telemetry over UseOtlpExporter(), the OpenTelemetry log provider with scopes (after the ClearProviders() of step 1, so NLog keeps running), and the OpenAI.Experimental.EnableOpenTelemetry switch. See crestapps-core-observability.Admin policy, AddSharedAIChatProtection() (endpoint rate limiting) and AddWebRtcRealtimeTransport().AddMvcSampleHostServices(appDataPath) or AddBlazorSampleHostServices(appDataPath) - the backing store (AddCoreYesSqlDataStore(...) or AddCoreEntityCoreSqliteDataStore(...)), the sample document and figure authorization handlers, article demo services, and option bridges for A2A, MCP, Copilot and Claude.AddCrestAppsCore(...) with the full AI suite and indexing composition, then ConfigureCrestAppsChatHubOptions<AIChatHub>(), AddCoreWebCrawlers(), AddCoreFileSources(builder.Configuration) with connectors, and the web-crawler and file-source stores.Build(): InitializeYesSqlSchemaAsync() (MVC, defined in the sample; it also runs AddAIChatSessionIndexClientIdColumnAsync for databases created before the ClientId column) or InitializeEntityCoreSchemaAsync() (Blazor, a package API), then SeedArticlesAsync().UseWebSockets(), routing, UseSharedAIChatProtection() (anonymous visitor cookie plus rate limiter), authentication, authorization, the MCP authentication middleware (a UseWhen that matches the /mcp endpoint path only, with or without a trailing slash, so the admin pages under /Mcp/... or /mcp/... keep the normal sign-in), the two hubs, MapAGUIChat<AIChatHub>(), MapMcp("mcp"), MapA2AHost(), and the chat and document endpoints (each Add*Endpoint() on its own line).The MCP server uses WithHttpTransport(options => options.SessionMode = ...) with HttpServerSessionMode.StatefulForInitializeClients by default, so GET and DELETE /mcp work; set CrestApps:AI:McpServer:SessionMode to Stateless when a host runs on several nodes without session affinity. Both hosts register the calculator with .AsRead() and the logging-only sendEmail tool with .AsExternal(), so the chat asks before it "sends" an email, also when the tool sits inside an agent.
The MVC _Layout.cshtml and the Blazor App.razor render <meta name="RequestVerificationToken" ...> so the chat scripts send the antiforgery token with document uploads and removals.
Both nlog.config files print each line's event id and trace id (${activity:property=TraceId}, from NLog.DiagnosticSource), so a log line can be matched to its trace. The samples' own log messages use event ids in the 9000 range.
| Page | What it shows |
|---|---|
| Deployment editor, Pricing card | One AIDeploymentPrice per billed unit, saved with deployment.SetPricing(...) |
| Usage Analytics and Audio Usage Analytics | AIUsageReport and AIAudioUsageReport with an estimated cost column from GetPricingByDeploymentAsync() |
| Voice Library | Voice search and cloning through IVoiceLibraryResolver (see crestapps-core-speech-voices) |
| Profile editor, speech fields | AIProfileSpeechSettings (speaking rate and emotion, fallback TTS deployment, pronunciation dictionary, boosted keywords, recognition languages, interruption sensitivity, backchanneling) |
| Profile editor, data extraction | DataExtractionEntry.FieldType and AllowedValues |
| Profile editor, Knowledge tab | Remember earlier parts of long conversations and Let the assistant look up past conversations next to user memory |
| Profile editor | Allow page tools and Allow consequential page tools (WebMcpProfileSettings) |
| Profile editor, Capabilities tab | Tool approval in the AI Tools section (Ask for approval (recommended) or Allow all tools without asking, AIToolApprovalSettings.SetRunAllWithoutAsking); for an agent, AgentMetadata.AllowToolInvocation is set when at least one tool, tool instance, MCP connection or A2A connection is picked; the AI Agents list leaves out the agent being edited; tool pickers show a tool as selected when a stored name is one of its aliases |
| Settings | a WebMCP card choosing the exposed tools, the chat-interaction session-memory default, and Enable OpenTelemetry and Include prompts and responses in telemetry, saved with their Override... flags |
| WebMCP Playground | a fake store exposing tools through document.modelContext; over AG-UI, store.place_order (consequential) waits for Allow/Deny, and wwwroot/js/agui-playground.js shares an Order details card with the agent through crestAppsAGUI.registerStateProvider |
| File source and MCP resource editors | a Host key fingerprint field for SFTP (SftpConnectionMetadata.HostKeyFingerprint) |
Both AIChatHub samples override AuthorizeSessionAsync so the Admin policy can open any conversation from the admin Sessions page. The sample AIMemoryEntryHandler is gone because memory indexing is now registered by AddAIMemory().
Copy these package calls as they are: AddCrestAppsCore, AddAISuite and every feature builder call, AddIndexingServices, AddEntityCoreSqliteDataStore or AddYesSqlDataStore, ConfigureCrestAppsChatHubOptions<THub>(), AddWebRtcRealtimeTransport(), AddCoreWebCrawlers(), AddCoreFileSources(builder.Configuration), the store registrations, InitializeEntityCoreSchemaAsync(), UseAIAnonymousVisitorCookie(), WithCrestAppsHandlers(), and the Add*Endpoint() document extensions.
Rewrite these for your host, because they exist only in src/Startup:
| Sample helper | Replace with |
|---|---|
AddSharedSampleHostDefaults(), AddSharedSiteSettings(...) | Your logging, configuration, data protection, and a settings store that signals IOptionsMonitor |
AddSharedSampleOpenTelemetry() | Your OpenTelemetry setup with AddCrestAppsOpenTelemetry(); see crestapps-core-observability |
AddMvcSampleHostServices(...), AddBlazorSampleHostServices(...) | Direct store registration plus your own IAuthorizationHandler implementations |
Sample*AuthorizationHandler types | Handlers that apply your real access rules (the samples grant most document access to administrators only) |
InitializeYesSqlSchemaAsync() | Your YesSql schema step using the package Create*IndexSchemaAsync extensions |
AddA2AHost(), MapA2AHost(), A2A API key handlers | Your A2A host endpoints and authentication; see crestapps-core-a2a |
AddChatApiEndpoints() | Your own session and profile endpoints |
AIChatHub, ChatInteractionHub | Your hubs derived from AIChatHubCore<IAIChatHubClient> and ChatInteractionHubBase |
/mcp authentication middleware | Your MCP authentication; see crestapps-core-mcp |
SeedArticlesAsync(), article index profile | Nothing; the article catalog is demo data |
crestapps-core-aspnet-hosting shows a minimal package-based Program.cs.
The chat scripts and stylesheets are sources under src/Resources/CrestApps.AI.Resources/Assets/ built into its committed wwwroot/ with Vite (Node.js 24, npm 11). Package consumers never build them; they use the @crestapps/ai-chat-ui npm package. Contributors changing a script use npm install, npm run build, npm run lint and npm run check, and commit the rebuilt wwwroot files. See building-assets.md for commands, the Assets.json format, and troubleshooting.
AIMemoryEntryHandler into a host that calls AddAIMemory(), delete it; the framework now indexes memories and the copy would index each one twice.AuthorizeSessionAsync override from the sample AIChatHub if your staff open other users' conversations through the hub.EnableAIUsageTracking; call AddUsageTracking() instead.OverrideEnableOpenTelemetry. Both pages now save the flag with the value, and do the same for Include prompts and responses in telemetry. Do the same in your own settings page.MapAGUIChat<AIChatHub>(), render the antiforgery meta tag, split the chained document endpoint calls, and add an SFTP host key fingerprint field. The MVC chat-interaction view sanitizes answers with CoreAIImages.sanitize.GET and DELETE /mcp again (it answered 405 in the SDK's default stateless mode), and with ApiKey authentication the MCP admin pages no longer answer 401, because the authentication middleware matches the endpoint path only. Copy both changes into a host built from the samples.sendEmail is an External tool and asks for approval; the calculator is a Read tool. Agents created in the sample editors now use the tools picked for them, and the Tool approval setting is new.Host, Port, Username and Password first).AddCoreFileSources(builder.Configuration) reading CrestApps:AI:FileSources, replacing CrestApps:Indexers), web crawlers, personas, tool instances, and PostgreSQL search. The manual Upload files action on a data source is gone; file sources replace it.AddSharedTemplateProviders() is removed; AddCoreAITemplating() now registers the system-prompt template provider.Assets.json uses action, name, source and dest; the old inputs, output and generateSourceMaps keys are not read.@microsoft/signalr to 10.0.11 with an integrity hash instead of @latest.What SKILL.md sets; muted values are Claude Code's defaults
/crestapps-core:crestapps-core-sample-hostsfrom crestapps-core
npx claudepluginhub crestapps/crestapps.agentskills --plugin crestapps-core51 skills in this plugin
/crestapps-core-a2aSkill for Agent-to-Agent (A2A) protocol support in CrestApps.Core on the A2A 1.0 SDK. Covers AddA2AClient and AddCoreAIA2AClient with Entity Framework Core or YesSql connection stores, A2AConnection and A2AConnectionMetadata authentication, AIProfileA2AMetadata, the agent card cache and A2AToolRegistryProvider, the listAvailableAgents, findAgentForTask and findToolsForTask tools, building an A2A host with IAgentHandler, A2AServer, ITaskStore and MapA2A, A2A 1.0 agent cards with supportedInterfaces published at /.well-known/agent-card.json, A2AHostOptions authentication and ExposeAgentsAsSkill, system agents exposed through the host, and upgrading from the 0.3 SDK./crestapps-core-ag-uiSkill for running the CrestApps.Core 2.0 AI chat as an AG-UI agent. Covers the CrestApps.Core.AI.AGUI package (AGUIRunEventWriter, AGUIRunRequest, AGUIJson), AIChatHubCore.RunAgent over SignalR and MapAGUIChat with Server-Sent Events, the RunAgentInput members and streamed events, tool approvals with RequireApproval or an approval tool kind, ApprovalRequiredAIFunction, interrupts and resume, approvals inside agents, page context with crestAppsAGUI.registerContextProvider, shared state with registerStateProvider and update_shared_state, frontend tools, stored tool calls (ChatTurnToolActivity), runs that continue on the next page, AGUIChatOptions.DisconnectedRunTimeout, the protocol and sendPageContext chat options, and the AICompletionContextKeys and ChatResponseHandlerContext members. Use it when showing tool calls in the chat, asking a person before a tool runs, sharing page state with the agent, connecting CopilotKit or another AG-UI client, or troubleshooting approvals and continued runs.Other plugins' skills for the same job