archunit-rules
БесплатноБез исполняемых скриптовНе проверенArchUnit architecture rules enforced in Xeres including common module rules (logging, utility classes), app module rules (no field injection, RsService…
от zapek★ 224 звезды на GitHubОб этом скилле
ArchUnit Rules for Xeres
Architecture rules are enforced via ArchUnit tests:
common/src/testFixtures/- shared rules (CodingRulesTest)common/src/test/- common module rules (CommonCodingRulesTest)app/src/test/- app module rules (AppCodingRulesTest)ui/src/test/- UI module rules (UiCodingRulesTest)
Running Rules
./gradlew test --tests "*CodingRulesTest"
Common Module Rules (CommonCodingRulesTest)
Logging
- No
java.util.loggingallowed - Use SLF4J only
Logger Declaration
private static final Logger log; // Correct
Logger logger; // Wrong
Utility Classes
public final class FooUtils
{ // Correct
private FooUtils()
{
throw new UnsupportedOperationException("Utility class");
}
}
Identifier Classes
Must implement Identifier and have public static final int LENGTH:
public class ProfileFingerprint implements Identifier, Comparable<ProfileFingerprint>
{
public static final int LENGTH = 32;
}
App Module Rules (AppCodingRulesTest)
No Field Injection
// Allowed
private final ProfileService profileService;
public Service(ProfileService profileService)
{
// More code
}
// Forbidden
@Autowired
private ProfileService profileService;
RsService Naming
Service subclasses must end with RsService:
public class AvatarRsService extends RsService
{
} // Correct
public class AvatarService extends RsService
{
} // Wrong
JPA Entities
Must have public or protected no-arg constructor:
@Entity
public class Profile
{
protected Profile() { } // Required
}
Item Classes
- Public no-arg constructor
clone()method implemented- Meaningful
toString()method
No UI Access
app module cannot access ui module packages:
@Test
void archUnit()
{
noClasses()
.that()
.resideInPackage("io.xeres.app..")
.should()
.accessClassesThat()
.resideInPackage("io.xeres.ui..");
}
UI Module Rules (UiCodingRulesTest)
WindowController Naming
public class SettingsWindowController
{
} // Correct
public class SettingsController
{
} // Wrong
No FileChooser Initial Directory
Use ChooserUtils instead:
void test()
{
// Forbidden
fileChooser.setInitialDirectory(path);
// Use instead
ChooserUtils.setInitialDirectory(fileChooser, path);
}
No Field Injection
Same rule as app module.
Установить archunit-rules в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл archunit-rules?
ArchUnit architecture rules enforced in Xeres including common module rules (logging, utility classes), app module rules (no field injection, RsService naming), and UI module rules (WindowController naming).
Как установить скилл archunit-rules?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл archunit-rules запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic