state-db

Store and retrieve structured data via a self-hosted PostgREST API.

Updated Feb 1, 2026
One-click install
npx skills add https://github.com/witooh/skills --skill state-db
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: state-db
Source: https://github.com/witooh/skills/tree/main/skills/state-db
Command: npx skills add https://github.com/witooh/skills --skill state-db

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a centralized, persistent storage layer for Claude Code skills, enabling them to save, retrieve, and manage data across different sessions and executions.

Core Features & Use Cases

  • Data Persistence: Store and retrieve any type of data (configurations, user states, logs, etc.) in a structured PostgreSQL database.
  • Cross-Session Memory: Allows skills to remember information between invocations, crucial for complex workflows.
  • Shared Data Storage: Enables multiple skills to access and modify a common data store, facilitating inter-skill communication and data synchronization.
  • Use Case: A food-tracker skill can save daily meal entries, and a summary-reporter skill can later query this data to generate weekly nutritional reports.

Quick Start

Use the state-db skill to save a new entry for the food-tracker skill with the data {"meal": "lunch", "items": ["rice", "chicken"], "phosphorus_mg": 250}.

Frequently Asked Questions about state-db

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

FAQPage Schema
How do I persist data across multiple Claude Code sessions?

You can persist data across multiple Claude Code sessions by using a centralized state management layer connected to a PostgreSQL database. This enables skills to save, retrieve, and manage structured data via a REST API between different executions.

Can multiple skills share a database for inter-skill communication?

Yes, multiple skills can access and modify a common data store using a shared database. This shared data storage facilitates inter-skill communication and data synchronization, allowing one skill to query data saved by another.

How does PostgREST work with PostgreSQL for state management?

PostgREST connects to a self-hosted PostgreSQL database to expose a REST API for state management. This allows Claude Code skills to perform persistent read and write operations to the database using structured table schemas with multi-level keys and JSONB payloads.

What's the best way to store structured data with JSONB payloads for Claude Code?

The best way to store structured data with JSONB payloads is through a defined database table schema using multi-level keys. This approach supports storing any data type, including configurations, user states, and logs, ensuring data persistence.

Do I need to self-host a PostgreSQL database to enable persistent state?

Yes, you need a self-hosted PostgreSQL database connected to a PostgREST instance to enable persistent state. This setup provides the centralized REST API required for Claude Code skills to execute read and write data storage operations.

Why use a REST API for cross-session memory in Claude Code skills?

A REST API provides persistent read and write access to a shared database, enabling cross-session memory. This allows skills to remember information between invocations, which is crucial for managing complex workflows and generating reports from historical data.