← スキル一覧に戻る

best-practices-checker
by lexicalninja
A collection of Cursor subagents and Claude skills to help build things together
⭐ 0🍴 0📅 2026年1月16日
SKILL.md
name: best-practices-checker description: Checks code for best practice violations including DRY violations, SOLID principles, error handling patterns, testing practices, documentation standards, and version control practices. Returns structured best practice reports with improvement suggestions.
Best Practices Checker Skill
Instructions
- Review code for best practice violations
- Check for DRY (Don't Repeat Yourself) violations
- Verify SOLID principles are followed
- Review error handling patterns
- Check testing practices and coverage
- Review documentation standards
- Check version control practices
- Return structured best practice reports with:
- File path and line numbers
- Best practice violation type
- Current code
- Suggested improvement
- Reason
- Priority (usually Should-Fix or Nice-to-Have)
Examples
Input: Code duplication Output:
### BEST-001
- **File**: `utils.js`, `helpers.js`
- **Lines**: 15-20 (utils.js), 30-35 (helpers.js)
- **Priority**: Should-Fix
- **Issue**: Duplicate code for calculating total price
- **Current Code**:
```javascript
// In utils.js
function calculateTotal(items) {
let total = 0;
for (let item of items) {
total += item.price;
}
return total;
}
// In helpers.js (duplicate)
function getTotal(items) {
let total = 0;
for (let item of items) {
total += item.price;
}
return total;
}
- Suggested Fix:
// In shared/utils.js export function calculateTotal(items) { return items.reduce((sum, item) => sum + item.price, 0); } // Import in both files import { calculateTotal } from './shared/utils'; - Reason: DRY principle - code duplication makes maintenance harder and increases bug risk
## Best Practice Areas to Check
- **DRY Violations**: Code duplication that should be extracted
- **SOLID Principles**: Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion
- **Error Handling**: Consistent error handling patterns, proper error propagation
- **Testing**: Test coverage, test quality, testing patterns
- **Documentation**: Code comments, API documentation, README quality
- **Version Control**: Commit message quality, branch naming, git practices
- **Code Organization**: Logical file structure, module organization
- **Naming Conventions**: Clear, descriptive names
- **Function Size**: Functions that are too long
- **Complexity**: Cyclomatic complexity, nested conditionals
## Priority Guidelines
- **Must-Fix**: Best practice violations that cause bugs or significant maintainability issues
- **Should-Fix**: Best practice improvements that enhance code quality
- **Nice-to-Have**: Minor best practice enhancements
スコア
総合スコア
55/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
○言語
プログラミング言語が設定されている
0/5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です