arch-verify

Verifies Java architecture rules for package boundaries and dependency constraints via ArchUnit tests.

Updated Jan 5, 2026
One-click install
npx skills add https://github.com/LLLLimbo/Skills --skill arch-verify
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: arch-verify
Source: https://github.com/LLLLimbo/Skills/tree/main/backend-development/arch-verify
Command: npx skills add https://github.com/LLLLimbo/Skills --skill arch-verify

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires git, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps teams enforce Java architecture rules by applying ArchUnit checks to package boundaries, layer constraints, and dependency graphs, reducing governance drift and enabling early feedback in CI.

Core Features & Use Cases

  • Rule validation: verify packages, layers, slices, cycles, and dependencies in Java projects.
  • CI governance: run architecture checks as unit tests to fail builds on violations.
  • Refactor safety: ensures architectural boundaries are preserved during refactors and across repositories.

Quick Start

Add ArchUnit dependencies (archunit, archunit-junit4 or archunit-junit5) to the test classpath, write ArchUnit tests, and execute via your build tool (e.g., mvn test or gradle test).

Frequently Asked Questions about arch-verify

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce Java architecture rules in CI to prevent dependency drift?

You can enforce Java architecture rules in CI by running ArchUnit checks as unit tests to fail builds on package boundary and dependency constraint violations. This provides early feedback during refactors and governance across multiple repositories.

What is the best way to verify package boundaries and layer constraints in a Java project?

Verifying package boundaries and layer constraints in a Java project is done using ArchUnit to validate packages, layers, slices, cycles, and dependencies. Writing these checks as tests ensures architectural boundaries are preserved during code changes.

Do I need JUnit to run ArchUnit architecture checks in Maven?

You need a test framework like JUnit 4, JUnit 5, or plain tests to run ArchUnit architecture checks. Add the ArchUnit dependencies to your test classpath and execute the validation via your build tool using the Maven plugin or Gradle.

Can I use ArchUnit to fail a CI pipeline build when architectural rules are violated?

You can use ArchUnit to fail a CI pipeline build by integrating architecture checks as unit tests. When package boundaries or dependency constraints are violated, the tests fail, providing immediate governance feedback and preventing bad merges.

How does checking architectural constraints help with refactoring Java repositories?

Checking architectural constraints helps refactoring Java repositories by ensuring structural boundaries and dependency graphs are preserved. Running these checks in CI prevents accidental governance drift when modifying code across multiple repositories.

What types of dependency constraints can ArchUnit validate for Java governance?

ArchUnit can validate package boundaries, layer constraints, slices, cycles, and dependency graphs for Java governance. These checks are executed as unit tests to enforce proper architectural rules and prevent dependency violations.