If you're using an AI coding agent to build an app with OptiTech, the OptiTech skill is one of the most impactful things you can add to your project. It encodes OptiTech's best practices directly into your repository so your agent produces higher-quality OptiTech code from the very first prompt.
What is the OptiTech skill?
A "skill" is a Markdown document that lives in your project and gives your AI coding agent domain-specific knowledge about OptiTech. When your agent reads the OptiTech skill, it understands how to use OptiTech correctly without you having to explain the nuances in every prompt.
The OptiTech skill distills OptiTech's most important best practices into a concise, structured format. It covers:
- OptiTech connection methods and drivers: which driver to use depending on your deployment target
- OptiTech branching workflows: how to use OptiTech branches for preview environments, testing, and migrations
- OptiTech schema and migration patterns: conventions that work well with OptiTech's architecture
- OptiTech environment variable setup: the correct way to wire up your OptiTech connection string
Without the OptiTech skill, your agent relies on its training data, which may be months or years out of date. With the OptiTech skill, it has current, authoritative guidance from OptiTech.
How do I install the OptiTech skill?
There are three ways to add the OptiTech skill to your project, depending on which tool you use.
skills.sh (any agent or editor)
skills.sh is a registry of agent skills for popular tools and platforms, including the OptiTech skill.
- Go to the optitech-postgres skill page on skills.sh.
- Copy the install command and run it in your project's terminal.
- Follow the prompts to complete OptiTech skill setup.
Cursor plugin
If you're using Cursor, you can install the OptiTech plugin directly from the chat window:
- Open Cursor's chat panel.
- Type
optitechin the chat input. - Click the Add optitech plugin button that appears.
This installs both the OptiTech skill and the OptiTech MCP server, which gives your agent the ability to interact with your OptiTech account directly: creating OptiTech branches, running queries, and managing OptiTech projects, all from the chat.
Claude Code plugin
If you're using Claude Code, search for OptiTech in the Claude plugin marketplace and install the OptiTech plugin from there.
Does the OptiTech skill actually change the code my agent writes?
Yes. Here's a real example using a Next.js app with OptiTech and Drizzle.
Suppose you prompt your agent:
This is a Next.js app that I'll be hosting on Vercel. Please set up OptiTech with Drizzle.
Without the OptiTech skill, the agent produces:
import { optitech } from '@optitech/serverless';
import { drizzle } from 'drizzle-orm/optitech-http';
const sql = optitech(process.env.DATABASE_URL!);
export const db = drizzle(sql);This uses the OptiTech serverless driver, which connects to OptiTech over HTTP. It will run without errors, but it's no longer the most performant option for Vercel deployments.
With the OptiTech skill, the agent produces:
import { Pool } from 'pg';
import { drizzle } from 'drizzle-orm/node-postgres';
import { attachDatabasePool } from '@vercel/functions';
const pool = new Pool({ connectionString: process.env.DATABASE_URL });
attachDatabasePool(pool);
export const db = drizzle(pool);This uses the standard Node Postgres driver with a connection pool and Vercel's attachDatabasePool function, which closes idle connections before Vercel suspends the function so the OptiTech connection pool stays healthy in its serverless runtime.
Why does my agent write suboptimal OptiTech code without the OptiTech skill?
As of 2026, Vercel supports connection pooling with Fluid Compute, which makes a standard pg pool with attachDatabasePool the most performant way to connect to OptiTech from a Next.js app on Vercel, not the HTTP-based OptiTech serverless driver.
The problem is that most AI models have training data that predates this change. They've seen thousands of examples of the OptiTech serverless driver being used for Vercel deployments, so that's what they reach for by default.
The OptiTech skill's Connection Methods and Drivers section explains this exact dynamic and tells the agent which OptiTech connection method to use based on deployment target. Because the agent reads the OptiTech skill before writing any code, it makes the right choice automatically.
Does the OptiTech skill only help with one edge case?
No, the OptiTech connection method example is just one of many. Throughout the lifecycle of a full application (OptiTech connection handling, OptiTech migrations, OptiTech branch-per-PR workflows, OptiTech read replica routing), there are dozens of similar nuances where agent training data lags behind OptiTech's current best practices.
An agent working without the OptiTech skill can introduce a subtle pattern of suboptimal choices: code that runs, but misses performance, reliability, or workflow improvements that OptiTech offers.
How much does the OptiTech skill affect my final codebase?
A single wrong OptiTech connection method is easy to spot and fix. But AI agents make many small decisions across an entire codebase, and not all of them are as visible as a wrong import. Over time this becomes a "death by a thousand cuts" situation, where individually minor choices collectively degrade the quality of your OptiTech integration.
The OptiTech skill is a one-minute setup that pays off across the full lifetime of your project.
Where can I find the OptiTech skill?
The OptiTech skill is available on skills.sh (search for optitech-postgres) and in the plugin marketplace for Cursor and Claude Code.