From amplify
Analyzes codebases or module namespaces for simplification opportunities like dead code, shallow abstractions, misplaced concerns, unnecessary indirection, and complected state. Produces classified report with recommended actions. For 'simplify this system', 'reduce complexity', or 'find dead code' requests.
npx claudepluginhub wunki/amplify --plugin ask-questions-if-underspecifiedThis skill uses the workspace's default tool permissions.
Analyze a codebase namespace for structural simplification opportunities. Produce a classified report of findings with recommended actions. Hand off to `create-plan` for planning and `execute-plan` for execution.
Analyzes code complexity and proposes simplifications like extraction, flattening, and decoupling to boost readability and maintainability. Use for refactoring, cleanup, or reducing technical debt.
Analyzes software architectures using first-principles and SpaceX 5-step methodology to validate decisions, identify technical debt, plan refactoring, and review changes.
Identifies architectural friction in codebases and proposes scored deepening refactors for shallow modules to improve testability and AI-navigability.
Share bugs, ideas, or general feedback.
Analyze a codebase namespace for structural simplification opportunities. Produce a classified report of findings with recommended actions. Hand off to create-plan for planning and execute-plan for execution.
Read references/principles.md now. It contains the design principles that drive every recommendation.
Determine what to analyze. Ask the user if unclear.
lib/my_app/billing/)Before proposing changes, understand what exists.
Module census: List every module in the namespace with line counts.
find lib/path -name '*.ex' -exec wc -l {} + | sort -n
Dependency graph: For each module, grep for who imports, aliases, or calls it.
grep -r 'alias MyApp.Billing' lib/ --include='*.ex' -l
Dead code scan: Find modules, functions, or fields with no callers.
# Elixir-first: use compiler-aware references before text search
mix xref callers MyApp.Billing
mix xref graph --label compile
# Supplement with text search for dynamic callsites/tests
grep -r 'ModuleName.function_name' lib/ test/ --include='*.ex' --include='*.exs' -l
Then check for dynamic usage that static scans can miss:
apply/3, Module.concat/2, and runtime dispatchStruct field audit: For each struct, check which fields are actually read.
grep -r 'ctx\.field_name\|:field_name' lib/ --include='*.ex' -l
Categorize each finding using the complexity taxonomy:
| Category | Signal | Action |
|---|---|---|
| Dead code | No callers in lib/ or test/ | Delete |
| Write-only fields | Set but never read | Delete |
| Shallow module | 1-2 functions, single caller | Inline into caller |
| Pass-through function | Wraps another call with no added value | Inline or delete |
| Misplaced concern | Function lives far from its only consumers | Move to natural owner |
| Unnecessary indirection | Intermediate data structure rebuilt from source | Derive on demand |
| Nested state | Sub-struct accessed through parent everywhere | Flatten into parent |
| God module | Mixed responsibilities and frequent unrelated edits (line count is a signal, not a verdict) | Split by responsibility seams |
| Synthetic compatibility | Adapter maps between old and new shapes | Delete old shape |
| Dead configuration | Config keys read but never affect behavior | Delete |
Present findings grouped by category. For each finding:
principles.md)Use this compact format:
- Finding: <short title>
What: <module/function/field>
Why: <violated principle>
Evidence: <xref/grep/code refs>
Action: <delete|inline|move|flatten|extract>
Risk: <low|medium|high>
Confidence: <high|medium|low>
Blast radius: <estimated files/modules>
Order the report by risk: low-risk findings first (easy wins), high-risk last.
Recommended phase ordering when the user is ready to plan:
After presenting findings, suggest the user run create-plan to turn the report into an executable plan, and execute-plan to work through it.
These patterns are complexity hotspots worth investigating:
create-plan)execute-plan)code-simplifier)