Creates Spring Data JPA repositories following best practices.
Creates Spring Data JPA repositories for aggregate roots with JPQL queries, constructor expressions, and default methods. Triggers when you need to create repository interfaces for entity access patterns.
/plugin marketplace add sivaprasadreddy/sivalabs-marketplace/plugin install spring-boot-dev@sivalabs-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
The following are key principles to follow while creating Spring Data JPA Repositories:
@Query with JPQL for custom queriesFile: events/domain/EventRepository.java
interface EventRepository extends JpaRepository<EventEntity, EventId> {
@Query("""
SELECT e FROM EventEntity e
WHERE e.startDatetime > :now
ORDER BY e.startDatetime ASC
""")
List<EventEntity> findUpcomingEvents(@Param("now") Instant now);
@Query("""
SELECT e FROM EventEntity e
WHERE e.code = :code
""")
Optional<EventEntity> findByCode(@Param("code") EventCode code);
// Convenience methods using default interface methods
default EventEntity getByCode(EventCode eventCode) {
return this.findByCode(eventCode)
.orElseThrow(() -> new ResourceNotFoundException("Event not found with code: " + eventCode));
}
}
Enable JPA Auditing support to automatically populate createdAt and updatedAt fields.
@CreatedDate and @LastModifiedDate annotations to your BaseEntity class.@EntityListeners(AuditingEntityListener.class) to your BaseEntity class.@Configuration class and add @EnableJpaAuditing annotation.package dev.sivalabs.meetup4j.shared;
import jakarta.persistence.Column;
import jakarta.persistence.EntityListeners;
import jakarta.persistence.MappedSuperclass;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import java.time.Instant;
@MappedSuperclass
@EntityListeners(AuditingEntityListener.class)
public abstract class BaseEntity {
@Column(name = "created_at", nullable = false, updatable = false)
@CreatedDate
protected Instant createdAt;
@Column(name = "updated_at", nullable = false)
@LastModifiedDate
protected Instant updatedAt;
// Getters and setters
}
Enable JPA Auditing in your application configuration:
@Configuration
@EnableJpaAuditing
public class JpaConfig {
}
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.