java-conventions
БесплатноБез исполняемых скриптовНе проверенCode style, naming conventions, license headers, and patterns for Xeres Java project. Covers Allman braces, utility classes, package structure, and field…
от 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
finalclass - 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
debugfacility
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;
}
Установить 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), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic