Skip to content

Commit 47ca03c

Browse files
committed
feat(skills): add conditional branching and intermediate variable checks to simplify review
Add two new checks to the /review simplify category: - Complex conditional branching (nested if/else, long if/elif chains, boolean expression simplification) - Unnecessary intermediate variables (single-use variables that don't add clarity)
1 parent 43a124a commit 47ca03c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

home/.claude/skills/review/SKILL.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,13 @@ If you find yourself wanting to report any of the above, **stop and reconsider**
170170
2. Find constants used exactly once
171171
3. Find defensive validation for impossible cases (e.g., type checking after isinstance)
172172
4. Find wrapper functions that add no value
173-
5. For each issue, verify the simplified version has fewer lines
173+
5. Find overly complex conditional branching
174+
- Deeply nested if/else (arrow anti-pattern) that can be flattened with early returns/guard clauses
175+
- Long if/elif chains replaceable with lookup tables or dictionary dispatch
176+
- Boolean expressions that can be simplified (e.g., `if x == False``if not x`, redundant conditions)
177+
6. Find unnecessary intermediate variables
178+
- Variables assigned once and immediately returned or used on the next line with no added clarity (e.g., `result = foo(); return result``return foo()`)
179+
7. For each issue, verify the simplified version has fewer lines
174180

175181
**Do NOT report**:
176182

0 commit comments

Comments
 (0)