Skip to content

Guidance on sizing and splitting Python modules by domain, layer, data type, and I/O boundary.

CCM score
42 of 100
skills.sh installs
568
GitHub stars
4K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers when to split a file: over 500 lines, mixed concerns, hard-to-find functions, or truncated AI context
  • Includes a line-count status table, package layout guidance, and a DO and DON'T list for module naming and structure
  • Provides a step-by-step refactoring workflow: identify clusters, extract incrementally, update imports, and run tests
  • Designed for Python projects where large files are slowing down human review or AI-assisted editing

Install

$ npx -y skills add parcadei/continuous-claude-v3 --skill modular-code -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Modular Code Organization

Write modular Python code with files sized for maintainability and AI-assisted development.

File Size Guidelines

LinesStatusAction
150-500OptimalSweet spot for AI code editors and human comprehension
500-1000LargeLook for natural split points
1000-2000Too largeRefactor into focused modules
2000+CriticalMust split - causes tooling issues and cognitive overload

When to Split

Split when ANY of these apply:

  • File exceeds 500 lines
  • Multiple unrelated concerns in same file
  • Scroll fatigue finding functions
  • Tests for the file are hard to organize
  • AI tools truncate or miss context

How to Split

Natural Split Points

  1. By domain concept: auth.py → auth/login.py, auth/tokens.py, auth/permissions.py
  2. By abstraction layer: Separate interface from implementation
  3. By data type: Group operations on related data structures
  4. By I/O boundary: Isolate database, API, file operations

Package Structure

Details

Repository
github.com/parcadei/continuous-claude-v3
Categories
Code Review & Quality, Python
First seen
Jun 3, 2026

More from parcadei/continuous-claude-v3

All 108

Similar to Modular Code

More Code Review & Quality