audit-gui-layers

Detect GUI code violations by analyzing imports and prohibited patterns across Python layers.

Updated Feb 26, 2026
One-click install
npx skills add https://github.com/ElPoot/contabilidad --skill audit-gui-layers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: audit-gui-layers
Source: https://github.com/ElPoot/contabilidad/tree/main/.agents/skills/audit-gui-layers
Command: npx skills add https://github.com/ElPoot/contabilidad --skill audit-gui-layers

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you prevent architectural violations by ensuring your three-layer structure stays clean: gui/ only renders and delegates, while core/ contains domain rules.

Core Features & Use Cases

  • Cross-layer import auditing: Checks that core/ and app/ do not import gui/, that gui/ does not import core/ directly, and that app/ does not pull in UI frameworks like customtkinter.
  • Domain leakage detection in the view: Searches gui/ for prohibited patterns such as direct database/file operations and accounting logic calls that should live in app/ or core/.
  • Controller delegation validation: Reviews gestor_contable/app/ to confirm controllers/use-cases import from core/ (not gui/) and that app/ remains UI-agnostic.
  • Refactoring-aware reporting: Avoids reporting known, already-documented migration debt (per CLAUDE.md) and focuses on newly introduced violations only.

Quick Start

Ask the AI to run an architecture audit for gestor_contable/gui/, gestor_contable/app/, and gestor_contable/core/ to report any new import or domain-logic leakage between layers.

Frequently Asked Questions about audit-gui-layers

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

FAQPage Schema
How do I detect business logic leaking into my Python GUI code?

Detect business logic leaking into Python GUI code by scanning the gui/ directory for direct database operations, file I/O, and accounting logic calls that should reside in app/ or core/ layers.

How do I enforce import direction rules in a layered Python architecture?

Enforce import direction rules in a layered Python architecture by validating that core/ and app/ never import gui/, gui/ avoids importing core/ directly, and app/ excludes UI frameworks like customtkinter.

Why does my customtkinter application have core logic in the view layer?

Core logic infiltrates the view layer when gui/ modules directly execute domain rules or database operations instead of delegating to app/ controllers, violating separation of concerns in desktop applications.

Can I audit a Python 3-layer architecture without flagging known migration debt?

Audit a Python 3-layer architecture without flagging known migration debt by referencing documented exceptions in CLAUDE.md, ensuring the report surfaces only newly introduced import or domain-logic violations.

What is the best way to keep business logic out of GUI code during refactoring?

Keep business logic out of GUI code during refactoring by running automated controller delegation validation to ensure app/ use-cases import exclusively from core/ while the gui/ layer remains purely visual.

What are the limitations of automated architecture audits for Python desktop apps?

Automated architecture audits for Python desktop apps are limited to detecting static import patterns and prohibited domain calls, relying on pre-documented migration debt in CLAUDE.md to avoid reporting legacy unrefactored code.