sequenzia/agent-alchemy/code-quality
Claude Code and agent skill by sequenzia/agent-alchemy
- community
Checking that the SKILL.md file is still in the repository.
Provides code quality principles including SOLID, DRY, testing strategies, and best practices for implementation review. Use when reviewing code or applying quality standards.
Install
npx vskill@latest install sequenzia/agent-alchemy/code-qualitySKILL.md
The same SKILL.md was published earlier as sequenzia/agent-alchemy/code-quality.
Code Quality
This skill provides code quality principles and best practices for reviewing and improving implementations.
SOLID Principles
Single Responsibility Principle (SRP)
A class/function should have one reason to change.
Bad:
Good:
Open/Closed Principle (OCP)
Open for extension, closed for modification.
Bad: Adding new payment types requires modifying existing code
Good: New payment types can be added without modification
Liskov Substitution Principle (LSP)
Subtypes must be substitutable for their base types.
Bad:
Good:
Interface Segregation Principle (ISP)
Clients shouldn't depend on interfaces they don't use.
Bad:
Good:
Dependency Inversion Principle (DIP)
Depend on abstractions, not concretions.
Bad:
Good:
DRY, KISS, YAGNI
DRY (Don't Repeat Yourself)
Every piece of knowledge should have a single representation.
Apply when:
- Same logic appears 3+ times
- Changes to one place require changes to others
- Bug fixes need to be applied in multiple places
Don't over-apply:
- Two similar things might diverge later
- Premature abstraction can be worse than duplication
KISS (Keep It Simple, Stupid)
Prefer simple solutions over clever ones.
Simple code:
- Easy to read and understand
- Easy to debug
- Easy to modify
- Has fewer bugs
YAGNI (You Aren't Gonna Need It)
Don't add functionality until it's needed.
Avoid:
- Building for hypothetical requirements
- Adding "just in case" features
- Over-engineering for scale you don't have
Clean Code Principles
Meaningful Names
Small Functions
- Do one thing well
- Few parameters (ideally 0-3)
- Single level of abstraction
Avoid Side Effects
Error Handling
Testing Strategies
Test Pyramid
Unit Testing
- Test individual functions/classes
- Mock dependencies
- Fast and isolated
Integration Testing
- Test component interactions
- Use real dependencies (or test doubles)
- Database, API integration
Test Behavior, Not Implementation
Edge Cases to Test
- Empty inputs
- Null/undefined
- Boundary values
- Error conditions
- Concurrent operations
- Large inputs
Code Review Checklist
Correctness
- [ ] Does the code do what it's supposed to?
- [ ] Are edge cases handled?
- [ ] Are error conditions handled?
Security
- [ ] Is input validated?
- [ ] Are outputs escaped?
- [ ] Are secrets protected?
Performance
- [ ] Are there N+1 queries?
- [ ] Are there unnecessary loops?
- [ ] Is caching used appropriately?
Maintainability
- [ ] Is the code readable?
- [ ] Are names meaningful?
- [ ] Is complexity reasonable?
- [ ] Is there appropriate documentation?
Testing
- [ ] Are there tests?
- [ ] Do tests cover edge cases?
- [ ] Are tests maintainable?
Common Code Smells
| Smell | Description | Solution | |
|---|---|---|---|
| Long Method | Function > 20-30 lines | Extract methods | |
| Large Class | Class with too many responsibilities | Split into focused classes | |
| Long Parameter List | > 3-4 parameters | Use parameter object | |
| Duplicate Code | Same code in multiple places | Extract function | |
| Dead Code | Unused code | Delete it | |
| Magic Numbers | Unexplained numeric literals | Use named constants | |
| Nested Conditionals | Deep if/else nesting | Early returns, extract methods | |
| Feature Envy | Method uses another class's data heavily | Move method to that class |
Refactoring Techniques
Extract Function
When a code block can be grouped and named
Inline Function
When the function body is as clear as the name
Extract Variable
When an expression is complex
Rename Variable/Function
When the name doesn't communicate intent
Replace Conditional with Polymorphism
When you have repeated switch/if statements on type
Introduce Parameter Object
When several parameters travel together
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingclaude/dev-tools/skills/code-quality/SKILL.md
Popularity
- Repository stars
- 42
- Repository forks
- 7
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sequenzia/agent-alchemy/code-quality)