
Init
Initialize plugin in a project, install Iron Laws, auto-activation rules, and...
Install
npx skills add oliver-kriska/claude-elixir-phoenix --skill init -g -a claude-code -y- Repository
- oliver-kriska/claude-elixir-phoenix572
- Category
- AI and agents
- Updated
- 5d ago
- License
- MIT
- Context cost
- Lightabout 1,363 tokens
- Runs scripts
- No, instructions only
What it does
Initialize plugin in a project, install Iron Laws, auto-activation rules, and reference auto-loading into CLAUDE.md. Use when setting up or updating the plugin.
Plugin Initialization
Install the Elixir/Phoenix plugin's behavioral instructions into the project's CLAUDE.md.
Usage
/phx:init # First-time installation
/phx:init --update # Update existing installation with latest rules
Iron Laws
- NEVER overwrite content outside plugin markers, User-written CLAUDE.md rules must be preserved verbatim
- Always detect stack before generating, Never assume Phoenix/Ecto versions
- Always validate after installation, Verify markers present and stack correct
Workflow
Step 1: Check Existing CLAUDE.md
Use Glob to check if CLAUDE.md exists. Then use Grep to check for existing ELIXIR-PHOENIX-PLUGIN:START marker in CLAUDE.md.
Step 2: Detect Project Stack
Scan the project to customize the injected instructions:
Read mix.exs and use Grep to extract:
- Phoenix version: search for
phoenix.*"~>inmix.exs - Ecto version: search for
ecto.*"~>inmix.exs - Oban: search for
"oban"and"oban_pro"inmix.exs - Frameworks: search for
"ash","surface"inmix.exs - Tidewave: search for
"tidewave"inmix.exs - Project size: use Glob to count
lib/**/*.exfiles
Step 3: Handle Installation Modes
Mode A: Fresh Install (no CLAUDE.md or no markers)
- Create/append to CLAUDE.md
- Insert full behavioral instructions between markers
- Include only relevant sections based on detected stack
Mode B: Update (--update flag or markers exist)
- Find content between
<!-- ELIXIR-PHOENIX-PLUGIN:START -->and<!-- ELIXIR-PHOENIX-PLUGIN:END --> - Replace with latest behavioral instructions
- Preserve everything outside the markers
In both modes, CLAUDE.md content outside the plugin markers, user-written rules, project conventions, other plugin sections, stays verbatim (Iron Law 1)
Step 4: Generate Content
Write the following structure to CLAUDE.md:

