Agent skill

Phx Boundaries

by oliver-kriska in oliver-kriska/claude-elixir-phoenix

Analyze Phoenix context boundaries and module coupling via mix xref.

MITAuto-check passedAI & LLM Engineering

Install Phx Boundaries

skills CLI
$ npx skills add oliver-kriska/claude-elixir-phoenix --skill phx-boundaries -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install oliver-kriska/claude-elixir-phoenix phx-boundaries --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/oliver-kriska/claude-elixir-phoenix.git skills-src && mkdir -p .claude/skills && cp -r skills-src/targets/codex/skills/phx-boundaries .claude/skills/phx-boundaries && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
phx-boundaries
GitHub stars
565
Token cost
~1.1k tokens
SKILL.md length
403 words
Files
3 (incl. references)
Skills in repo
109
Repo updated
First seen
Licence
MIT

At a glance

Analyze Phoenix context boundaries and module coupling via mix xref.

  • Works in 5 steps: Controllers call only contexts - No… → Schemas are pure data - No side effects,… → Contexts own their schemas - Don't… → …
  • Checking cross-context calls…
  • SKILL.md covers Usage, --assess Mode: Context Health…, Iron Laws - Never Violate These and Dependency Rules, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Phx Boundaries is an agent skill from oliver-kriska/claude-elixir-phoenix. Analyze Phoenix context boundaries and module coupling via mix xref. Use when checking cross-context calls…

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/context-design.md` and `references/refactoring-boundaries.md`).

It sits in AI & LLM Engineering, covering LLM observability. The repository describes itself as: Claude Code plugin for Elixir/Phoenix/LiveView — 26 specialist agents, Iron Laws enforcement, and Tidewave MCP integration. Plan features with parallel research agents, execute… The licence is MIT.

When your agent uses it

  • Checking cross-context calls…
  • Tasks that involve LLM observability

Example prompts

  • “/phx-boundaries”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Controllers call only contexts - No direct Repo access from web layer
  2. Schemas are pure data - No side effects, no Repo calls in schema modules
  3. Contexts own their schemas - Don't import schemas from other contexts
  4. Explicit dependencies only - Cross-context calls must be intentional
  5. DO NOT refactor context boundaries without running mix xref first — Refactoring without dependency data creates new violations; always map…

What it can do on your machine

Read from SKILL.md and the folder at commit 9767a82. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Phx Boundaries loads about 1.1k tokens when it runs, and up to ~3.5k if it reads all its reference files. Until then it costs about 31 tokens; SKILL.md has 403 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~31
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from oliver-kriska/claude-elixir-phoenix at commit 9767a82, republished under its MIT licence (© oliver-kriska). 403 words, ~1,138 tokens.

Download SKILL.mdSave it as .claude/skills/phx-boundaries/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
phx-boundaries
description
Analyze Phoenix context boundaries and module coupling via mix xref. Use when checking cross-context calls…

Phoenix Context Boundary Validation

Analyze module dependencies to ensure clean context separation and proper architectural boundaries.

Usage

$elixir-phoenix:phx-boundaries              # Check for violations
$elixir-phoenix:phx-boundaries --assess     # Score context health (0-100)
$elixir-phoenix:phx-boundaries --fix        # Suggest fixes for violations

--assess Mode: Context Health Score

Evaluate overall boundary health with a quantified score.

Metrics Calculated
MetricHealthy RangeRed FlagWeight
Modules per context3-15>20 or <220%
Public API surface5-30 funcs>40 funcs15%
Fan-out (contexts called)1-4>620%
Fan-in (called by contexts)1-6>1015%
Circular dependencies0>015%
Boundary violations0>015%
Commands for Assessment

Use Glob to count .ex files per context directory under lib/my_app/*/. Use Grep to count public function definitions per context file under lib/my_app/*.ex. Run mix xref graph --format stats for dependency analysis. Run mix xref graph --format cycles --label compile for compile-time circular dependencies.

Output Format
markdown
## Context Health Assessment

### Overall Score: 82/100 (Good)

| Context | Modules | API | Fan-Out | Fan-In | Score |
|---------|---------|-----|---------|--------|-------|
| Accounts | 5 | 12 | 2 | 4 | 95 |
| Orders | 18 | 45 | 8 | 3 | 62 |
| Shared | 2 | 8 | 0 | 12 | 78 |

### Issues Found

1. **Orders** - Too large (18 modules, 45 funcs)
   - Consider: Extract Fulfillment, Invoicing sub-contexts

2. **Orders** - High fan-out (8 contexts)
   - Consider: Review if all dependencies necessary

### Recommendations

- Split Orders into Orders + Fulfillment
- Review Accounts ← Billing dependency

Iron Laws - Never Violate These

  1. Controllers call only contexts - No direct Repo access from web layer
  2. Schemas are pure data - No side effects, no Repo calls in schema modules
  3. Contexts own their schemas - Don't import schemas from other contexts
  4. Explicit dependencies only - Cross-context calls must be intentional
  5. DO NOT refactor context boundaries without running mix xref first — Refactoring without dependency data creates new violations; always map the dependency graph before moving modules

Dependency Rules

LayerCan CallCannot Call
ControllersContexts, Plug, ConnRepo, Schemas directly
LiveViewsContexts, Components, PubSubRepo, Schemas directly
ContextsOwn schemas, Repo, other contextsWeb layer modules
SchemasEcto types, validationsContexts, Repo

Analysis Commands

Show full SKILL.md (162 more words)Show less
Check Compile Dependencies

Run mix xref graph --label compile-connected.

Find What Depends on a Context

Run mix xref graph --sink MyApp.Accounts --label compile.

Find What a Module Calls

Run mix xref callers MyApp.Accounts.get_user!/1.

Check for Circular Dependencies

Run mix xref graph --format cycles --label compile.

Red Flags to Detect

IssueDetection CommandFix
Repo in web layergrep -r "Repo\." lib/my_app_web/Move to context
Schema with queriesgrep -r "import Ecto.Query" lib/my_app/**/schemas/Move queries to context
Cross-context schema importgrep -r "alias MyApp.Other.Schema" lib/my_app/ctx/Call context API
Business logic in LiveViewgrep -r "Repo\.|Ecto\.Multi" lib/my_app_web/live/Extract to context

Boundary Verification Process

  1. Run mix xref graph --label compile-connected for overview
  2. Check for context cross-contamination
  3. Verify no direct Repo calls from web layer
  4. Ensure schemas have no side effects
  5. Validate explicit cross-context dependencies

Next Steps

Always end with actionable follow-up — findings without a plan get lost:

- `$elixir-phoenix:phx-plan` — Create a plan to fix violations (recommended for 3+ issues)
- `$elixir-phoenix:phx-quick` — Fix a single boundary violation directly
- `$elixir-phoenix:phx-review` — Review specific modules for deeper issues

References

For detailed patterns, see:

  • references/context-design.md - Context design principles
  • references/refactoring-boundaries.md - Fixing boundary violations

© oliver-kriska, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in targets/codex/skills/phx-boundaries of oliver-kriska/claude-elixir-phoenix.

  • SKILL.md
  • references/context-design.md
  • references/refactoring-boundaries.md

Open the folder on GitHubat commit 9767a82

Compare with similar skills

Phx Boundaries next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Phx Boundaries compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Phx Boundaries this skilloliver-kriska/claude-elixir-phoenix565—~1.1kAutomated safety check: PassMIT
Langfuse Codebase Navigatorlangfuse/langfuse36k—~1.4kAutomated safety check: PassCustom licence
LLM Trace Review Interfaceai-evals-course/evals-skills1.5k—~1.4kAutomated safety check: PassApache-2.0
Langfuse Integration Pagelangfuse/langfuse-docs246—~3.7kAutomated safety check: PassMIT
Langfuselangfuse/skills301—~2.1kAutomated safety check: NotesMIT
Livetablegurujada/live_table211—~1.9kAutomated safety check: PassMIT

Similar skills

  • Navigate Langfuse repositories, code areas, and agent skills.

    36k GitHub stars~1.4k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • LLM Trace Review Interface

    ai-evals-course/evals-skills

    Builds a browser-based annotation page for reviewing LLM traces one at a time with pass/fail labels, notes and saved results, tailored to your data.

    1.5k GitHub stars~1.4k tokensUpdated 16 days ago
    AI & LLM EngineeringAuto-check passed
  • Langfuse Integration Page

    langfuse/langfuse-docs

    Create a new Langfuse integration page in the langfuse-docs repo.

    246 GitHub stars~3.7k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Langfuse

    langfuse/skills

    Interact with Langfuse and access its documentation: tracing, monitoring, creating datasets, running experiments, and evaluating AI applications.

    301 GitHub stars~2.1k tokensUpdated 9 days ago
    AI & LLM EngineeringAuto-check: notes
  • Livetable

    gurujada/live_table

    A skill your agent uses when building, modifying, or reviewing Phoenix LiveView tables with LiveTable, including schema-backed tables, context-owned data providers, joined queries, filters…

    211 GitHub stars~1.9k tokensUpdated 3 mo ago
    AI & LLM EngineeringAuto-check passed
  • Langsmith Online Eval Engineering

    langchain-ai/langsmith-skills

    Official

    Design, test, create, and attach LangSmith online evaluators for production traces or conversation threads.

    160 GitHub stars~1.4k tokensUpdated 8 days ago
    AI & LLM EngineeringAuto-check passed

More from oliver-kriska/claude-elixir-phoenix

All 109 skills in this repo
  • Codex Ab

    oliver-kriska/claude-elixir-phoenix

    Run an A/B codex review experiment — holistic codex review vs 3 focused dimension passes (security, ecto, liveview) on the branch diff, classify findings, report a panel-value verdict.

    565 GitHub stars~977 tokensUpdated 5 days ago
    Auto-check passed
  • Audit

    oliver-kriska/claude-elixir-phoenix

    Project health audit and health check — architecture, performance, tests, dependencies, code quality.

    565 GitHub stars~2k tokensUpdated 5 days ago
    Auto-check passed
  • Compound Docs

    oliver-kriska/claude-elixir-phoenix

    Searchable Elixir/Phoenix/Ecto solution documentation system with; Use when consulting past solutions…

    565 GitHub stars~528 tokensUpdated 5 days ago
    Auto-check passed
  • Compound Docs

    oliver-kriska/claude-elixir-phoenix

    Searchable Elixir/Phoenix/Ecto solution documentation system with YAML frontmatter.

    565 GitHub stars~547 tokensUpdated 5 days ago
    Auto-check passed
  • Deploy

    oliver-kriska/claude-elixir-phoenix

    Elixir/Phoenix deployment patterns — Dockerfile, fly.toml, runtime.exs, mix release, rel/ overlays.

    565 GitHub stars~1.1k tokensUpdated 5 days ago
    Auto-check passed
  • Deps Update

    oliver-kriska/claude-elixir-phoenix

    Bump outdated Hex deps — inventory, snapshot changelogs, update, fix breaks, split reviewable PRs (patches bundled, majors solo).

    565 GitHub stars~1.4k tokensUpdated 5 days ago
    Auto-check passed

Questions about Phx Boundaries

What does Phx Boundaries do?

Analyze Phoenix context boundaries and module coupling via mix xref. Phx Boundaries is an agent skill from oliver-kriska/claude-elixir-phoenix. Analyze Phoenix context boundaries and module coupling via mix xref.

When should I use Phx Boundaries?

Phx Boundaries fits situations like: checking cross-context calls…; tasks that involve LLM observability.

How do I install Phx Boundaries in Claude Code?

Run `npx skills add oliver-kriska/claude-elixir-phoenix --skill phx-boundaries -a claude-code`. Or copy the skill folder (targets/codex/skills/phx-boundaries in oliver-kriska/claude-elixir-phoenix) into .claude/skills/phx-boundaries in your project. Claude Code loads it when a task matches its description.

How do I install Phx Boundaries in Codex?

Run `npx skills add oliver-kriska/claude-elixir-phoenix --skill phx-boundaries -a codex`. Or copy the skill folder (targets/codex/skills/phx-boundaries in oliver-kriska/claude-elixir-phoenix) into .agents/skills/phx-boundaries in your project. Codex loads it when a task matches its description.

Can I use Phx Boundaries in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add oliver-kriska/claude-elixir-phoenix --skill phx-boundaries -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/phx-boundaries, .gemini/skills/phx-boundaries, .github/skills/phx-boundaries and .opencode/skills/phx-boundaries in your project.

What does Phx Boundaries need to run?

SKILL.md names no scripts, command-line tools or credentials: Phx Boundaries is instructions for the agent only.

Does Phx Boundaries access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Phx Boundaries safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Phx Boundaries use?

Phx Boundaries is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Phx Boundaries use?

About 1.1k tokens (SKILL.md is roughly 4.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.3k tokens, read only when the agent opens those files.

What are the alternatives to Phx Boundaries?

Skills that share tags, products or a category with Phx Boundaries: Langfuse Codebase Navigator (langfuse/langfuse, 36k stars), LLM Trace Review Interface (ai-evals-course/evals-skills, 1.5k stars), Langfuse Integration Page (langfuse/langfuse-docs, 246 stars) and Langfuse (langfuse/skills, 301 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Phx Boundaries?

oliver-kriska (a GitHub user) maintains it in oliver-kriska/claude-elixir-phoenix, which has 565 GitHub stars. The repository holds 109 skills in this directory. The repository was last updated on October 5, 2026.

Source: oliver-kriska/claude-elixir-phoenix on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.