gate-wiring

Detect unused exports, orphaned files, layer violations, and circular dependencies in changed code.

9|1|Updated Feb 9, 2026
One-click install
npx skills add https://github.com/Obsidian-Owl/specwright --skill gate-wiring
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gate-wiring
Source: https://github.com/Obsidian-Owl/specwright/tree/main/skills/gate-wiring
Command: npx skills add https://github.com/Obsidian-Owl/specwright --skill gate-wiring

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents code rot by detecting and flagging issues like unused exports, orphaned files, architectural layer violations, and circular dependencies, ensuring the codebase remains well-structured and maintainable.

Core Features & Use Cases

  • Unused Export Detection: Identifies exported code elements that are never imported or used.
  • Orphaned File Identification: Finds files within the project that are not referenced by any other part of the codebase.
  • Architecture Layer Enforcement: Verifies that code adheres to defined architectural layers, preventing cross-layer violations.
  • Circular Dependency Detection: Catches import cycles that can lead to runtime errors and complex maintenance.
  • Use Case: Before merging a pull request, this Skill can automatically scan the changed files and their immediate dependents to ensure no new dead code or architectural breaches are introduced.

Quick Start

Run the gate-wiring skill to analyze the recently changed files for any wiring issues.

Frequently Asked Questions about gate-wiring

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

FAQPage Schema
How do I detect circular dependencies and unused exports in my codebase?

Static analysis tools and LLM-based analysis can detect unused exports and circular dependencies by scanning changed files and their immediate dependents to verify structural connectivity and prevent code rot.

What is the best way to find orphaned files before merging a pull request?

Finding orphaned files before a merge requires scanning changed files to identify any project files not referenced by other codebase parts, ensuring no new dead code is introduced.

How does architecture layer enforcement work for code review?

Architecture layer enforcement works by verifying code adherence to defined layers during static analysis, automatically flagging cross-layer violations in reviewed files to maintain structural integrity.

Can I use static analysis to check only changed files for dependency issues?

Yes, static analysis can focus structural verification on changed files and their immediate dependents to catch dependency issues and architectural breaches efficiently without scanning the entire project.

What causes circular dependencies and orphaned files in a codebase?

Circular dependencies and orphaned files occur when untracked code connectivity changes introduce import cycles, unused exports, and unreferenced files, causing code rot and complicating maintenance.