You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: agents/paulirish-skills/skills/code-simplifier/SKILL.md
+15-17Lines changed: 15 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
name: code-simplifier
3
-
description: Installs and runs the Code Simplifier subagents (Code Reuse Reviewer, Code Quality Reviewer, and Efficiency Reviewer) to review and clean up code changes. Trigger this skill when the user asks to "simplify code", "run code simplifier", "review changes for quality", or "setup review agents".
3
+
description: Installs and runs the Code Simplifier subagents for Gemini CLI (Code Reuse Reviewer, Code Quality Reviewer, and Efficiency Reviewer) to review and clean up code changes. Trigger this skill when the user asks to "simplify code", "run code simplifier", "review changes for quality", or "setup review agents".
4
4
---
5
5
6
6
# Code Simplifier Skill
@@ -9,12 +9,7 @@ When triggered, perform the following steps to execute a code simplification rev
9
9
10
10
## Phase 1: Installation & Setup
11
11
12
-
1.**Check Dependencies**: You must install three review subagents in the project's `.gemini/agents/` directory (or user-level `~/.gemini/agents/` if requested).
13
-
Ensure the following files are created:
14
-
-`.gemini/agents/code-reuse-reviewer.md`
15
-
-`.gemini/agents/code-quality-reviewer.md`
16
-
-`.gemini/agents/efficiency-reviewer.md`
17
-
12
+
1.**Check Dependencies**:
18
13
Ensure the `.gemini/settings.json` file in the project directory has `experimental.enableAgents` set to `true`:
19
14
```json
20
15
{
@@ -24,15 +19,18 @@ When triggered, perform the following steps to execute a code simplification rev
24
19
}
25
20
```
26
21
22
+
You must ensure the three review subagents are installed in the project's `.gemini/agents/` directory:
23
+
-`.gemini/agents/code-reuse-reviewer.md`
24
+
-`.gemini/agents/code-quality-reviewer.md`
25
+
-`.gemini/agents/efficiency-reviewer.md`
26
+
27
27
2.**Create the Agents (If Missing)**: Use the `write_file` tool to create them if they do not exist:
description: Reviews code changes to identify opportunities for reusing existing utilities and helpers.
34
-
kind: local
35
-
model: inherit
36
34
---
37
35
For each change:
38
36
1. Search for existing utilities and helpers that could replace newly written code. Use grep_search to find similar patterns elsewhere in the codebase — common locations are utility directories, shared modules, and files adjacent to the changed ones.
@@ -45,8 +43,6 @@ When triggered, perform the following steps to execute a code simplification rev
45
43
---
46
44
name: code_quality_reviewer
47
45
description: Reviews code changes for hacky patterns, redundant state, parameter sprawl, and leaky abstractions.
48
-
kind: local
49
-
model: inherit
50
46
---
51
47
Review the changes for hacky patterns:
52
48
1. Redundant state: state that duplicates existing state, cached values that could be derived, observers/effects that could be direct calls
@@ -61,8 +57,6 @@ When triggered, perform the following steps to execute a code simplification rev
61
57
---
62
58
name: efficiency_reviewer
63
59
description: Reviews code changes for efficiency, unnecessary work, missed concurrency, and memory leaks.
@@ -73,11 +67,15 @@ When triggered, perform the following steps to execute a code simplification rev
73
67
6. Overly broad operations: reading entire files when only a portion is needed, loading all items when filtering for one
74
68
```
75
69
76
-
3.**Prompt for Refresh**: If you installed any files or modified settings in step 2, tell the user they must run the `/agents refresh` command to load the new agents. **Stop execution here and wait for the user to run the command.** Inform them they should ask to run the review again after refreshing.
70
+
3.**Prompt for Refresh**: If you installed any files or modified settings in step 2, tell the user they must run the `/agents refresh` command to load the new agents. **Stop execution here and wait for the user to run the command.**
77
71
78
72
## Phase 2: Execution
79
73
80
-
4.**Review Changes**: Once the agents are available, run the review process. The user should specify what changes to review.
74
+
4.**Identify Target**: Determine the specific code changes to review based on the user's request (e.g., a specific file, uncommitted changes, or a git diff). Ask them to specify what to review if they haven't already.
81
75
5.**Parallel Invocation**: Invoke all three agents (`code_reuse_reviewer`, `code_quality_reviewer`, `efficiency_reviewer`) in parallel using their respective tools. Pass each agent the full context or diff of the changes to review.
82
-
6. Aggregation and Fix: Wait for all three agents to complete. Aggregate their findings and fix each issue directly. If a finding is a false positive or not worth addressing, note it and move on — do not argue with the finding, just skip it.
76
+
6.**Aggregation and Fix**: Wait for all three agents to complete. Aggregate their findings and fix each issue directly. If a finding is a false positive or not worth addressing, note it and move on — do not argue with the finding, just skip it.
77
+
78
+
79
+
---
83
80
81
+
Attribution: The overall technique here was adapted from Claude Code's `/simplify` command, introduced in Feb 2026.
0 commit comments