From nexus-agents
Simplifies code by reducing nesting, extracting descriptive names, eliminating redundancy while preserving exact behavior. Triggers on simplify, refactor for clarity, readability issues, or code review complexity flags.
npx claudepluginhub williamzujkowski/nexus-agentsThis skill is limited to using the following tools:
<!--
Simplifies code for clarity by reducing complexity while preserving exact behavior. Use when refactoring functional but hard-to-read code, during reviews, or for maintenance.
Refines existing code for clarity, readability, and maintainability without changing behavior, interfaces, or outputs. Use for simplify, clean up, refactor for readability requests.
Simplifies code in Git repos: flattens nesting with guards, improves naming, reduces complexity while preserving behavior/side effects. Targets modified/uncommitted files.
Share bugs, ideas, or general feedback.
Apply when:
Skip when:
test-driven-development skill).rules/ directory and CLAUDE.md describe what's canonical here."Don't remove a fence in the middle of a field until you understand why it was put there."
Before deleting code, comment, or guard clause:
git log -S "term" --all, git blame)..rules/typescript.md) — split by concerndata, tmp, result) — rename to describe role in this scope| Excuse | Counter |
|---|---|
| "It's working — leave it" | Working ≠ maintainable. Today's working-but-confusing code is tomorrow's bug-fix nightmare. |
| "Fewer lines = simpler" | Line count is a proxy, not a goal. A 5-line clever expression is often less readable than 12 obvious lines. |
| "I'll refactor while I add features" | This is how regressions arrive. Mixing refactor + feature changes makes the diff impossible to review and the regression impossible to bisect. |
| "Types are self-documenting" | Types describe shape, not intent. function process(x: User): Result says nothing about what process does. |
| "Just one tiny drive-by cleanup" | Drive-by edits in unrelated files inflate the diff and hide regressions in unrelated systems. Open a follow-up PR. |
| "I don't need to understand it to refactor it" | Yes you do. See Chesterton's Fence. |
pnpm lint && pnpm typecheck && pnpm testtry/catch removed unless replaced with explicit non-erroring pathdata/tmp/result introduced