/phoenix-tools:cmd-phoenix-convert-gettextfrom phoenix-tools
Convert Phoenix app hardcoded text to use gettext with domain-based translations
Ships in phoenix-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
In the Phoenix app at {{ web_dir }}, refactor all hardcoded text strings to use gettext with domain-based translation logic. Specifically:
Convert hardcoded strings in templates, views, and controllers to use gettext functions
Organize translations by domain/context:
user - user account, profile, authentication related textadmin - admin panel, management, settings texterrors - error messages, validations, warningsnavigation - menus, links, breadcrumbs, page titlescommon - shared/general purpose text, buttons, actionsUse appropriate gettext functions:
dgettext/2 for domain-specific translationsdgettext/3 when interpolation is neededdngettext/4 for pluralizationExtract strings from:
.ex files (controllers, views, live views, components).heex templatesimport <AppName>Web.Gettext to modules that need it# Before
<h1>Welcome to our app</h1>
<p>You have 5 messages</p>
# After
<h1><%= dgettext("navigation", "Welcome to our app") %></h1>
<p><%= dngettext("user", "You have 1 message", "You have %{count} messages", @message_count) %></p>
# Before
conn
|> put_flash(:info, "User created successfully")
|> redirect(to: ~p"/users")
# After
conn
|> put_flash(:info, dgettext("user", "User created successfully"))
|> redirect(to: ~p"/users")
# Before
def error_message, do: "Something went wrong"
# After
def error_message, do: dgettext("errors", "Something went wrong")
# Before
{:noreply, put_flash(socket, :error, "Invalid input")}
# After
{:noreply, put_flash(socket, :error, dgettext("errors", "Invalid input"))}
Work only within the {{ web_dir }} directory and its subdirectories.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub gsmlg-dev/code-agent --plugin phoenix-tools