simplify-code

Reviews code diffs for reuse, quality, efficiency, and clarity issues using parallel sub-agents.

1|Updated Aug 4, 2026
One-click install
npx skills add https://github.com/Hamzaoui-Louai/LEAN-gym-dashboard-frontend --skill simplify-code-hamzaoui-louai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: simplify-code
Source: https://github.com/Hamzaoui-Louai/LEAN-gym-dashboard-frontend/tree/main/.opencode/skills/simplify-code
Command: npx skills add https://github.com/Hamzaoui-Louai/LEAN-gym-dashboard-frontend --skill simplify-code-hamzaoui-louai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Reviewing code changes for duplication, inefficiency, and readability issues is time-consuming and easy to do inconsistently. This Skill structures the review of a scoped diff into parallel, role-based passes and optionally applies only high-confidence, behavior-preserving fixes. ## Core Features & Use Cases - Four Parallel Review Roles: Runs dedicated sub-agent passes for code reuse, code quality, efficiency, and clarity/standards on the same scoped diff. - Three Operating Modes: Supports review-only, safe-fixes, and fix-and-validate modes chosen from the user's request. - Scoped Diff Detection: Selects the smallest correct git diff (unstaged, staged, or explicit branch comparison) and respects local project instructions like AGENTS.md. - Use Case: After finishing a feature branch, ask for a cleanup pass; the Skill reviews the diff, removes duplicated logic and dead code, and runs targeted tests to confirm nothing broke. ## Quick Start Ask the assistant to simplify and clean up the current git changes using the simplify-code skill, then run the relevant tests.

Frequently Asked Questions about simplify-code

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review a git diff for code quality issues?

Scope the diff with git diff for unstaged work or git diff --cached for staged work, then review for duplication, inefficiency, and clarity problems. This Skill automates that by running four parallel review passes and merging structured findings.

How to safely refactor code without changing behavior?

Apply only high-confidence, behavior-preserving fixes such as removing dead code, replacing duplication with existing helpers, and simplifying control flow. The safe-fixes mode skips subjective refactors and keeps edits scoped to the reviewed files.

Can this skill run tests after refactoring code?

Yes, the fix-and-validate mode runs the smallest relevant validation after edits, such as targeted tests, typecheck, or lint for the touched scope. It prefers fast, scoped validation over full-suite runs.

Does the code review respect project-specific conventions?

Yes, before reviewing or fixing, the Skill reads local instruction files like AGENTS.md and relevant project docs for the touched area. This distinguishes real issues from intentional local patterns.

When should I not use automated code simplification?

Avoid it when changes need product or architectural judgment, when there is no clear diff scope, or when environment-specific testing is required. The Skill stops and asks for clarification if scope or success criteria are missing.