Creates Spring Service classes following best practices.
Generates Spring Boot service classes with CQRS pattern, creating separate Command and Query services with proper transactional annotations and dedicated input/output objects.
/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 Service classes:
@Transactional for all write operations@Transactional(readOnly = true) for all read operationsXCmd, XQuery and XResult@Service
@Transactional
public class EventCommandService {
private final EventRepository eventRepository;
private final SpringEventPublisher eventPublisher;
EventCommandService(EventRepository eventRepository,
SpringEventPublisher eventPublisher) {
this.eventRepository = eventRepository;
this.eventPublisher = eventPublisher;
}
public EventCode createEvent(CreateEventCmd cmd) {
var event = EventEntity.createDraft(
cmd.details(),
cmd.schedule(),
cmd.type(),
cmd.ticketPrice(),
cmd.capacity(),
cmd.location()
);
eventRepository.save(event);
eventPublisher.publish(new EventCreated(
event.getCode().code(),
event.getDetails().title(),
event.getDetails().description()
));
return event.getCode();
}
public void cancelEvent(CancelEventCmd cmd) {
EventEntity event = eventRepository.getByCode(cmd.eventCode());
if(event.cancel()) {
eventRepository.save(event);
eventPublisher.publish(new EventCancelled(
event.getCode().code(),
event.getDetails().title(),
event.getDetails().description()
));
}
}
//...
//...
}
@Service
@Transactional(readOnly = true)
public class EventQueryService {
private final EventRepository eventRepository;
private final EventMapper eventMapper;
EventQueryService(EventRepository eventRepository, EventMapper eventMapper) {
this.eventRepository = eventRepository;
this.eventMapper = eventMapper;
}
public List<EventVM> getUpcomingEvents() {
return eventRepository.findUpcomingEvents(Instant.now())
.stream().map(eventMapper::toEventVM).toList();
}
public EventVM getByCode(EventCode eventCode) {
var event = eventRepository.getByCode(eventCode);
return eventMapper.toEventVM(event);
}
//...
}
ViewModel Example:
public record EventVM(
Long id,
String code,
String title,
String description,
Instant startDatetime,
Instant endDatetime,
//...
//...
String venue,
String virtualLink,
int registeredUsersCount) {}
Mapper Example:
@Component
class EventMapper {
EventVM toEventVM(EventEntity event) {
return new EventVM(
event.getId().id(),
event.getCode().code(),
event.getDetails().title(),
event.getDetails().description(),
//...
event.getLocation().virtualLink(),
event.getRegistrationsCount()
);
}
}
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.