gen-repository

Generates JPA Repository classes from Entity definitions through a guided interview.

Updated Feb 26, 2026
One-click install
npx skills add https://github.com/VelkaressiaBlutkrone/spring-python-llm-exam-mng --skill gen-repository-velkaressiablutkrone
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gen-repository
Source: https://github.com/VelkaressiaBlutkrone/spring-python-llm-exam-mng/tree/main/.claude/skills/gen-repository
Command: npx skills add https://github.com/VelkaressiaBlutkrone/spring-python-llm-exam-mng --skill gen-repository-velkaressiablutkrone

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing JPA Repository classes by hand for every new domain Entity is repetitive boilerplate work, and inconsistencies creep in when teams mix Spring Data JPA interfaces with manual EntityManager implementations. This Skill collects the target Entity, implementation style, and custom query methods through a short interview, then generates a Repository class that matches the project's existing conventions. ## Core Features & Use Cases - Guided Interview: Asks one question at a time to collect the target domain, implementation approach, and required custom query methods, skipping questions when the user already provided enough detail. - Two Implementation Styles: Generates either a Spring Data JPA interface extending JpaRepository with @Query methods, or a manual EntityManager-based @Repository class with find, save, and delete operations. - Convention Enforcement: Keeps PK types as Integer, writes explicit JPQL for join fetches, and places output in the domain package path consistent with the existing codebase. - Use Case: You add a new Board entity to a Spring Boot project and need a repository with a join-fetch query. Ask for the repository, answer two or three questions, and receive a ready-to-use BoardRepository.java. ## Quick Start Ask the assistant to create a repository for your entity, for example by saying "Board 엔티티의 레포지토리 만들어줘" or typing /gen-repository.

Frequently Asked Questions about gen-repository

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a JPA Repository for a new Entity in Spring Boot?▼

Trigger the skill with /gen-repository or a request like "레포지토리 만들어줘", then answer the interview questions about the target Entity, implementation style, and custom query methods. The skill outputs a complete Repository class file.

Should I use Spring Data JPA interface or EntityManager for repositories?▼

Spring Data JPA interfaces give you derived queries and less boilerplate, while EntityManager manual implementations offer full control over persistence operations. This skill supports both and checks your existing project to keep the approach consistent.

Can I add custom query methods with join fetch to a generated repository?▼

Yes. During the interview you specify needed query methods such as findByUserId or join fetches, and the skill writes them explicitly as JPQL with @Query and @Param annotations in the generated interface.

Why does the generated repository use Integer instead of Long for the primary key?▼

The skill enforces Integer as the PK type because that is the convention of the target project, and it explicitly forbids Long. This keeps generated code consistent with existing entities and repositories in the codebase.

Where is the generated Repository file placed in the project?▼

The file is written to src/main/java/com/example/ajax_demo/{domain}/{Domain}Repository.java, following the domain-based package structure. The skill checks existing repository implementations first to maintain consistency.