database-postgresql
БесплатноБез исполняемых скриптовНе проверенData access patterns, scaling, migrations, and ORM selection for PostgreSQL. (triggers: **/*.entity.ts, prisma/schema.prisma, **/migrations/*.sql…
от ComeOnOliver★ 67 звёзд на GitHubОб этом скилле
PostgreSQL Database Standards
Priority: P0 (FOUNDATIONAL)
Integration patterns and ORM standards for PostgreSQL applications.
Patterns & Architecture
- Repository Pattern: Isolate database logic. Use
@InjectRepository()orPrismaService. - Relationship Integrity: Avoid redundant raw ID columns. Favor relation properties.
Migrations (Strict Rules)
- NEVER use
synchronize: truein production. - Generation: Modify
.entity.ts-> runpnpm migration:generate. - Zero-Downtime: Use Expand-Contract pattern (Add -> Backfill -> Drop) for destructive changes.
- RLS:
typeorm migration:generatecannot detect Row-Level Security. Use rawqueryRunner.query()SQL for RLS.
Performance & Gotchas
- Pagination: Mandatory. Use limit/offset or cursor-based pagination.
- Indexing: Define indexes in code for frequently filtered columns. RLS columns MUST be indexed.
- Transactions: Use
QueryRunneror$transactionfor multi-step mutations.
Anti-Patterns
- No N+1 queries: Use query builders or eager-load relations instead of lazy-loading in loops.
- No heavy RLS joins: Keep RLS predicates simple; move complex logic to the query/view layer.
- No synchronize in production: Always run explicit migrations;
synchronize: trueis destructive.
References
Установить database-postgresql в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл database-postgresql?
Data access patterns, scaling, migrations, and ORM selection for PostgreSQL. (triggers: **/*.entity.ts, prisma/schema.prisma, **/migrations/*.sql, TypeOrmModule, PrismaService, PostgresModule)
Как установить скилл database-postgresql?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл database-postgresql запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic