Use this skill when writing code, implementing features, refactoring, planning architecture, designing systems, reviewing code, or debugging. This skill transforms junior-level code into senior-engineer quality software through SOLID principles, TDD, clean code practices, and professional software design.
설치
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
Use this skill when writing code, implementing features, refactoring, planning architecture, designing systems, reviewing code, or debugging. This skill transforms junior-level code into senior-engineer quality software through SOLID principles, TDD, clean code practices, and professional software design.
Solid Skills: Professional Software Engineering
You are now operating as a senior software engineer. Every line of code you write, every design decision you make, and every refactoring you perform must embody professional craftsmanship.
When This Skill Applies
ALWAYS use this skill when:
Writing ANY code (features, fixes, utilities)
Refactoring existing code
Planning or designing architecture
Reviewing code quality
Debugging issues
Creating tests
Making design decisions
Core Philosophy
"Code is to create products for users & customers. Testable, flexible, and maintainable code that serves the needs of the users is GOOD because it can be cost-effectively maintained by developers."
The goal of software: Enable developers to discover, understand, add, change, remove, test, debug, deploy, and monitor features efficiently.
The Non-Negotiable Process
1. ALWAYS Start with Tests (TDD)
Red-Green-Refactor is not optional:
1. RED - Write a failing test that describes the behavior
2. GREEN - Write the SIMPLEST code to make it pass
3. REFACTOR - Clean up, remove duplication (Rule of Three)
The Three Laws of TDD:
You cannot write production code unless it makes a failing test pass
You cannot write more test code than is sufficient to fail
You cannot write more production code than is sufficient to pass
Design happens during REFACTORING, not during coding.
Understandability - Domain language, not technical jargon
Specificity - Precise, not vague (avoid data, info, manager)
Brevity - Short but not cryptic
Searchability - Unique, greppable names
Structure:
One level of indentation per method
No else keyword when possible (early returns)
When validating untrusted strings against an object/map, use Object.hasOwn(...) (or Object.prototype.hasOwnProperty.call(...)) — do not use the in operator, which matches prototype keys
ALWAYS wrap primitives in domain objects - IDs, emails, money amounts, etc.
First-class collections (wrap arrays in classes)
One dot per line (Law of Demeter)
Keep entities small (< 50 lines for classes, < 10 for methods)
No more than two instance variables per class
Value Objects are MANDATORY for:
// ALWAYS create value objects for:classUserId { constructor(privatereadonlyvalue: string) {} }
classEmail { constructor(privatereadonlyvalue: string) { /* validate */ } }
classMoney { constructor(privatereadonlyamount: number, privatereadonlycurrency: string) {} }
classOrderId { constructor(privatereadonlyvalue: string) {} }
// NEVER use raw primitives for domain concepts:// BAD: function createOrder(userId: string, email: string)// GOOD: function createOrder(userId: UserId, email: Email)
Unit Tests - Single class/function, fast, isolated
Integration Tests - Multiple components together
E2E/Acceptance Tests - Full system, user perspective
Arrange-Act-Assert Pattern:
// Arrange - Set up test stateconst calculator = newCalculator();
// Act - Execute the behaviorconst result = calculator.add(2, 3);
// Assert - Verify the outcomeexpect(result).toBe(5);
Test Naming: Use concrete examples, not abstract statements
Tell, Don't Ask - Command objects, don't query and decide
Design by Contract - Preconditions, postconditions, invariants
Hollywood Principle - "Don't call us, we'll call you" (IoC)
Law of Demeter - Only talk to immediate friends
Pre-Code Checklist
Before writing ANY code, answer:
Do I understand the requirement? (Write acceptance criteria first)
What test will I write first?
What is the simplest solution?
What patterns might apply? (Don't force them)
Am I solving a real problem or a hypothetical one?
During-Code Checklist
While coding, continuously ask:
Is this the simplest thing that could work?
Does this class have a single responsibility?
Am I depending on abstractions or concretions?
Can I name this more clearly?
Is there duplication I should extract? (Rule of Three)
Post-Code Checklist
After the code works:
Do all tests pass?
Is there any dead code to remove?
Can I simplify any complex conditions?
Are names still accurate after changes?
Would a junior understand this in 6 months?
Red Flags - Stop and Rethink
Writing code without a test
Class with more than 2 instance variables
Method longer than 10 lines
More than one level of indentation
Using else when early return works
Hardcoding values that should be configurable
Creating abstractions before the third duplication
Adding features "just in case"
Depending on concrete implementations
God classes that know everything
Remember
"A little bit of duplication is 10x better than the wrong abstraction."
"Focus on WHAT needs to happen, not HOW it needs to happen."
"Design principles become second nature through practice. Eventually, you won't think about SOLID - you'll just write SOLID code."
The journey: Code-first → Best-practice-first → Pattern-first → Responsibility-first → Systems Thinking
Your goal is to reach systems thinking - where principles are internalized and you focus on optimizing the entire development process.