crestapps/crestapps.agentskills/crestapps-core-postgresql

Claude Code and agent skill by crestapps/crestapps.agentskills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Skill for using PostgreSQL with pgvector as the CrestApps.Core indexing and vector backend. Covers CrestApps.Core.PostgreSQL and CrestApps.Core.AI.PostgreSQL, AddPostgreSQL on the indexing builder with AddAIDocuments, AddAIDataSources and AddAIMemory, AddCorePostgreSQLServices and the lower-level source registrations, PostgreSQLConnectionOptions and IndexPrefix, the vector extension, typed knowledge columns and in-place schema upgrades through TryAddFieldsAsync, external PostgreSQL table sources with IAIDataSourceChangeNotifier, the Aspire AppHost and Docker setup, and troubleshooting.

Install

npx vskill@latest install crestapps/crestapps.agentskills/crestapps-core-postgresql

SKILL.md

The same SKILL.md was published earlier as crestapps/crestapps.agentskills/crestapps-core-postgresql.

CrestApps.Core PostgreSQL

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.

Registration

csharp
builder.Services.AddCrestAppsCore(crestApps => crestApps
.AddAISuite(ai => ai.AddOpenAI())
.AddIndexingServices(indexing => indexing
.AddYesSqlStores()
.AddPostgreSQL(
builder.Configuration.GetSection("CrestApps:PostgreSQL"),
postgreSQL => postgreSQL
.AddAIDocuments()
.AddAIDataSources()
.AddAIMemory())));
CallPackageAdds
AddCorePostgreSQLServices(section)CrestApps.Core.PostgreSQLPostgreSQLConnectionOptions, IPostgreSQLClientFactory (manages NpgsqlDataSource instances), keyed IDataSourceContentManager, IDataSourceDocumentReader, IODataFilterTranslator, ISearchIndexManager, ISearchDocumentManager
AddAIDocuments() / AddCorePostgreSQLAIDocumentSource()CrestApps.Core.AI.PostgreSQLAIDocuments index-profile source, profile handler, keyed IVectorSearchService
AddAIDataSources() / AddCorePostgreSQLAIDataSource()CrestApps.Core.AI.PostgreSQLDataSource index-profile source, keyed PostgreSQLAIDataSourceSourceHandler, and AddCoreAIDataSourceRag()
AddAIMemory() / AddCorePostgreSQLAIMemorySource()CrestApps.Core.AI.PostgreSQLAIMemory 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().

Configuration

json
{
"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.

Typed Columns

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.

External PostgreSQL Sources

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.

Troubleshooting

SymptomCheck
Index profile creation reports the provider is not configuredConnectionString missing from the bound section
type "vector" does not existpgvector not installed, or the user cannot create extensions
Old rows not filtered by typeexpected; rows written before the typed columns have contentType null and read as text

Upgrading from 1.x

  • Existing tables keep working; the typed columns are added in place on the next sync.
  • Embeddings resolve through the embedding deployment slot or the index profile's EmbeddingDeploymentName; deployment Purpose is gone.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/crestapps/crestapps.agentskills/crestapps-core-postgresql/badge)](https://verified-skill.com/skills/crestapps/crestapps.agentskills/crestapps-core-postgresql)

Something wrong with this skill or its page? Tell us.