Automated summary
Structured guide for designing database schemas, writing Flyway migrations, and optimizing JPA entities, with a strict prohibition against direct database execution.
Strengths
- Prevents common mistakes by forbidding dangerous actions like direct SQL execution or editing already-applied Flyway files.
- Provides detailed checklists for entities, migrations, and performance, ensuring code consistency and quality.
- Incorporates specific best practices (UUID, lazy loading, @EntityGraph, indexing) suitable for production environments.
Limitations
- Does not cover database-level role or permission management.
- Assumes the project already uses Flyway and BaseEntity, limiting portability.
- Does not provide automated solutions for detecting N+1 queries or optimizing indexes.
Use this skill when you need to create or modify JPA entities, write Flyway migrations, or optimize query performance in a Spring Boot project with PostgreSQL.
Avoid using it if the project does not use Flyway or JPA, or if you need to execute SQL commands directly on the database.
Security analysis
SafeThe skill only provides a checklist for writing files (entity classes, SQL migrations) and explicitly prohibits direct database execution or modifying applied migrations. There are no executable commands, network calls, or destructive instructions.
No concerns found
How this analysis is madeExamples
Create a new User entity in the member/domain/entity/ package with UUID primary key, email, nickname, and a OneToMany relationship to Post (lazy). Then generate a Flyway migration V2__create_user_table.sql with appropriate UUID default and indexes on email.I need to optimize the feed query for the Post entity. Currently, fetching posts with comments causes N+1. Please add an @EntityGraph to the repository method and create an index on the created_at column for pagination. Also ensure comment_count is not using a COUNT query but a cached counter.Create a Follow entity with composite primary key (follower_id, followee_id) using @IdClass. It should extend BaseEntity, use UUID for the IDs, and include a Flyway migration with the appropriate primary key and indexes.name: db-skill description: DB 스키마 설계, 마이그레이션 작성, 엔티티 최적화 시 사용. 직접 DB 실행 금지.
DB 작업 체크리스트
절대 금지 (시작 전 재확인)
- DB 클라이언트(psql 등) 직접 실행 금지
- 이미 적용된 Flyway 파일 수정 금지
ddl-auto=create/update설정 금지- 파일 작성만. 실행은 사람이 한다.
작업 시작 전
- [ ]
.claude/docs/db-docs.md읽기 (스키마, 인덱스, Redis 전략) - [ ] 기존 Flyway 파일 버전 확인 (
src/main/resources/db/migration/)
엔티티 작성 체크리스트
- [ ] 엔티티는
{domain}/entity/패키지에 작성 - [ ]
BaseEntity상속 확인 (createdAt, updatedAt 자동 관리) - [ ] ID 타입은 UUID,
@GeneratedValue(strategy = GenerationType.UUID) - [ ]
@OneToMany는LAZY로딩 기본 - [ ] 복합 PK는
@IdClass+@Getter @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode implements Serializable
Flyway 마이그레이션 작성 체크리스트
- [ ] 파일명:
V{N}__{설명}.sql(언더스코어 두 개) - [ ] 위치:
src/main/resources/db/migration/ - [ ] UUID 기본값:
DEFAULT gen_random_uuid() - [ ] 타임스탬프:
DEFAULT now() - [ ] 인덱스 포함 여부 확인
성능 체크리스트
- [ ] 피드 조회 N+1 없는가? (
@EntityGraph또는 fetch join) - [ ]
like_count,comment_countCOUNT 쿼리 없는가? (카운터 캐시 패턴) - [ ] 조회 조건 컬럼에 인덱스 있는가?
- [ ] Redis 캐시 대상인지 확인 (
tags:trending,auth:refresh:{userId})
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/db-schema-design-migration-checklist-mrwak8k3/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/db-schema-design-migration-checklist-mrwak8k3' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/db-schema-design-migration-checklist-mrwak8k3/download' --output '.skill-downloads/db-schema-design-migration-checklist-mrwak8k3/SKILL.md.part' && mv '.skill-downloads/db-schema-design-migration-checklist-mrwak8k3/SKILL.md.part' '.skill-downloads/db-schema-design-migration-checklist-mrwak8k3/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/db-schema-design-migration-checklist-mrwak8k3/SKILL.md' && test -s '.skill-downloads/db-schema-design-migration-checklist-mrwak8k3/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/db-skill' && cp -R '.skill-downloads/db-schema-design-migration-checklist-mrwak8k3' '.claude/skills/db-skill'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/db-schema-design-migration-checklist-mrwak8k3'openskills read 'db-schema-design-migration-checklist-mrwak8k3'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/db-schema-design-migration-checklist-mrwak8k3/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.