review-structural-hygiene

Audit TypeScript React and Express/Prisma codebases for structural hygiene violations.

Updated Apr 3, 2026
One-click install
npx skills add https://github.com/jacocanete/cebu-airsoft-hub --skill review-structural-hygiene
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: review-structural-hygiene
Source: https://github.com/jacocanete/cebu-airsoft-hub/tree/main/.opencode/skills/review-structural-hygiene
Command: npx skills add https://github.com/jacocanete/cebu-airsoft-hub --skill review-structural-hygiene

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill performs a thorough structural hygiene audit to surface oversized files, dead code, misplaced logic, hook/component boundary violations, multi-component files, and TanStack Router or server-client type mismatches that reduce maintainability and increase technical debt.

Core Features & Use Cases

  • Oversized file detection: Scans .ts and .tsx files in src/ and server/src/ and flags files over configurable thresholds with splitting recommendations.
  • Dead code and import analysis: Detects unused exports, unreferenced files, long commented-out blocks, unused imports, and stray console.log statements and judges whether they are safe to remove.
  • Misplaced code and hook boundaries: Identifies utilities, types, hooks, and data-fetching logic defined inline in components or routes and recommends relocation to src/lib/, src/types/, or src/hooks/.
  • Multi-component and naming checks: Finds files exporting multiple components, enforces one-component-per-file convention, and checks PascalCase/component, kebab-case hook, and import alias consistency.
  • TanStack Router and type sync checks: Verifies dynamic route param/search access patterns, presence of pending/error/auth guards, and reconciles frontend types with backend Prisma selections to uncover mismatches.
  • Use case: Run this as Pass 1 on a TypeScript React frontend and Express/Prisma backend repository to prepare the codebase for deeper DRY, performance, and accessibility reviews.

Quick Start

Run the review-structural-hygiene skill to perform a Pass 1 structural hygiene audit across the repository.

Frequently Asked Questions about review-structural-hygiene

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

FAQPage Schema
How do I find dead code and oversized files in a React codebase?

Dead code and oversized file detection scans .ts and .tsx files in src/ and server/src/ to flag unused exports, unreferenced files, long commented-out blocks, and stray console.log statements, providing splitting recommendations for files exceeding configurable thresholds.

Can I check TanStack Router configuration issues and Prisma type mismatches automatically?

TanStack Router and Prisma type checks verify dynamic route param and search access patterns, confirm pending, error, and auth guards are present, and reconcile frontend types with backend Prisma selections to uncover server-client type mismatches.

What is structural code hygiene and when do I need it for TypeScript projects?

Structural code hygiene audits surface oversized files, dead code, misplaced logic, hook and component boundary violations, and router configuration issues that reduce maintainability and increase technical debt in TypeScript React and Express/Prisma projects.

How do I enforce one-component-per-file and naming conventions in React?

Multi-component and naming checks find files exporting multiple components, enforce the one-component-per-file convention, and verify PascalCase for components, kebab-case for hooks, and import alias consistency across the repository.

Does this structural audit work with Express and Prisma backends or only React frontends?

The structural audit applies to both TypeScript React frontends and Express/Prisma backends, scanning src/ and server/src/ directories to identify misplaced logic, server-client type mismatches, and data-fetching logic defined inline in components.

What are the limitations of structural hygiene audits for code review?

Structural hygiene audits serve as a Pass 1 review focused on file structure, dead code, and routing patterns, requiring repository file tree access and line counting, meaning deeper DRY, performance, and accessibility reviews must follow as subsequent passes.