architecture-lint

Detect clean-architecture layer violations and dependency direction issues.

1|Updated Aug 10, 2025
One-click install
npx skills add https://github.com/varubogu/gbf_discord_bot_rs --skill architecture-lint
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: architecture-lint
Source: https://github.com/varubogu/gbf_discord_bot_rs/tree/main/.claude/skills/architecture-lint
Command: npx skills add https://github.com/varubogu/gbf_discord_bot_rs --skill architecture-lint

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Detect clean architecture layer violations and check dependency direction across the Events → Facades → Services → Repository layers. This helps maintain proper layering by preventing cross-layer direct calls and misused transactions.

Core Features & Use Cases

  • Cross-layer violation detection: identify direct calls from Events to Service/Repository and from Facade to Repository.
  • Transaction management validation: ensure transaction boundaries (begin/commit/rollback) reside in the Facade layer.
  • DB connection usage rules: prevent creating DB connections within individual layers; promote shared access from AppState.
  • Detection methodology: step-by-step approach to identify, analyze, and report violations across layers.

Quick Start

Run the architecture-lint skill on your codebase to generate a violation report.

Frequently Asked Questions about architecture-lint

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

FAQPage Schema
How do I detect clean architecture layer violations in my codebase?

You can detect clean architecture violations by running static analysis across Events, Facades, Services, and Repository layers to find cross-layer access, transaction misuse, and DB connection violations, producing a structured remediation report.

What is a direct cross-layer dependency violation in layered architecture?

A cross-layer dependency violation is an unauthorized direct call bypassing intended boundaries, such as Events calling Services or Repositories directly, or Facades accessing Repositories. Static analysis identifies these calls to enforce proper layering.

How do I enforce transaction boundaries in the Facade layer?

Enforce transaction boundaries in the Facade layer by validating that begin, commit, and rollback operations reside exclusively there. The linter detects transaction misuse outside this layer and reports it for remediation.

Can I check if database connections are created inside individual service layers?

Yes, you can check for DB connection violations by scanning layers to prevent individual components from creating their own connections. The linter enforces shared access from AppState and flags unauthorized connection creation.

What types of architectural rules can a static analysis linter check beyond dependency direction?

Beyond dependency direction, a static analysis linter checks architectural rules including transaction boundary placement and database connection usage. It detects transaction misuse and prevents layers from creating independent DB connections.

Does the architecture linter work without external dependencies or components?

Yes, the architecture linter works without external dependencies or components. It applies a step-by-step methodology directly to your codebase to identify, analyze, and report violations across your architectural layers.