0023-laravel-complexity-guardrails

Community

Keep Laravel code simple and maintainable.

AuthorMrJmpl3
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill helps teams reduce cyclomatic complexity and improve maintainability in Laravel codebases where control flow becomes tangled, functions grow too large, and responsibilities blur.

Core Features & Use Cases

  • Complexity targets: Enforces practical limits like cyclomatic complexity ≤ 7 per function and function length ≤ 80 lines to encourage early refactoring.
  • Refactoring tactics: Promotes guard clauses, helper extraction, and replacing large if/else or switch statements with table-driven or strategy patterns.
  • Separation of phases: Encourages clear module phases such as parse → validate → normalize → act to avoid mixing concerns.
  • Refactor now signals: Flags hard-to-test paths, repeated conditionals with subtle differences, and mixed responsibilities as candidates for immediate improvement.

Quick Start

Ask your AI pair reviewer to audit a specific Laravel service class for complexity and refactor opportunities using the provided guardrails, then produce a helper/strategy-based rewrite plan.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: 0023-laravel-complexity-guardrails
Download link: https://github.com/MrJmpl3/codex_____data_____configuration/archive/main.zip#0023-laravel-complexity-guardrails

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.