← スキル一覧に戻る

review-and-simplify
by anton-pt
⭐ 0🍴 0📅 2026年1月18日
SKILL.md
name: review-and-simplify description: Review and simplify implementation user-invocable: true
Review and Simplify Implementation
Steps
-
Get diff against main:
git diff main...HEAD --name-only | grep -E '\.(ts|tsx)$' | grep -v '\.test\.' -
For each changed file (excluding tests):
Read the file and identify:
- Dead code: Unused imports, variables, functions
- Over-abstraction: Unnecessary indirection, premature generalization
- Unclear naming: Variables/functions that don't describe their purpose
- Redundant logic: Duplicate code, unnecessary conditions
- Complex expressions: Code that could be simplified
-
For each simplification:
a. Make the change
b. Run tests to verify no breakage:
npm test --workspaces --if-presentc. If tests fail, revert and skip that simplification
-
If any simplifications were made, commit:
git commit -m "refactor: simplify implementation"
What to Simplify
DO:
- Remove unused imports
- Remove unused variables and functions
- Simplify complex conditionals
- Inline single-use abstractions
- Improve variable/function names for clarity
- Remove redundant type annotations
- Simplify nested callbacks/promises
DO NOT:
- Add new features
- Change observable behavior
- Add documentation or comments
- Refactor code that wasn't changed in this feature
- Add error handling that wasn't in the original
- "Improve" working code just because you can
Example Simplifications
// Before: Over-complicated
const isValid = data !== null && data !== undefined && data.length > 0;
// After: Simplified
const isValid = data?.length > 0;
// Before: Unused abstraction
function createHandler(fn: Function) {
return (req, res) => fn(req, res);
}
app.get("/api", createHandler(handleRequest));
// After: Direct usage
app.get("/api", handleRequest);
Notes
- This is a cleanup pass, not a refactoring exercise
- Keep changes minimal and focused
- Test after each change to catch regressions early
- If unsure whether a change is safe, skip it
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です