一键导入
phx-examples
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".
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
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".
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
CONTRIBUTOR TOOL - Cut a plugin release: bump plugin.json version, finalize CHANGELOG, update README if needed, gate on make ci, commit, tag vX.Y.Z, and create the GitHub release. Use when shipping a new plugin version. NOT distributed.
OTP/BEAM patterns and Elixir idioms — GenServer, Supervisor, Task, Registry, pattern matching, with chains, pipes. Use when designing processes or debugging BEAM issues.
Verify Elixir/Phoenix changes — compile, format, and test in one loop. Use after implementation, before PRs, or after fixing bugs.
Project health audit and health check — architecture, performance, tests, dependencies, code quality. Use when assessing overall project health, before releases, or after refactors.
Recommend safe Bash permissions for Elixir mix commands in settings.json. Use when permission prompts slow workflow, "fix permissions", "reduce prompts", "auto-allow mix".
Analyze Elixir/Phoenix performance — N+1 queries, assign bloat, ecto optimization, genserver bottlenecks. Use when slowness, timeouts, or high memory reported.
| 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 |
For standard implementation patterns, always check official guides first:
| Topic | Guide |
|---|---|
| Contexts | hexdocs.pm/phoenix/contexts |
| Ecto Basics | hexdocs.pm/phoenix/ecto |
| LiveView | hexdocs.pm/phoenix_live_view |
| Authentication | mix phx.gen.auth |
| Channels | hexdocs.pm/phoenix/channels |
| Testing | hexdocs.pm/phoenix/testing |
| Deployment | hexdocs.pm/phoenix/deployment |
Patterns NOT in official guides (unique to this plugin):
# 1. Check if Tidewave is running
/mcp
# 2. If connected, debug with runtime tools
# Get exact docs for YOUR dependency versions
mcp__tidewave__get_docs "Ecto.Query"
# Execute code in running app
mcp__tidewave__project_eval "MyApp.Accounts.list_users() |> length()"
# Query database directly
mcp__tidewave__execute_sql_query "SELECT count(*) FROM users"
# 1. Plan feature with specialist agents
/phx:plan Add user avatars with S3 upload
# 2. After implementation, review with multiple perspectives
/phx:review lib/my_app/accounts.ex # Elixir idioms
# Security analyzer runs automatically on auth code
# 3. Before deployment
# Deployment validator checks production readiness
This plugin enforces non-negotiable rules across all agents:
Elixir Idioms:
LiveView:
Oban:
Security:
# 1. Start with obvious checks
/phx:investigate Login failing after password reset
# 2. Agent checks Ralph Wiggum list:
# - File saved? Compiled? Migrated?
# - Atom vs string keys?
# - Data preloaded?
# 3. If complex, escalate to Ralph Wiggum Loop (if installed)
/ralph-loop:ralph-loop "Fix login tests. Output <promise>DONE</promise> when green."
# 1. Research phase
/phx:research Oban unique jobs best practices
# 2. Plan with context analysis
/phx:plan Add daily digest email job
# 3. Agents coordinate:
# - hex-library-researcher evaluates deps
# - oban-specialist designs worker
# - ecto-schema-designer plans data model
# 1. Run security analyzer on auth code
/phx:review lib/my_app_web/controllers/session_controller.ex
# 2. Check for common vulnerabilities:
# - SQL injection (parameterized queries?)
# - XSS (proper escaping?)
# - CSRF (tokens present?)
# - Authorization (re-checked in events?)
| 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 |