| name | phx:examples |
| description | Provide examples and walkthroughs for Phoenix, LiveView, Ecto, OTP patterns. Use when "how do I...", "show me an example", or "what does X look like". |
| effort | low |
Examples & Walkthroughs
Official Phoenix Guides (Reference)
For standard implementation patterns, always check official guides first:
Plugin-Specific Patterns
Patterns NOT in official guides (unique to this plugin):
Tidewave Integration Workflow
/mcp
mcp__tidewave__get_docs "Ecto.Query"
mcp__tidewave__project_eval "MyApp.Accounts.list_users() |> length()"
mcp__tidewave__execute_sql_query "SELECT count(*) FROM users"
Multi-Agent Review Workflow
/phx:plan Add user avatars with S3 upload
/phx:review lib/my_app/accounts.ex
Iron Laws Enforcement
This plugin enforces non-negotiable rules across all agents:
Elixir Idioms:
- NO process without runtime reason
- Messages are copied (keep small)
- Changesets for external data
LiveView:
- NEVER query DB in mount
- ALWAYS use streams for lists
- RE-AUTHORIZE in every handle_event
Oban:
- Jobs MUST be idempotent
- ALWAYS handle {:error, _} returns
- Use unique keys for deduplication
Security:
- Validate at boundaries
- Never interpolate user input in queries
- Authorize everywhere (not just mount)
Example Workflows
Bug Investigation
/phx:investigate Login failing after password reset
/ralph-loop:ralph-loop "Fix login tests. Output <promise>DONE</promise> when green."
Feature Planning
/phx:research Oban unique jobs best practices
/phx:plan Add daily digest email job
Security Audit
/phx:review lib/my_app_web/controllers/session_controller.ex
When to Use Official Docs vs Plugin
| Situation | Use |
|---|
| "How do I create a context?" | Official Phoenix guides |
| "Is my context design idiomatic?" | Plugin's /phx:review |
| "How do I add LiveView?" | Official LiveView guides |
| "Does my LiveView have memory issues?" | Plugin's Iron Laws |
| "How do I deploy to Fly.io?" | Official deployment guide |
| "Is my release config production-ready?" | Plugin's deployment-validator |