Command Palette

Search for a command to run...

Back to skills
skill № 61261

data-data-api

Use when the user asks about an instant API over a database: Hasura GraphQL, PostgREST, WunderGraph, a data gateway, real-time subscriptions or row-level…

FreeNo executable scripts
j4flmaoby j4flmao★ 47 GitHub stars

Install data-data-api in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

About this skill

Data Data API

Purpose

Design and deploy data APIs using Hasura (GraphQL) or PostgREST (REST) with authorization, real-time subscriptions, performance optimization, and security patterns.

Agent Protocol

Trigger

Exact user phrases: "data API", "Hasura", "PostgREST", "WunderGraph", "GraphQL for data", "REST API for data", "instant API", "database API", "real-time API", "data authorization", "data gateway", "auto-generated API".

Input Context

  • Database(s) to expose (PostgreSQL, MySQL, SQL Server)
  • API style preference (GraphQL, REST, both)
  • Authentication provider (Auth0, Keycloak, Cognito, custom)
  • Authorization model (RBAC, column-level, row-level)
  • Real-time requirements (subscriptions, webhooks)
  • Performance requirements (latency, throughput, caching)
  • API consumers (frontend, mobile, external, internal services)
  • Rate limiting and throttling needs

Output Artifact

Data API architecture with tool selection (Hasura/PostgREST/WunderGraph), authorization model (row-level, column-level, session), real-time subscription setup, and performance strategy.

Response Format

# API tool selection
# Hasura/PostgREST configuration
# Authorization rules (row + column level)
# Real-time subscription config
# Caching and performance tuning

No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output — why use many token when few do trick.

Completion Criteria

  • API tool selected with rationale
  • Database connected and tables tracked
  • Row-level security (RLS) configured for all tables
  • Column-level permissions set per role
  • Real-time subscriptions enabled where needed
  • Caching and rate limiting configured
  • API monitoring and logging set up
  • Error handling and mutation constraints defined

Max Response Length

350 lines of configuration.

Workflow

Step 1: Select API Tool

Tool Comparison Matrix

Tool API Style Database Support Real-time Auth
Hasura GraphQL + REST Postgres, MySQL, SQL Server, BigQuery, Snowflake Subscriptions, live queries JWT, Webhook, OIDC
PostgREST REST PostgreSQL only Webhooks (trigger) JWT, API key, OAuth
WunderGraph GraphQL + REST + RPC Postgres + any OpenAPI/gRPC Server-sent events JWT, OIDC, API key

Decision Tree

API style preference?
├── GraphQL (client-driven queries, subscriptions)
│   ├── PostgreSQL database → Hasura
│   ├── Multiple databases (MySQL, SQL Server, etc.) → Hasura
│   └── Polyglot backend (DB + external APIs) → WunderGraph
├── REST (simpler, broader client compatibility)
│   ├── PostgreSQL only → PostgREST
│   └── PostgreSQL with GraphQL also → Hasura (also serves REST)
└── RPC / serverless functions
    ├── Database-centric → PostgREST with stored procedures
    └── Polyglot → WunderGraph with TypeScript operations

Default: Hasura for GraphQL (native subscriptions, broad DB support, built-in auth). PostgREST for REST-only PostgreSQL stack. WunderGraph for polyglot backends combining data APIs with external services.

Step 2: Hasura Configuration

# docker-compose.hasura.yaml
version: "3.8"
services:
  postgres:
    image: postgres:16
    environment:
      POSTGRES_PASSWORD: ${PG_PASSWORD}
    volumes:
      - pgdata:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]
      interval: 10s

  hasura:
    image: hasura/graphql-engine:v2.40.0
    ports:
      - "8080:8080"
    depends_on:
      postgres:
        condition: service_healthy
    environment:
      HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:${PG_PASSWORD}@postgres:5432/postgres
      HASURA_GRAPHQL_ENABLE_CONSOLE: "true"
      HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_ADMIN_SECRET}
      HASURA_GRAPHQL_JWT_SECRET: '{"type":"HS256","key":"${JWT_SECRET}"}'
      HASURA_GRAPHQL_UNAUTHORIZED_ROLE: anonymous
      HASURA_GRAPHQL_ENABLE_REMOTE_SCHEMAS: "true"
      HASURA_GRAPHQL_CACHE_MAX_ENTRIES: 5000
      HASURA_GRAPHQL_DEV_MODE: "false"
      HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, websocket-log
      HASURA_GRAPHQL_STRINGIFY_NUMERIC_TYPES: "true"
      HASURA_GRAPHQL_LIVE_QUERIES_MULTIPLEXED: "true"

Step 3: Authorization Model

Role-Based Access Design

Role Row Filter Column Mask Rate Limit Use Case
anonymous None (no access) None 10 req/min Unauthenticated visitors
authenticated User sees own data Full access 100 req/min Logged-in users
data_analyst All rows, no PII Exclude PII columns 1000 req/min Internal analysts
data_owner Own domain only Full access 500 req/min Domain data stewards
admin All rows All columns 5000 req/min Platform admins
service All rows (machine) Full access 10000 req/min Backend services

Hasura Metadata Authorization

# Hasura metadata authorizatio
Full SKILL.md on GitHub

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

  • references/data-api-error-handling.md
  • references/data-api-patterns.md
  • references/data-api-security.md
  • references/data-api-versioning.md
  • references/graphql-for-data.md
  • references/hasura-postgrest.md

FAQ

What does the data-data-api skill do?

Use when the user asks about an instant API over a database: Hasura GraphQL, PostgREST, WunderGraph, a data gateway, real-time subscriptions or row-level authorization for data APIs. Produces API layer config with JWT/RBAC permissions, caching and rate limits. Not for hand-written REST/GraphQL services (use backend-api-design) or federation (use api-graphql-federation).

How do I install the data-data-api skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the data-data-api skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare data-data-api with