4a-ports-contract-audit

Audit naming, placement, and dependencies of ports and contracts in src directories and output a report and docs/todo.md.

Updated Mar 22, 2026
One-click install
npx skills add https://github.com/AgustinMadygraf/skills --skill 4a-ports-contract-audit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: 4a-ports-contract-audit
Source: https://github.com/AgustinMadygraf/skills/tree/main/4a-ports-contract-audit
Command: npx skills add https://github.com/AgustinMadygraf/skills --skill 4a-ports-contract-audit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Auditing port contracts and gateway relationships helps teams enforce consistent naming, correct placement, and reliable dependencies across the architecture, reducing integration surprises.

Core Features & Use Cases

  • Port/Contract Naming Audit: verifies that gateway contracts and port interfaces use standardized suffixes and are placed in expected modules.
  • Dependency Consistency Check: ensures use_cases import only port-interfaces and not concrete gateway implementations, preventing leakage.
  • Report & Todo Generation: updates docs/todo.md with findings to guide remediation and governance.

Quick Start

Run the ports contract audit script to generate or update docs/todo.md with current findings.

Frequently Asked Questions about 4a-ports-contract-audit

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

FAQPage Schema
How do I audit port contracts to enforce naming conventions in Python?

Static analysis of port contracts checks dependency consistency by verifying that use_cases import only port-interfaces and not concrete gateway implementations. This prevents leakage and maintains clean architectural boundaries in your Python codebase.

What does a gateway contract naming audit check for?

A gateway contract naming audit verifies that gateway contracts and port interfaces use standardized suffixes and are placed in the expected modules within src/interface_adapters/gateways to support architectural governance and maintainability.

How do I generate a remediation todo list for port and gateway dependency issues?

You can generate a remediation todo list by running the ports contract audit script. It analyzes import relationships and outputs findings directly into a generated docs/todo.md file to guide governance and architectural corrections.

Can I check if use_cases are importing concrete gateway implementations instead of port interfaces?

Yes, the Skill performs a dependency consistency check to ensure use_cases import only port-interfaces and not concrete gateway implementations, preventing dependency leakage and outputting any violations in a structured report.

Does this port contract audit require any external dependencies to run?

No, this is a community Python Skill with no external dependencies. It uses scripts to perform static analysis on your repository structure, validating port naming and import relationships without requiring additional packages.