complexity-guardrails

Keep cyclomatic complexity low; flatten control flow, extract helpers, and prefer table-driven/strategy patterns over large switches

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "complexity-guardrails" with this command: npx skills add noartem/laravel-vue-skills/noartem-laravel-vue-skills-complexity-guardrails

Complexity Guardrails

Design to keep complexity low from day one.

Targets

  • Cyclomatic complexity per function ≤ 7 (start splitting at 5)
  • Function length ≤ 80 lines (aim for ≤ 30)
  • One responsibility per function; one axis of variation per module

Tactics

  • Use early returns and guard clauses; avoid deep nesting
  • Extract branch bodies into named helpers
  • Replace long if/else/switch with tables (maps) or strategies
  • Separate phases: parse → validate → normalize → act

Signs to refactor now

  • Hard-to-test code paths
  • Repeated conditionals with subtle differences
  • Mixed concerns (IO, validation, transformation) in one method

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

shadcn-vue

No summary provided by upstream source.

Repository SourceNeeds Review
General

laravel-routes-best-practices

No summary provided by upstream source.

Repository SourceNeeds Review
General

baseline-ui

No summary provided by upstream source.

Repository SourceNeeds Review
General

laravel-data-chunking-large-datasets

No summary provided by upstream source.

Repository SourceNeeds Review