
Modular Code
- 536 installs
- 3.9k repo stars
- Updated January 26, 2026
- parcadei/continuous-claude-v3
modular-code is a Claude Code skill that enforces modular Python file organization with explicit line-count thresholds for developers who want maintainable modules sized for AI editors and human review.
About
modular-code is a skill from parcadei/continuous-claude-v3 that guides modular Python organization with concrete file-size tiers. Files of 150–500 lines are optimal, 500–1000 are large and candidates for splitting, 1000–2000 are too large, and 2000+ lines are critical and must be split. The skill triggers splits when a file exceeds 500 lines, mixes unrelated concerns, or causes scroll fatigue for reviewers and AI tools. Developers reach for modular-code when refactoring monolithic Python modules into focused packages that stay within AI-assisted editing limits.
- modular-code
Modular Code by the numbers
- 536 all-time installs (skills.sh)
- +6 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #794 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/parcadei/continuous-claude-v3 --skill modular-codeAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 536 |
|---|---|
| repo stars | ★ 3.9k |
| Last updated | January 26, 2026 |
| Repository | parcadei/continuous-claude-v3 ↗ |
How do you split large Python files for maintainability?
Use modular-code for development tasks
Who is it for?
Python developers refactoring monolithic files who want explicit line-count rules for AI-assisted editing.
Skip if: Codebases where domain logic genuinely requires large generated files or non-Python languages.
When should I use this skill?
A Python file exceeds 500 lines, mixes unrelated concerns, or causes tooling and comprehension issues.
What you get
Refactored Python modules with focused responsibilities and file sizes in the 150–500 line optimal range.
- Refactored Python module tree
- Focused single-responsibility files
By the numbers
- 150–500 lines marked optimal Python module size
- Files above 500 lines flagged for splitting
- 2000+ lines classified as critical must-split threshold
Files
Modular Code Organization
Write modular Python code with files sized for maintainability and AI-assisted development.
File Size Guidelines
| Lines | Status | Action |
|---|---|---|
| 150-500 | Optimal | Sweet spot for AI code editors and human comprehension |
| 500-1000 | Large | Look for natural split points |
| 1000-2000 | Too large | Refactor into focused modules |
| 2000+ | Critical | Must 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
feature/
├── __init__.py # Keep minimal, just exports
├── core.py # Main logic (under 500 lines)
├── models.py # Data structures
├── handlers.py # I/O and side effects
└── utils.py # Pure helper functionsDO
- Use meaningful module names (
data_storage.pynotutils2.py) - Keep
__init__.pyfiles minimal or empty - Group related functions together
- Isolate pure functions from side effects
- Use snake_case for module names
DON'T
- Split files arbitrarily by line count alone
- Create single-function modules
- Over-modularize into "package hell"
- Use dots or special characters in module names
- Hide dependencies with "magic" imports
Refactoring Large Files
When splitting an existing large file:
1. Identify clusters: Find groups of related functions 2. Extract incrementally: Move one cluster at a time 3. Update imports: Fix all import statements 4. Run tests: Verify nothing broke after each move 5. Document: Update any references to old locations
Current Codebase Candidates
Files over 2000 lines that need attention:
- Math compute modules (scipy, mpmath, numpy) - domain-specific, may be acceptable
- patterns.py - consider splitting by pattern type
- memory_backfill.py - consider splitting by operation type
Sources
Related skills
How it compares
Pick modular-code for Python-specific file-size governance; use general architecture skills for cross-language service boundaries.
FAQ
What file size does modular-code recommend?
modular-code marks 150–500 lines as optimal for Python modules, 500–1000 as large, 1000–2000 as too large, and 2000+ as critical. Files above 500 lines should be evaluated for splitting when concerns diverge or tooling struggles.
When should modular-code trigger a split?
modular-code triggers a split when a Python file exceeds 500 lines, contains multiple unrelated concerns, or creates scroll fatigue for reviewers. The parcadei/continuous-claude-v3 skill prioritizes modules sized for AI-assisted editing.