From Engineering Flow
Stack-agnostic code simplification triggered by the smart-simplify Stop hook after substantial changes
How this skill is triggered — by the user, by Claude, or both
Slash command
/engineering-flow:smart-simplifyThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Perform a simplification pass on files you just changed. This skill is
Perform a simplification pass on files you just changed. This skill is typically invoked by the smart-simplify Stop hook — not manually.
Before simplifying, determine the project context:
These apply to ALL languages:
Apply these ONLY to files of the matching language:
any with proper types where the type is clear from context?.) and nullish coalescing (??) to collapse null checksconst over let when not reassignedelse after returnif err != nil { return err } chains where a helper would be clearererrors.Is/errors.As over string comparisonwith)pathlib over os.path for path manipulation.format() or % formatting"$VAR" not $VAR)[[ ]] over [ ] for conditionals (when bash-specific is acceptable)cat file | grep with grep file"${var:-default}" for defaults instead of if/elsecase statements over long if/elif chains for string matchingAfter making simplification edits, you are done. The Stop hook has a one-shot marker that prevents re-triggering. Do not manually invoke this skill a second time in the same session.
Simplification must preserve existing functionality. If unsure whether a change preserves behavior, leave the code as-is and note it:
Note: Potential simplification in [function], but behavior preservation
uncertain. Leaving as-is.
Do not introduce new abstractions (base classes, wrapper functions, utility modules) during a simplification pass. Flag them as suggestions for follow-up if warranted.
Only simplify files listed in the hook message. Do not scan the entire project for simplification opportunities.
Each simplification should be obviously correct. If a change requires more than 30 seconds of thought to verify correctness, skip it.
For each file simplified:
Simplified [file_path]:
- [what was simplified and why]
If no simplifications were needed:
Reviewed [file_path]: no simplifications needed.
npx claudepluginhub ericmittman/engineering-flow --plugin engineering-flowGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.