3-ports-contract-audit

Audit Python ports and contracts for naming, placement, and dependencies.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Audits and enforces consistent naming and placement of ports and contracts across a Python project, surfacing gaps in architecture boundaries and guiding remediation via docs/todo.md.

Core Features & Use Cases

  • Validate that use_cases and gateways align to defined ports and interfaces.
  • Detect naming mismatches and missing dependencies between layers.
  • Generate actionable remediation tasks in docs/todo.md for cross-layer port integrity.

Quick Start

Run the ports_contract_audit script to scan your repository and update docs/todo.md.

Frequently Asked Questions about 3-ports-contract-audit

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

FAQPage Schema
How do I audit ports and contracts to validate boundaries in a Python Clean Architecture project?

You can audit ports and contracts by analyzing Python ASTs in use_cases and interface_adapters/gateways directories to validate port boundaries, report naming mismatches, and generate remediation tasks in docs/todo.md.

How do I detect naming mismatches and missing dependencies between architectural layers?

Detect naming mismatches and missing dependencies by scanning Python ASTs in src/use_cases and src/interface_adapters/gateways to verify correct naming and placement of ports and contracts across layers.

What is the best way to enforce consistent port placement across use_cases and gateways?

Enforce consistent port placement by running a script that audits Python ASTs to validate use_cases and gateways align to defined ports and interfaces, then generates actionable remediation tasks in docs/todo.md.

Does this port audit approach work with any Python project structure?

This approach applies specifically to Python projects built with Clean Architecture, analyzing src/use_cases and src/interface_adapters/gateways directories to validate port boundaries and dependencies.

How do I generate actionable remediation tasks for cross-layer port integrity issues?

Generate remediation tasks by running a ports_contract_audit script that analyzes Python ASTs, reports architectural issues, and updates docs/todo.md with actionable tasks for cross-layer port integrity.

Why does my use_cases layer have missing dependencies or incorrect port naming?

Missing dependencies and incorrect port naming occur when use_cases and gateways do not align to defined ports and interfaces, detectable by auditing Python ASTs in src/use_cases and src/interface_adapters/gateways.