Configures CrestApps.Core 2.0 AI data sources and search-backed RAG in ASP.NET Core hosts. Covers source types (Elasticsearch, AzureAISearch, PostgreSQL, Web, File), knowledge-base model, registration APIs, and custom handlers.
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.
An AIDataSource connects a source (where raw documents come from) to a knowledge base (a vector index profile holding chunked, embedded rows). AI profiles and chat interactions attach a data source for preemptive RAG and the search_data_sources tool, and tool instances can expose several data sources side by side.
Pick a backend skill for the vector store: crestapps-core-elasticsearch, crestapps-core-azure-ai-search or crestapps-core-postgresql. For uploads see crestapps-core-document-processing. For the record types that fill Web and File data sources see crestapps-core-web-crawlers and crestapps-core-file-sources.
AIDataSourceSourceTypes (namespace CrestApps.Core.AI.Models):
| Constant | Reads | Kept in step by |
|---|---|---|
SearchIndexProfile | a CrestApps-managed source index profile | automatic, when writes go through ISearchDocumentManager |
Elasticsearch | an external Elasticsearch index with per-data-source credentials | IAIDataSourceChangeNotifier |
AzureAISearch | an external Azure AI Search index | IAIDataSourceChangeNotifier |
PostgreSQL | an external PostgreSQL table | IAIDataSourceChangeNotifier |
Web | pages from web crawler records (AddCoreWebCrawlers()) | scheduled re-crawl |
File | typed knowledge objects from file source records (AddCoreFileSources()) | scheduled runs |
AIDataSource stores Source, AIKnowledgeBaseIndexProfileName, SourceIndexProfileName and the field mapping KeyFieldName, TitleFieldName, ContentFieldName. Web and File data sources need no field mapping because every row already carries its key, title and content. Source credentials go on AIDataSource.Properties, protected with AIDataSourceProtectionConstants.SourceSecretPurpose.
builder.Services.AddCrestAppsCore(crestApps => crestApps
.AddAISuite(ai => ai
.AddOpenAI()
.AddChatInteractions(chatInteractions => chatInteractions
.AddYesSqlStores())
.AddToolInstances(toolInstances => toolInstances
.AddDataSourceSearchSource()
.AddYesSqlStores()))
.AddIndexingServices(indexing => indexing
.AddYesSqlStores()
.AddPostgreSQL(
builder.Configuration.GetSection("CrestApps:PostgreSQL"),
postgreSQL => postgreSQL.AddAIDataSources())));
builder.Services.AddCoreAIDataSourceStoresYesSql(); // or AddCoreAIDataSourceStoresEntityCore()
AddAIDataSources() on a backend builder registers the DataSource index-profile source, the keyed backend IAIDataSourceSourceHandler, and calls AddCoreAIDataSourceRag().AddCoreAIDataSourceRag() registers IAIDataSourceIndexingQueue (in-memory channel), IAIDataSourceChangeNotifier, IAIDataSourceIndexingService, the SearchIndexProfile source handler, AIDataSourceCatalogHandler, AIDataSourceSearchDocumentHandler, AIDataSourceIndexingBackgroundService, AIDataSourceAlignmentBackgroundService (nightly 2:00 AM UTC reconciliation), DataSourceOrchestrationHandler, DataSourcePreemptiveRagHandler and the search_data_sources system tool.AddYesSqlStores() / AddEntityCoreStores() also registers the data source store.AddAIDataSources().AIDataSource queues a full rebuild or cleanup through AIDataSourceCatalogHandler.SearchIndexProfile sources sync automatically from ISearchDocumentHandler notifications.await changeNotifier.QueueDocumentsAddedOrUpdatedAsync(dataSourceId, [recordId], cancellationToken);
await changeNotifier.QueueDocumentsDeletedAsync(dataSourceId, [recordId], cancellationToken);
await changeNotifier.QueueFullSyncAsync(dataSourceId, cancellationToken);
Replace IAIDataSourceIndexingQueue for a durable or multi-node queue. Set Trace logging on CrestApps.Core.AI categories to follow queue and alignment activity.
Register a keyed IAIDataSourceSourceHandler and a descriptor in AIDataSourceSourceOptions. See references/custom-source-examples.md for a complete, compiling handler and sync bridge.
builder.Services
.AddCoreAIDataSourceRag()
.Configure<AIDataSourceSourceOptions>(options => options.AddOrUpdate(
"CustomCatalog",
new LocalizedString("CustomCatalog", "Custom Catalog"),
new LocalizedString("CustomCatalog Description", "Reads documents from the catalog service.")))
.AddKeyedScoped<IAIDataSourceSourceHandler, CustomCatalogAIDataSourceSourceHandler>("CustomCatalog");
IAIDataSourceSourceHandler.ProducesTypedKnowledge defaults to false; only the File handler returns typed knowledge objects.
Every knowledge-base row now carries contentType (document, article, text, figure, chart, table), rootId, parentId and page. Rows from non-File sources carry contentType = "text", and every reader treats a missing value as text, so older indexes keep working.
ISearchIndexManager.TryAddFieldsAsync (default-implemented) adds the columns to an existing index on the next sync. PostgreSQL, Elasticsearch and Azure AI Search support it.IDataSourceContentManager.DeleteByReferenceIdsAsync (default-implemented) deletes a reference's rows by predicate.SourceDocument.IsPreChunked stores a row as one chunk with no title prefix.contentType, rootId, parentId and page to the real columns, and contentType eq null is a null test. Other fields still target the per-row filter bag.AIDataSourceRagMetadata on an AI profile or chat interaction: Strictness, TopNDocuments, IsInScope, Filter (OData) and ObjectTypes (for example ["figure", "chart"]). Preemptive RAG and search_data_sources read it through one shared resolver, so both apply the same filter, strictness and top N. ObjectTypes becomes part of the filter. Asking for text also admits rows with no contentType.
When a filter is set and no keyed IODataFilterTranslator exists for the knowledge base provider, both paths log a warning and search without it. The chat interaction hub validates filters with IODataValidator.
AddDataSourceSearchSource() (source name data-source-search, category Knowledgebase) turns one data source into its own model-callable function, so several knowledge bases can be offered at once.
using CrestApps.Core.AI.Models;
using CrestApps.Core.AI.Tooling.Instances.DataSources;
instance.Put(new DataSourceSearchToolSettings
{
DataSourceId = dataSource.ItemId,
RetrievalMode = DataSourceRetrievalMode.Hierarchical, // default Chunk
TopNDocuments = 5,
Strictness = 3,
Filter = "category eq 'support'",
ContentTypes = ["text", "table"],
});
SearchIndexProfile.EmbeddingDeploymentName, or DataSourceIndexProfileMetadata.EmbeddingDeploymentName).Hierarchical returns each matching document's full text through its source handler and falls back to chunks when it cannot.contentTypes argument lets the model narrow, never widen, what the instance searches.AddKnowledgeObjectSource() and AddKnowledgeObjectListSource() (in CrestApps.Core.AI.Documents.Tooling) read or list one article, figure, chart or table by the identifier a search reported.Retrieval over a File data source renders figures and tables in their own blocks with short labels such as [fig:1] and [tbl:1]. The model writes the label, and the chat client replaces it with the picture registered under that marker (AICompletionReference.IsImage). The address comes from IAIReferenceLinkResolver (RetrievedFigure.Link), and MCP clients read RetrievedFigure.Uri (crestapps://datasource/{dataSourceId}/figure/{canonicalId}). Register AddCoreAIDocumentReferenceDownloads() and map AddDownloadKnowledgeFigureEndpoint() so figures have a servable address. Citations that print the same line and link are merged into one.
AIDataSourceSourceTypes.Ingested is renamed File, with FileAIDataSourceSourceHandler and FileReferenceLinkResolver. A data source saved under a preview build with source Ingested must be rewritten to File.AddCoreFileSources(), and Web by AddCoreWebCrawlers(). The File read-side handler is registered by AddCoreAIDocumentIngestion().IKnowledgeIngestionService from code.ISearchIndexManager and IDataSourceContentManager implementations keep compiling. Override TryAddFieldsAsync and DeleteByReferenceIdsAsync to support typed columns and efficient deletes.embedding slot; deployment Purpose no longer exists.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
ai-data-sources, rag, vector-search, crestapps-core, aspnetcore
51 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./crestapps-core-ai-agentsSkill for AI agents in CrestApps.Core 2.0, specialized AIProfile records of type Agent that the primary model invokes as tools. Covers creating agent profiles with AgentMetadata availability (OnDemand or AlwaysAvailable), linking them with AgentInvocationMetadata, how AgentProxyTool runs an agent with tools disabled or through the orchestrator when AllowToolInvocation is set, the AgentInvocationDepth recursion guard, never offering an agent to itself (RunningAgentName), tools of an agent that require an approval and pause the agent, deployment inheritance and the chat slot, code-defined and system agents through IAIProfileProvider including the Tabular Data, PDF, Presentation and Word agents, chat-specific agents that read AIInvocationScope, exposing agents to MCP clients with McpServerOptions Agents and ExposeAllAgents, and SubAgent usage labels. Use it when delegating work to sub-agents, adding a framework-managed agent, publishing an agent over MCP, or troubleshooting an agent the model does not call./crestapps-core-ai-markdownSkill for Markdig-backed Markdown normalization in CrestApps.Core 2.0 AI document, data source and RAG flows. Covers the CrestApps.Core.AI.Markdown package, AddMarkdown on the AI suite builder and AddCoreAIMarkdown on IServiceCollection, MarkdownAITextNormalizer replacing the default IAITextNormalizer, RagTextNormalizer content, chunk and title normalization with HTML stripping and Microsoft.Extensions.DataIngestion.Markdig parsing, the gpt-4o tokenizer chunker with 500 tokens per chunk and 50 tokens of overlap, the plain-text fallback for unsupported inline types, where the normalizer is used (data source indexing, preemptive retrieval, reference titles), and pairing it with document processing. Use it when indexing Markdown-heavy content for retrieval, replacing the text normalizer, or troubleshooting chunk sizes and leftover markup in retrieved text./crestapps-core-ai-memorySkill for AI memory in CrestApps.Core. Covers AddAIMemory, AddCoreAIMemory and AddCoreAIMemoryIndexing, Entity Framework Core and YesSql memory stores, the AIMemory index profile on the Elasticsearch, Azure AI Search and PostgreSQL backends, AIMemoryOptions, the store fallback when no index is usable, background memory indexing, the three kinds of memory (session memory with AIConversationMemory summaries and search_conversation, past conversations with search_past_conversations and list_recent_conversations, durable user memory) switched by MemoryMetadata and ChatInteractionMemoryOptions, preemptive memory retrieval and RunsWhenPreemptiveRagIsDisabled, owner-only chat sessions, the user memory tools, IAIMemorySafetyService validation, and custom IMemoryVectorSearchService implementations./crestapps-core-ai-model-capabilitiesSkill for metadata-driven deployment capabilities in CrestApps.Core 2.0. Covers trained model features such as textGeneration, toolCalling, streaming, reasoning, realtime, textEmbedding, speechToText and textToSpeech, model parameters such as reasoningEffort, declaring them with AIDeploymentMetadata or the Features and Parameters configuration shorthand for Azure App Service settings, registering custom features, parameters and slots with AddAIDeploymentFeature, AddAIDeploymentParameter, AddAIDeploymentSlot and AIDeploymentCapabilityOptions, IAIDeploymentCapabilityService, deployment slots and their resolution chain, AIDeploymentParametersMetadata chat and utility values, IAIDeploymentParameterBinder, UseModelParameters, capability enforcement, the ChatApi Responses routing for reasoning with tools, capability-aware chat UIs, and migrating from AIDeploymentPurpose. Use it when declaring what a model supports, adding a new knob, or fixing stripped tools, missing pickers, or reasoning-effort errors./crestapps-core:crestapps-core-data-sourcesfrom crestapps-core
npx claudepluginhub crestapps/crestapps.agentskills --plugin crestapps-coreOther plugins' skills for the same job