reviewing-readability

Assess code readability and enforce Miller's Law complexity limits.

11|1|Updated Aug 6, 2025
One-click install
npx skills add https://github.com/thkt/claude-config --skill reviewing-readability
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: reviewing-readability
Source: https://github.com/thkt/claude-config/tree/main/ja/skills/reviewing-readability
Command: npx skills add https://github.com/thkt/claude-config --skill reviewing-readability

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

コードの可読性と認知負荷を評価・改善します。

Core Features & Use Cases

  • 命名・構造・ネストの最適化
  • ミラーの法則に基づく複雑さの抑制
  • コメント戦略の改善提案

Quick Start

可読性の高い名前と単純なフローを提案します。

Frequently Asked Questions about reviewing-readability

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

FAQPage Schema
How do I evaluate code readability and reduce cognitive load in reviews?▼

Code readability assessment applies Miller's Law thresholds to measure cognitive load. Evaluate naming clarity, control flow simplicity, and nesting depth against practical limits: parameters ≤5, methods ≤7, branches ≤5, function length ≤15 lines, nesting ≤3. This identifies where refactoring reduces mental overhead during code review.

What are Miller's Law thresholds for manageable code complexity?▼

Miller's Law establishes cognitive limits for holding information. Applied to code: functions should have ≤5 parameters, ≤7 methods per class, ≤5 branches per function, ≤15 lines per function, and ≤3 levels of nesting. These thresholds keep code within human working memory capacity.

How do I refactor code for better naming and structure?▼

Refactoring for readability involves optimizing naming conventions, simplifying control flow, and reducing nesting depth. Apply before/after guidance grounded in The Art of Readable Code principles: use descriptive names, flatten nested logic, extract long functions into smaller units, and justify complexity where limits are exceeded.

When should I apply readability reviews to my codebase?▼

Readability assessment fits code reviews, refactoring initiatives, and architecture design decisions. Use it when cognitive load becomes a bottleneck—functions exceed complexity limits, naming obscures intent, or nested control flow impairs maintainability. Early application prevents technical debt accumulation.

What makes naming and control flow choices impact code readability?▼

Readability depends on how quickly developers understand intent without excessive cognitive effort. Clear naming eliminates ambiguity, simple control flow reduces branching confusion, and shallow nesting prevents stack-overflow of logical context. These align directly with Miller's Law constraints on working memory.

Can readability assessment work across different coding styles?▼

Yes. Readability evaluation applies language-agnostic principles—parameter counts, nesting depth, function length, and branch complexity—across any codebase. Style variations matter less than consistency with cognitive limits and comment strategy improvements tailored to your team's conventions.