phoenix-framework

forest's avatarfrom forest

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.

⭐4stars🔀0forks📁View on GitHub🕐Updated Dec 24, 2025

When & Why to Use This Skill

This Claude skill provides specialized guidelines for the Phoenix Framework, focusing on optimized router configuration and the elimination of deprecated modules. It helps developers adhere to Elixir best practices by ensuring correct scope aliasing to prevent redundant module prefixing and steering projects away from outdated components like Phoenix.View for better maintainability.

Use Cases

  • Configuring Phoenix Routers: Use this skill to correctly implement scope blocks, ensuring that module aliases are automatically and correctly prefixed without manual errors.
  • Modernizing Legacy Codebases: Identify and replace deprecated Phoenix.View modules in older Elixir projects to comply with the latest framework standards.
  • Preventing Routing Bugs: Avoid common 'duplicate module prefix' bugs during development by following strict aliasing rules within router files.
  • Onboarding and Mentorship: Serve as a real-time coding standard reference for developers new to the Phoenix Framework to ensure consistent architectural patterns.
namephoenix-framework
descriptionPhoenix 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.

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:

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