xiaohongshu
xiaohongshu
drizzle-schema-guide
Modify Drizzle ORM database schema safely. Use when user mentions "add table", "new column", "database schema", "migration", or "drizzle".
Full skill instructions
This project uses Drizzle ORM with Neon Serverless Postgres.
db/schema.tsdrizzle.config.tsdb/index.ts// x_account_cache - Caches X account analysis
export const xAccountCache = pgTable('x_account_cache', {
id: uuid('id').primaryKey().defaultRandom(),
xHandle: text('x_handle').unique().notNull(),
searchResponse: jsonb('search_response').notNull(),
createdAt: timestamp('created_at', { withTimezone: true }).defaultNow(),
expiresAt: timestamp('expires_at', { withTimezone: true }).notNull(),
});
// usage_tracking - Tracks premium image quota
export const usageTracking = pgTable('usage_tracking', {
id: uuid('id').primaryKey().defaultRandom(),
userIdentifier: text('user_identifier').unique().notNull(),
premiumImagesCount: integer('premium_images_count').default(0),
lastResetAt: timestamp('last_reset_at', { withTimezone: true }).defaultNow(),
createdAt: timestamp('created_at', { withTimezone: true }).defaultNow(),
updatedAt: timestamp('updated_at', { withTimezone: true }).defaultNow(),
});
import { pgTable, uuid, text, timestamp, integer, index } from 'drizzle-orm/pg-core';
export const newTable = pgTable('new_table', {
id: uuid('id').primaryKey().defaultRandom(),
// columns here
createdAt: timestamp('created_at', { withTimezone: true }).defaultNow(),
}, (table) => [
index('idx_name').on(table.column), // optional indexes
]);
// Type exports
export type NewTable = typeof newTable.$inferSelect;
export type InsertNewTable = typeof newTable.$inferInsert;
export { db } from './index';
export { xAccountCache, usageTracking, newTable } from './schema';
Apply schema changes:
npm run db:push (direct push, no migration files)npm run db:generate then npm run db:migrateInspect database: npm run db:studio opens Drizzle Studio
uuid('id').primaryKey().defaultRandom()
text('name').notNull()
text('email').unique()
integer('count').default(0)
boolean('active').default(true)
jsonb('data').notNull()
timestamp('created_at', { withTimezone: true }).defaultNow()
db/schema.ts, export in db/index.tsusageTracking in schemadb:push against productionxiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience