← Back to list

design-principles
by eser
The Portability Solution for Your Code! 🚀 Powered By Deno and JavaScript.
⭐ 83🍴 4📅 Jan 7, 2026
SKILL.md
name: design-principles description: Code design patterns: pure functions, immutability, composition, and async. Use when designing code or functions.
Code Design Principles
Patterns for writing clean, maintainable, and testable code.
Quick Start
// Pure function with immutability
function updateUser(user: User, age: number): User {
return { ...user, age }; // new object, no mutation
}
Key Principles
- Pure functions: no side effects, same input = same output
- Immutability: create new objects/arrays instead of mutating
- Single responsibility: one function = one task
- Early returns: reduce nesting, improve readability
- Composition over inheritance: inject dependencies
- Promises over callbacks for async code
- Template strings over concatenation
- Plain objects for data, classes only for stateful services
- Avoid global variables and getters/setters
- Lazy initialization: no module-level side effects, wrap in getter functions
References
See rules.md for complete guidelines with examples.
Score
Total Score
65/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
✓最近の活動
3ヶ月以内に更新
+5
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
✓タグ
1つ以上のタグが設定されている
+5
Reviews
💬
Reviews coming soon

