Configures PostgreSQL with pgvector as the vector/knowledge backend for CrestApps.Core AI indexing. Covers service registration, typed columns, schema upgrades, and Docker setup.
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.
None: SKILL.md is the whole skill.
Use PostgreSQL with pgvector as a lightweight, self-hosted knowledge-base backend for AI documents, AI data sources and AI memory. For the data source model see crestapps-core-data-sources.
builder.Services.AddCrestAppsCore(crestApps => crestApps
.AddAISuite(ai => ai.AddOpenAI())
.AddIndexingServices(indexing => indexing
.AddYesSqlStores()
.AddPostgreSQL(
builder.Configuration.GetSection("CrestApps:PostgreSQL"),
postgreSQL => postgreSQL
.AddAIDocuments()
.AddAIDataSources()
.AddAIMemory())));
| Call | Package | Adds |
|---|---|---|
AddCorePostgreSQLServices(section) | CrestApps.Core.PostgreSQL | PostgreSQLConnectionOptions, IPostgreSQLClientFactory (manages NpgsqlDataSource instances), keyed IDataSourceContentManager, IDataSourceDocumentReader, IODataFilterTranslator, ISearchIndexManager, ISearchDocumentManager |
AddAIDocuments() / AddCorePostgreSQLAIDocumentSource() | CrestApps.Core.AI.PostgreSQL | AIDocuments index-profile source, profile handler, keyed IVectorSearchService |
AddAIDataSources() / AddCorePostgreSQLAIDataSource() | CrestApps.Core.AI.PostgreSQL | DataSource index-profile source, keyed PostgreSQLAIDataSourceSourceHandler, and AddCoreAIDataSourceRag() |
AddAIMemory() / AddCorePostgreSQLAIMemorySource() | CrestApps.Core.AI.PostgreSQL | AIMemory index-profile source, profile handler, keyed IMemoryVectorSearchService |
Every keyed service uses PostgreSQLConstants.ProviderName ("PostgreSQL"). Unlike Elasticsearch and Azure AI Search there is no translator-only registration; the translator comes with AddCorePostgreSQLServices().
{
"CrestApps": {
"PostgreSQL": {
"ConnectionString": "Host=localhost;Port=5432;Database=vectordb;Username=postgres;Password=use-a-secret",
"IndexPrefix": ""
}
}
}
PostgreSQLConnectionOptions has ConnectionString (any Npgsql parameters) and IndexPrefix (prepended to framework-managed table names, useful when tenants share a database). Each index profile is its own table. The index manager runs CREATE EXTENSION IF NOT EXISTS vector, so the database user needs permission to create it, or a DBA must create it first. Requires PostgreSQL 12+ and pgvector 0.5.0+.
For local development, dotnet run --project src/Startup/CrestApps.Core.Aspire.AppHost starts a pgvector/pgvector:pg16 container and injects CrestApps__PostgreSQL__ConnectionString into both sample hosts. Without Aspire, run the same image with Docker Compose.
contentType, rootId, parentId and page are real columns. PostgreSQLSearchIndexManager.TryAddFieldsAsync adds them to an existing table on the next data source sync, and the OData translator filters on them directly. Other filter fields target the row's filter bag.
An AIDataSource with Source = AIDataSourceSourceTypes.PostgreSQL reads an external table configured on the data source (ConnectionString protected with AIDataSourceProtectionConstants.SourceSecretPurpose, and TableName). It is separate from the pgvector backend that stores CrestApps rows. Call IAIDataSourceChangeNotifier when the external table changes.
| Symptom | Check |
|---|---|
| Index profile creation reports the provider is not configured | ConnectionString missing from the bound section |
type "vector" does not exist | pgvector not installed, or the user cannot create extensions |
| Old rows not filtered by type | expected; rows written before the typed columns have contentType null and read as text |
embedding deployment slot or the index profile's EmbeddingDeploymentName; deployment Purpose is gone.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
pgvector, vector-search, ai-indexing, knowledge-base, npgsql
/crestapps-core:crestapps-core-postgresqlfrom 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./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.Other plugins' skills for the same job