Modular Code
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
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 -yInstalls 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
| 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
- By domain concept:
auth.py→auth/login.py,auth/tokens.py,auth/permissions.py - By abstraction layer: Separate interface from implementation
- By data type: Group operations on related data structures
- 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- Math Help549
- Sub Agents539
- Perplexity Search537
- Security534
- Research Agent532
- Agent Orchestration528
- Git Commits525
- Ast Grep Find524
- Remember524
- Repo Research Analyst524
- Review523
- Planning Agent522
- Repoprompt518
- Agent Context Isolation516
- Parallel Agents516
- Continuity Ledger513
- Create Handoff513
- Compound Learnings511
- Debug511
- Hooks510
- Prove509
- Tldr Code509
- Hook Developer507
- Commit505
Similar to Modular Code
More Code Review & Qualitypython-project-structurewshobson/agents15.8K installsOpinionated guide for Python project layout, module cohesion, and explicit public APIs with __all__.
clean-codedavila7/claude-code-templates1.1K installsPragmatic coding standards that enforce small functions, direct fixes, and minimal comments for AI-assisted coding.
refactorpproenca/dot-skills665 installsStructured refactoring guide of 43 rules across eight prioritized categories, drawn from Fowler's catalog and Clean Code.
karpathy-guidelinesmultica-ai/andrej-karpathy-skills48.8K installsBehavioral guidelines that steer LLM coding toward simpler, surgical, verifiable changes.
code-simplifierpproenca/dot-skills1.6K installsConcise guide that simplifies recently modified code while preserving exact behavior across 47 rules.