Skip to content
Skills Library
Programming · Automation

phx-init

/phx-init

Initialize plugin in a project — install Iron Laws, auto-activation; Use when setting up or updating the plugin.

Licence
MIT
Last repository change
22.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
3
Scripts
0
HTML comments
5
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 22.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • SKILL.md zawiera komentarze HTML (5). Nie widać ich w podglądzie Markdown, a model je czyta.

What it does and when to use it

Initialize plugin in a project — install Iron Laws, auto-activation; Use when setting up or updating the plugin.

Original author description

Initialize plugin in a project — install Iron Laws, auto-activation; Use when setting up or updating the plugin.

How it works

  1. Usage
  2. Iron Laws
  3. Workflow
  4. Content Template
  5. Validation
  6. Error Handling
  7. Relationship to Other Commands
Original SKILL.md headings · 160 lines, 779 words
SKILL.md preview
---
name: phx-init
description: Initialize plugin in a project — install Iron Laws, auto-activation;
  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

```
$elixir-phoenix:phx-init           # First-time installation
$elixir-phoenix:phx-init --update  # Update existing installation with latest rules
```

## Iron Laws

1. **NEVER overwrite content outside plugin markers** — User-written CLAUDE.md rules must be preserved verbatim
2. **Always detect stack before generating** — Never assume Phoenix/Ecto versions
3. **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.*"~>` in `mix.exs`
- Ecto version: search for `ecto.*"~>` in `mix.exs`
- Oban: search for `"oban"` and `"oban_pro"` in `mix.exs`
- Frameworks: search for `"ash"`, `"surface"` in `mix.exs`
- Tidewave: search for `"tidewave"` in `mix.exs`
- Project size: use Glob to count `lib/**/*.ex` files

### Step 3: Handle Installation Modes

**Mode A: Fresh Install** (no CLAUDE.md or no markers)

1. Create/append to CLAUDE.md
2. Insert full behavioral instructions between markers
3. Include only relevant sections based on detected stack

**Mode B: Update** (`--update` flag or markers exist)

1. Find content between `<!-- ELIXIR-PHOENIX-PLUGIN:START -->` and `<!-- ELIXIR-PHOENIX-PLUGIN:END -->`
2. Replace with latest behavioral instructions
3. 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:

```markdown
<!-- ELIXIR-PHOENIX-PLUGIN:START -->
<!-- Last updated: {date} | Plugin version: 1.0 | Stack: Phoenix {version}, Ecto {version}, {optional: Oban, Tidewave} -->

# Elixir/Phoenix Plugin - Auto-Activation Rules

{Include all sections from the Content Template below, filtered by detected stack}

<!-- ELIXIR-PHOENIX-PLUGIN:END -->
```

### Step 4b: Offer Codex Review Guidelines (optional)

If `command -v codex` succeeds (or the user asks): offer to install a
managed `## Review guidelines` block into the project's `AGENTS.md` —
honored by BOTH `codex exec review` locally and the Codex cloud PR
reviewer. Follow the install rules and exact block in
`references/codex-review-guidelines.md`: markers
`ELIXIR-PHOENIX-REVIEW-GUIDELINES:START/END`, upsert in place on
`--update`, never touch content outside markers, and STOP to ask if an
unmanaged `## Review guidelines` section already exists. When codex is
absent and not requested, skip silently — never mention codex to users
who don't have it.

### Step 5: Output Summary

```
✅ Elixir/Phoenix plugin initialized

Detected stack:
- Phoenix {version}
- Ecto {version}
- {Oban standard | Oban Pro | not detected}
- {Tidewave ✓ | Tidewave not detected}
- {Ash Framework detected - Ecto patterns disabled | not detected}

Added to CLAUDE.md:
- Auto-activation rules (complexity detection, interview mode)
- Agent trigger patterns ({n} agents available)
- Reference auto-loading ({n} reference docs)
- Iron Laws enforcement ({n} laws)
- Verification rules
{- Codex review guidelines → AGENTS.md (only if installed in Step 4b)}

Run $elixir-phoenix:phx-init --update after plugin updates.
Run $elixir-phoenix:phx-audit for a full project health check.
```

## Content Template

The exact content to inject is in `references/injectable-template.md`.

**Key structure:**

1. **Routing table** — which `$elixir-phoenix:phx-*` command fits which kind of request
2. **Iron Laws** — STOP behavior on violations
3. **Conditional Sections** — Include based on detected stack:
   - `{OBAN_SECTION}` — If Oban detected (not Pro)
   - `{OBAN_PRO_SECTION}` — If Oban Pro detected
   - `{ASH_SECTION}` — If Ash Framework detected
   - `{TIDEWAVE_SECTION}` — If Tidewave detected
4. **Verification** — Mandatory after code changes
5. **Quick Reference** — Skill routing table

**Placeholder substitution:**

| Placeholder | Source |
|-------------|--------|
| `{DATE}` | Current date |
| `{PHOENIX_VERSION}` | From mix.exs |
| `{ECTO_VERSION}` | From mix.exs |
| `{OPTIONAL_STACK}` | Detected optional deps |

See `references/injectable-template.md` for full template with all placeholders and conditional sections.

## Validation

After running `$elixir-phoenix:phx-init`:

1. Check CLAUDE.md contains markers
2. Verify detected stack matches actual project
3. New session should:
   - Auto-detect complexity when given tasks
   - Stop on Iron Law violations
   - Offer relevant workflows based on task

## Error Handling

| Scenario | Action |
|----------|--------|
| CLAUDE.md read-only | Error: "Cannot modify CLAUDE.md - check permissions" |
| Markers corrupted | Warn, offer to remove and reinstall |
| Unknown Phoenix version | Use conservative defaults (all features enabled) |
| Not an Elixir project | Error: "No mix.exs found - is this an Elixir project?" |

## Relationship to Other Commands

| Command | When to Use |
|---------|-------------|
| `$elixir-phoenix:phx-init` | First time, or after plugin updates |
| `$elixir-phoenix:phx-audit` | Periodic project health check |
| `$elixir-phoenix:phx-verify` | After code changes |
Files in this package (3)
  • SKILL.md 6 KB
  • references/codex-review-guidelines.md 4 KB
  • references/injectable-template.md 7 KB

Versions

RepositoryScoreLicence
This page · oliver-kriska/claude-elixir-phoenix100MIT
oliver-kriska/claude-elixir-phoenix100MIT
oliver-kriska/claude-elixir-phoenix100MIT
oliver-kriska/claude-elixir-phoenix100MIT

Database snapshot: 13.11.2026 · package version 97fd09ea79e8 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100init
    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.
  • 100phx-help
    Recommend the right $elixir-phoenix:phx-* workflow. Use when choosing a plugin skill, not for Codex /help.
  • 100sdlc-init
    Codex-native initializer for Evo Talos. Use when the user asks for /sdlc-init, sdlc-init, initialize the SDLC kit, install the kit into the current project, or update the project's AGENTS.md from the plugin. Runs the plugin script, which auto-detects the active agent tool and…
  • 100grepai-init
    Initialize GrepAI in a project. Use this skill when setting up GrepAI for the first time in a codebase.
  • 100cc-spex-init
    Install or refresh Spex specification-driven workflows in the current project from the Spex source bundled with the cc-spex plugin. Use when a Codex user asks to initialize Spex, configure Spex extensions or security, or update an existing Spex project through the cc-spex plugin.
  • 95init
    Initialize ADR Kit in a project. Use for adr-kit init, first-time ADR setup, architecture audit, managed guidance, and the pre-commit gate.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.