Explore the guides +
Skills/init-database
Foundation / SKILL GUIDE

init-database

Connect the backend to Postgres. Keep schema decisions separate.

This skill does the wiring: validated configuration, one reusable client, and environment files. It deliberately stops short of creating tables. That keeps “connect my database” from quietly becoming “design my data model.”

When I’d use it

Use it when an existing backend needs a database connection through Prisma, Drizzle, or Supabase. Prisma and Drizzle are Node.js options; Supabase also supports the Python and Go backends.

Before you start

Have a backend and a database provider in mind. You’ll need a Postgres connection string or a Supabase project. Put real credentials in the local environment file, not in a prompt or a committed example file.

Install it. Then give it a task.

Run this in your project’s terminal. Choose your coding agent in the installer, then start a new agent session if it needs one to discover the skill.

TERMINAL
$ npx skills add akdevsaha-dev/factory-skills --skill init-database

Once installed, send a prompt like the ones below to your agent. These are example requests to adapt to your own project, not terminal commands or recorded results.

If slash commands aren’t available in your agent, write “Use the init-database skill to…” and describe the same task.

New to skills? Start with the installation walkthrough

What happens next

  1. Detects the backend stack and existing database setup.
  2. Asks you to choose Prisma, Drizzle, or Supabase unless you already specified one.
  3. Adds the config and a single client in the backend’s existing structure.
  4. Runs available checks and a connection check when real credentials are configured.

A few ways to ask

5 examples

Copy the one closest to your task. Replace names, paths, dates, and refs with ones that exist in your project.

01

Choose after inspection

SEND TO YOUR AGENT
› /init-database

The agent should show the supported choices and let you decide.

02

Use Prisma

SEND TO YOUR AGENT
› /init-database with Prisma. Use the existing backend config module. I’ll provide DATABASE_URL in the local .env file.

For a Node.js backend. The connection string can come from your Postgres provider.

03

Use Drizzle

SEND TO YOUR AGENT
› /init-database with Drizzle. Connect the Node.js backend to Postgres and keep schema and migrations out of this setup.

This makes the boundary of the task explicit.

04

Use Supabase with Python

SEND TO YOUR AGENT
› /init-database with Supabase for the existing FastAPI backend. Tell me which environment variables I need to configure.

Supabase is the supported option here; Prisma and Drizzle don’t run in a Python backend.

05

Keep credentials out of chat

SEND TO YOUR AGENT
› Use the init-database skill with Supabase. I’ll add the project settings to the local .env. Keep .env.example limited to placeholders.

If credentials are missing, a skipped connection check should be reported as skipped.

What to look for in the result

A single client, validated config, ignored local environment values, and placeholder examples. No tables, models, migrations, seed data, or local database containers are created by this skill.

A thing worth watching

Don’t ask this skill to infer your schema. Connect first, then describe the data model as a separate feature. If a database client already exists, review whether it needs extending rather than replacing.

Use it with

Based on the repository’s skill instructions.Read the source
PUT IT INTO PRACTICE

Build a workflow you can repeat.

Follow the step-by-step guide to working with agents.

Explore Learn