Claude Code skill that sets up AI-assisted dev tooling (usage_rules, Tidewave, Ash AI) for Ash/Phoenix projects
SaferSkills independently audited ash-kindle (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
You are setting up the AI-assisted development environment for an Ash/Phoenix project. This includes: usage_rules, Tidewave MCP, domain MCP (dev), Ash AI, CLAUDE.md, Claude Code skills, the logging-best-practices skill, and optionally browser testing and dev environment setup (devenv/flake/devbox).
Before doing anything, read the full setup guide and defaults:
Read skills/ash-kindle/references/setup-guide.md
Read skills/ash-kindle/defaults.mdDetermine:
mix.exs in the directory)my_app)MyAppWeb)ash_domains in config)devenv.nix, flake.nix, or devbox.json)AshAi.Mcp.Dev in endpoint.ex, "/dev/mcp" in router.ex, @mcp_tools module attribute in router.ex, and a non-tidewave entry in .mcp.json — if all four present, skip; if partially configured, warn the user and offer to complete setup).claude/skills/browser-testing/SKILL.md)Use mix.exs, config/config.exs, and the project file structure to answer these.
If the directory has no mix.exs, offer to create a new Phoenix project:
mix archive.install hex phx_new --forceyes | mix phx.new . --app <app_name>yes | prefix is needed to auto-confirm the existing directory promptPresent the user with what you'll set up:
I'll configure the following AI dev tooling for your Ash/Phoenix project:
>
1. usage_rules — CLAUDE.md generation + doc search from deps 2. Tidewave — dev MCP server for runtime introspection (eval, logs, schemas) 3. Domain MCP — dev-only MCP server exposing your Ash domain tools (requires Ash domains with resources) 4. Ash AI — usage rules and MCP tooling for Ash resources 5. CLAUDE.md — project instructions (Ash First, MCP Usage, Feedback Loop, Logging) 6. Claude Code skills — auto-generated from usage_rules config 7. logging-best-practices — external skill for wide events pattern 8. Browser testing — optional GIF-recorded browser walkthrough skill (requires Claude-in-Chrome) 9. Dev environment — optional setup for devenv, flake, or devbox with PostgreSQL
>
Want to customize any of these, or are defaults fine?
If the user says defaults are fine, proceed with all defaults from defaults.md. Default for Domain MCP: yes if Ash domains with resources are detected, no otherwise. Default for Browser testing: no (opt-in only). Default for Dev environment: skip if no config file detected, otherwise default to detected tool.
If the user wants to customize, ask about each piece one at a time:
:elixir, :otp, :phoenix, others?)ash-framework; suggest others based on detected deps)plug dependency conflictWhen tidewave (only: :dev) and ash_ai (which brings in ash_json_api) are both present, there is a :only env conflict on the plug dependency. You must add an explicit `plug` dependency to resolve this:
{:plug, "~> 1.19"}# Add to deps in root mix.exs
{:plug, "~> 1.19"},
{:usage_rules, "~> 1.2", only: :dev, runtime: false}Note: Theplugdep may not be needed in umbrella projects iftidewaveandash_ailive in separate child apps. Only add it ifmix deps.getreports an:onlyoption conflict onplug.
# Add to deps
{:tidewave, "~> 0.5", only: :dev}# Add to deps
{:ash_ai, "~> 0.5"}mix.exs:{:plug, "~> 1.19"},
{:ash, "~> 3.0"},
{:ash_phoenix, "~> 2.0"},
{:ash_postgres, "~> 2.0"},
{:ash_ai, "~> 0.5"},
{:usage_rules, "~> 1.2", only: :dev, runtime: false},
{:tidewave, "~> 0.5", only: :dev}Then run:
mix deps.getAdd the usage_rules() function and reference it in the project config. See defaults.md for the default configuration. Adapt based on:
usage_rules goes in root mix.exs.claude/skillsIn the project/0 function, add:
# listeners required for usage_rules to auto-regenerate on code changes
listeners: [Phoenix.CodeReloader],
usage_rules: usage_rules()In the web app's endpoint.ex, add the Tidewave plug before the if code_reloading? block:
if Code.ensure_loaded?(Tidewave) do
plug Tidewave
endThe domain MCP requires two pieces. See references/setup-guide.md for full details.
1. Endpoint plug: Add AshAi.Mcp.Dev inside the if code_reloading? block in endpoint.ex, before Phoenix.LiveReloader (per official AshAi docs):
if code_reloading? do
socket "/phoenix/live_reload/socket", Phoenix.LiveReloader.Socket
plug AshAi.Mcp.Dev,
protocol_version_statement: "2024-11-05",
otp_app: :my_app
plug Phoenix.LiveReloader
plug Phoenix.CodeReloader
plug Phoenix.Ecto.CheckRepoStatus, otp_app: :my_app
end2. Router scope: Add a /dev/mcp scope inside the if Application.compile_env(:my_app, :dev_routes) guard in router.ex:
scope "/dev/mcp" do
forward "/", AshAi.Mcp.Router,
tools: @mcp_tools,
protocol_version_statement: "2024-11-05",
otp_app: :my_app,
actor: %AshAi{}
end3. Domain tools: Add a tools do block in the Ash domain, and a @mcp_tools module attribute in the router listing exposed tool names. Ask the user which domain to wire first.
If no Ash domains with resources exist yet, skip the domain MCP and just set up Tidewave.
Create .mcp.json in the project root. Include both servers if domain MCP was set up:
{
"mcpServers": {
"tidewave": {
"type": "http",
"url": "http://localhost:<port>/tidewave/mcp"
},
"<app_name>": {
"type": "http",
"url": "http://localhost:<port>/dev/mcp"
}
}
}Replace <port> with the detected Phoenix port (default 4000) and <app_name> with the OTP app name. If domain MCP was skipped, omit the <app_name> entry.
Write the hand-written sections of CLAUDE.md. See references/setup-guide.md for the full template. The key sections are:
Leave space after the hand-written sections for usage_rules to append its generated content.
mix usage_rules.sync --yesImportant: The task is usage_rules.sync, not usage_rules.gen. The --yes flag is required for non-interactive execution (otherwise igniter prompts for confirmation on large diffs).
This generates:
.claude/skills/Verify the generated files look correct.
npx skills add https://github.com/boristane/agent-skills --skill logging-best-practices --yesIf the user opted in to browser testing:
npx skills add https://github.com/jordangarrison/superpowers --skill browser-testing-walkthrough --yesImportant: The --yes flag is required for non-interactive execution (otherwise it prompts for which agents to install to).
If the user opted in to browser testing (Step 2), generate a project-specific browser testing skill. The external skill (installed in Step 8) handles the generic workflow; this skill provides project-specific context.
Create .claude/skills/browser-testing/SKILL.md with these sections:
detected routes (at minimum: /, /dev/dashboard, /dev/mailbox). Do not include MCP endpoints (/dev/mcp) — they are not browser-renderable. Use the detected Phoenix port.
List names, roles, and any notable state (e.g., overallocated users, edge cases)."
zoom, find, type
the GIF embed. Reviewers must understand what was validated without watching the GIF.
See references/setup-guide.md for the full template.
If the user opted in (or a dev environment config file was detected in Step 1), set up the dev environment. All three options use direnv.
Ask: "Which dev environment tool do you use?" (default to detected tool):
devenv.nix + direnvflake.nix + direnvdevbox.json + direnv.envrc (see defaults.md for templates)config/dev.exs with matching port if needed.envrc only. Document that the user needs Elixir, Erlang, Node.js, PostgreSQL services in their devenv.nix, and should add dotenv.enable = true for .env support. User looks up devenv-specific syntax..envrc only. Document that the user needs Elixir, Erlang, Node.js, PostgreSQL in their flake outputs. User looks up Nix-specific syntax.devbox.json, process-compose.yml, and .envrc. See references/setup-guide.md for the complete devbox config with PostgreSQL, init_hook, and convenience scripts.mix deps.get
mix compile
mix format --check-formattedConfirm:
mix compile succeeds.claude/skills/ contains generated skill files.mcp.json exists with Tidewave config (and domain MCP config if set up)/dev/mcp when Phoenix server is running.claude/skills/browser-testing/SKILL.md.envrc exists with correct content for chosen toolReport what was set up and any manual steps remaining.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.