base
FeaturedUniversal coding patterns, constraints, TDD workflow, atomic todos
AI & Automation 694 stars
57 forks Updated today MIT
Install
Quality Score: 98/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Base Skill - Universal Patterns
## Core Principle
Complexity is the enemy. Every line of code is a liability. The goal is software simple enough that any engineer (or AI) can understand the entire system in one session.
---
## Simplicity Rules
These limits apply to every file created or modified.
### Function Level
- **Maximum 20 lines per function** - if longer, decompose IMMEDIATELY
- **Maximum 3 parameters per function** - if more, use an options object or decompose
- **Maximum 2 levels of nesting** - flatten with early returns or extract functions
- **Single responsibility** - each function does exactly one thing
- **Descriptive names over comments** - if you need a comment to explain what, rename it
### File Level
- **Maximum 200 lines per file** - if longer, split by responsibility BEFORE continuing
- **Maximum 10 functions per file** - keeps cognitive load manageable
- **One export focus per file** - a file should have one primary purpose
### Module Level
- **Maximum 3 levels of directory nesting** - flat is better than nested
- **Clear boundaries** - each module has a single public interface
- **No circular dependencies** - ever
### Enforcement Protocol
**Before completing ANY file:**
1. Count total lines - if > 200, STOP and split
2. Count functions - if > 10, STOP and split
3. Check each function length - if any > 20 lines, STOP and decompose
4. Check parameter counts - if any > 3, STOP and refactor
**If limits are exceeded during development:**
```
⚠️ ...
Details
- Author
- alinaqi
- Repository
- alinaqi/maggy
- Created
- 5 months ago
- Last Updated
- today
- Language
- Python
- License
- MIT
Similar Skills
Semantically similar based on skill content — not just same category
Code & Development Featured
clean-code
Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments
27,984 Updated today
davila7 Code & Development Listed
clean-code
Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments
1 Updated today
phuonghx AI & Automation Listed
modularity
This skill should be used when designing, planning, implementing, or reviewing any non-trivial change, or when the user asks to "split this file", "decouple X from Y", "refactor into modules" — enforces small, focused modules so any change fits in context without compaction
5 Updated today
alo-exp