Database Operations Skill

Guide PostgreSQL database operations on ai_company_foundation with psycopg3 and claude.column_registry.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/TalkingMonkeyOz/claude-family --skill database-operations-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Database Operations Skill
Source: https://github.com/TalkingMonkeyOz/claude-family/tree/main/.claude/skills/database
Command: npx skills add https://github.com/TalkingMonkeyOz/claude-family --skill database-operations-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides guidance for database operations with the Claude Family PostgreSQL database (ai_company_foundation). It covers connection setup, core schemas, data access patterns, and data governance to avoid common pitfalls.

Core Features & Use Cases

  • Connection guidance: Python (psycopg3) connection snippet and guidelines for correct dbname usage.
  • Core Schema & Tables: Use the claude.* namespace (sessions, knowledge, feedback, features, build_tasks, projects, column_registry) and understand legacy schemas.
  • Data Gateways & Queries: Always check valid values before writes using claude.column_registry.

Quick Start

Use the Python example to connect to ai_company_foundation and run a sample query against claude.projects.

Frequently Asked Questions about Database Operations Skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I connect to the Claude Family PostgreSQL database with Python?

Connect to ai_company_foundation using psycopg3 with dbname, host, port, user, and password parameters. The Skill provides a ready-to-use Python connection snippet and guidance on correct configuration to avoid common setup mistakes.

What tables and schemas should I use for Claude database operations?

Use the claude.* namespace, which contains sessions, knowledge, feedback, features, build_tasks, projects, and column_registry tables. This replaces legacy claude_family schemas and ensures safe, compliant operations across all routine tasks.

How do I safely write data to the Claude database without validation errors?

Always check valid values in claude.column_registry before performing constrained writes. The Skill validates all values through the data gateway, preventing invalid entries and maintaining data integrity across the ai_company_foundation database.

Can I query session logs, feedback, and project status from the Claude database?

Yes. The Skill covers routine queries including session logging, knowledge entries, feedback retrieval, project status checks, recent sessions, and open feedback using SQL patterns designed for the claude.* schema with proper handling of UUID arrays and DISTINCT clauses.

What are the key SQL patterns for querying Claude database tables?

The Skill provides guidance on UUID array handling, DISTINCT with ORDER BY syntax, and consolidation patterns to query sessions, projects, feedback, and features efficiently within the claude.* namespace while maintaining compliance.