# Phoenix Framework

> Phoenix framework guidelines for router configuration and deprecated modules. Use when writing Phoenix router files, adding routes, or configuring scopes. Prevents duplicate module prefix bugs from scope aliasing and use of deprecated Phoenix.View.

- Skill: `majiayu000/phoenix-framework` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds add majiayu000/phoenix-framework`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/phoenix-framework/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/phoenix-framework

---


# Phoenix Framework Guidelines

## Router Scope Aliasing

Router `scope` blocks include an optional alias that is **automatically prefixed** to all routes within the scope.

**Never** create your own `alias` for route definitions—the scope provides it:

```elixir
scope "/admin", AppWeb.Admin do
  pipe_through :browser

  live "/users", UserLive, :index
end
```

The `UserLive` route points to `AppWeb.Admin.UserLive` automatically.

**Always** be mindful of this when creating routes to avoid duplicate module prefixes like `AppWeb.Admin.Admin.UserLive`.

## Deprecated Modules

- **Never** use `Phoenix.View` - it is no longer included with Phoenix

