From ai-eng-core
Reviews recently changed files via git for code reuse, quality, and efficiency issues, then applies fixes while verifying behavior and tests. Use after changes to simplify code.
npx claudepluginhub v1truv1us/ai-eng-system --plugin ai-eng-coreThis skill uses the workspace's default tool permissions.
Review recently changed files for code reuse, quality, and efficiency issues, then fix them.
Provides Ktor server patterns for routing DSL, plugins (auth, CORS, serialization), Koin DI, WebSockets, services, and testApplication testing.
Conducts multi-source web research with firecrawl and exa MCPs: searches, scrapes pages, synthesizes cited reports. For deep dives, competitive analysis, tech evaluations, or due diligence.
Provides demand forecasting, safety stock optimization, replenishment planning, and promotional lift estimation for multi-location retailers managing 300-800 SKUs.
Review recently changed files for code reuse, quality, and efficiency issues, then fix them.
Simplifying code is critical for long-term maintainability. Complexity is the enemy of reliability. Every unnecessary abstraction, duplicated logic, or convoluted control flow increases the surface area for bugs and the cognitive load on every developer who reads the code. Simplification isn't about making code "prettier" — it's about making it correct, efficient, and understandable. The best code is the code you don't need to write.
The simplify code without losing functionality or introducing regressions, but if you can:
The challenge is removing complexity without removing capability. Can you find the perfect balance between minimal and complete?
Find recently changed files:
git diff --stat HEAD~1 # Files changed in last commit
git diff --stat HEAD~3 # Files changed in last 3 commits
git diff --name-only # Unstaged changes
git diff --cached --name-only # Staged changes
If no git history is available, review files passed as arguments or ask the user which files to review.
Launch these agents concurrently for comprehensive coverage:
| Agent | Focus | What It Finds |
|---|---|---|
| Code Reuse | Duplication | Repeated logic, extractable functions, missed abstractions, copy-paste patterns |
| Quality | Complexity | Unnecessary complexity, dead code, poor naming, missing error handling, deep nesting |
| Efficiency | Performance | Redundant allocations, unnecessary iterations, missing caches, O(n²) when O(n) possible |
Each agent should:
Deduplicate and prioritize findings:
For each finding:
Detect the project's build system and run the appropriate verification commands. Check package.json, Makefile, Cargo.toml, pyproject.toml, go.mod, or pom.xml to determine the toolchain, then run:
# For any project: check what's available, then run accordingly
make check # if Makefile exists
./gradlew check # if Gradle project
mvn verify # if Maven project
go test ./... # if Go project
cargo test # if Rust project
pytest # if Python project
ruff check . # if Python with ruff
npm test # if Node.js project
Do not assume a specific runtime. Discover the toolchain from project files first.
Pass a focus argument to narrow scope:
/ai-eng-simplify focus on memory efficiency
/ai-eng-simplify focus on readability
/ai-eng-simplify focus on reducing duplication
/ai-eng-simplify focus on performance
/ai-eng-simplify focus on error handling
When a focus area is specified, weight findings from the matching agent higher.
After completing simplification, rate your confidence from 0.0 to 1.0:
Before finalizing:
Works with the spec-driven workflow:
# After completing a feature
/ai-eng/work "implement feature X"
# Simplify the result
/ai-eng/simplify
# Or with focus
/ai-eng/simplify focus on performance
Can also be combined with /ai-eng/review for comprehensive analysis:
/ai-eng/simplify
/ai-eng/review # Deeper review of simplified code
text-cleanup — For removing AI-generated verbosity (different from code simplification)code-review — For comprehensive multi-dimensional code reviewralph-wiggum — For iterative fix-until-green loops