Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

java-conventions

БесплатноБез исполняемых скриптовНе проверен

Code style, naming conventions, license headers, and patterns for Xeres Java project. Covers Allman braces, utility classes, package structure, and field…

zapekот zapek★ 224 звезды на GitHub

Об этом скилле

Java Conventions for Xeres

Code Style

  • Brace Style: Allman (braces on next line)
  • Indentation: tabs only
  • Max line length: 320 characters

License Header

Every source file must include the GPL v3 header:

/*
 * Copyright (c) [year-range] by David Gerber - https://zapek.com
 *
 * This file is part of Xeres.
 *
 * Xeres is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation...
 */

Version

The Java version used is 25.

Utility Classes

  • Must be final class
  • Private no-arg constructor that throws UnsupportedOperationException
  • No instance fields
public final class FooUtils
{
	private FooUtils()
	{
		throw new UnsupportedOperationException("Utility class");
	}

	public static void doSomething(int count)
	{
	}
}

Naming Conventions

Type Pattern
Services *Service.java
Controllers *Controller.java or *WindowController.java
REST Controllers *Controller.java in api/controller/
Client classes *Client.java
Utility classes *Utils.java
Fakes/Test fixtures *Fakes.java
Mappers *Mapper.java (static utility class)

Package Structure

io.xeres.<module>.<feature>

Module Packages
app api, application, configuration, crypto, database, job, net, service, xrs
ui client, controller, custom, event, model, support
common dto, events, id, message, rest, protocol

Logging

  • Use SLF4J (not java.util.logging)
  • Logger declaration: private static final Logger log = LoggerFactory.getLogger(ClassName.class);
  • Logging sensitive data is fine with the debug facility

Field Injection

Field injection is prohibited. Use constructor injection instead:

// Bad
@Autowired
private ProfileService profileService;

// Good
private final ProfileService profileService;

public ContactService(ProfileService profileService)
{
	this.profileService = profileService;
}
Полный SKILL.md на GitHub

Установить java-conventions в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл java-conventions?

Code style, naming conventions, license headers, and patterns for Xeres Java project. Covers Allman braces, utility classes, package structure, and field injection rules.

Как установить скилл java-conventions?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл java-conventions запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить java-conventions с