database-operations

Manage SQLAlchemy connections, queries, transactions, and migrations in Streamlit apps.

2|2|Updated Nov 4, 2025
One-click install
npx skills add https://github.com/gizix/cc_projects --skill database-operations-gizix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-operations
Source: https://github.com/gizix/cc_projects/tree/main/streamlit-template/.claude/skills/database-operations
Command: npx skills add https://github.com/gizix/cc_projects --skill database-operations-gizix

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill covers database connection management, query patterns, transactions, and migrations in Streamlit apps.

Core Features & Use Cases

  • Connection Management: Reusable connection handling with caching.
  • Query Patterns: Standardized data access functions.
  • Migrations & Errors: Safe schema changes and error handling patterns.

Quick Start

Establish a cached SQLAlchemy session and run a simple query from within a Streamlit script.

Frequently Asked Questions about database-operations

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

FAQPage Schema
How do I manage database connections in a Streamlit app?

Database connections in Streamlit apps require caching to avoid recreating engines on every script rerun. Use SQLAlchemy with a cached engine and context-managed sessions to maintain persistent, efficient connections across Streamlit's execution model.

What's the best way to structure database queries in Streamlit applications?

Standardized query patterns with context-managed SQLAlchemy sessions provide consistent, safe data access. Define reusable query functions that handle session lifecycle, error handling, and transaction boundaries rather than embedding raw SQL throughout your app.

How do I safely migrate database schemas in production?

Database migrations use Alembic to version schema changes and apply them safely across environments. Define migrations as code, track them in version control, and execute them in a controlled sequence to avoid data loss and maintain consistency.

Can I use SQLAlchemy with Streamlit for CRUD operations?

Yes. SQLAlchemy with Streamlit supports full CRUD operations through structured patterns for connection management, query execution, and transaction handling. Combine cached engines, context-managed sessions, and error handling to build reliable data-driven Streamlit applications.

What error handling patterns should I use for database operations?

Implement error handling within context-managed sessions to catch connection failures, query errors, and constraint violations. Define transaction rollback logic and user-facing error messages to maintain data integrity and application stability across multiple environments.