code-size

Installation
SKILL.md

Code Size & Complexity Limits

Complexity is the strongest single predictor of defect density, and code written by agents balloons fastest — an agent under pressure adds one more branch to an existing function far more readily than it extracts a new one. These five SwiftLint threshold rules are the deterministic cap: they keep functions small enough that tests can actually cover their branches, and they keep agents from wrangling with their own tangles.

When This Skill Activates

Use this skill when:

  • Setting up quality gates for a project where agents write most of the code
  • A review keeps flagging "this function is too long/branchy" by hand
  • Functions have grown past what their tests plausibly cover
  • Adopting the deterministic gauntlet (see testing/fitness-functions/)

The Rules

The fragment at rules/swiftlint.yml configures five built-in SwiftLint rules (all enabled by default in SwiftLint — this fragment sets the thresholds):

Installs
2
GitHub Stars
647
First Seen
Aug 2, 2026
code-size — rshankras/claude-code-apple-skills