SkillsReviewed · oliver-kriska

Phoenix Context Boundary Validation

Boundaries is an AI assistant skill for Phoenix developers checking separation between business areas, but its checks need human review and its scoring formula is incomplete. It provides Mix xref commands, source-search patterns and refactoring guidance for Phoenix contexts.

Researched 17 Nov 2026

In short.

Boundaries is an AI assistant skill for Elixir/Phoenix developers reviewing application architecture, but its health scoring is incompletely specified and its refactoring examples need review. It combines Mix xref dependency analysis, source searches and rules for separating web handlers, business logic and data access. The references explain context APIs and common refactors. Nothing was executed, so command compatibility, diagnostic accuracy and behavior preservation are unassessed.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage includes all three supplied files in plugins/elixir-phoenix/skills/boundaries at revision 4621ae486f3ef3270cc5871685c9b13735ad5e60: SKILL.md, references/context-design.md and references/refactoring-boundaries.md. The repository-root LICENSE is included as a related notice outside that folder. The remaining plugin and repository, installation machinery and implementations of the referenced /phx:plan, /phx:quick and /phx:review commands are outside this scope. No installation, commands, tests or refactors were executed. Host compatibility, diagnostic accuracy and actual application outcomes remain unassessed.

The overview

identity

The resource is the boundaries skill in oliver-kriska/claude-elixir-phoenix. A Phoenix context groups a business area's operations and data access behind a public API. The folder contains SKILL.md and two references: context-design.md and refactoring-boundaries.md. Original source: [https://github.com/oliver-kriska/claude-elixir-phoenix/tree/main/plugins/elixir-phoenix/skills/boundaries].

The entry file advertises /phx:boundaries, /phx:boundaries --assess and /phx:boundaries --fix. The selected files contain assistant instructions and examples; they include no standalone analyzer implementation.

assessment

The skill offers a useful starting point for reviewing a Phoenix application whose team wants web handlers to call contexts and contexts to own data access. Its strongest material connects concrete warning signs, such as Repo calls in controllers, to examples of moving those operations into context functions.

Confidence is lower in the numerical assessment. The document specifies six weighted metrics but does not explain how measurements become points or how context scores combine into an overall score. Its sample scores therefore cannot be reproduced from the instructions alone.

users

Phoenix developers preparing an architecture review or a small refactor are the clearest audience. Experienced developers can use the dependency checks to investigate coupling before moving modules. Beginners get explanations of context responsibilities, function naming and cross-context communication, but will need enough Elixir knowledge to adapt examples and assess suggested changes.

The guidance assumes particular architectural conventions, including keeping queries out of schema modules and avoiding direct access to another context's schemas. Teams should decide whether those conventions match their intended design before treating every match as a defect.

capabilities

The documented modes request a boundary review, a 0–100 health assessment or suggested fixes. Checks cover context size, public API size, outgoing and incoming context dependencies, compile-time cycles and boundary violations. Automatic correction is not established by the supplied files.

The instructions use dependency graphs and source searches to investigate Repo access in the web layer, queries in schemas, cross-context schema aliases and business logic in LiveViews. Supporting references explain public context APIs, direct calls, PubSub, domain events and incremental refactoring.

Using it

requirements

The documented workflow requires access to the project's source files, an assistant host capable of reading and searching them, and command execution for Mix xref. The examples assume an Elixir/Phoenix application using Ecto and recognizable context and web-layer directories.

Supported Elixir, Erlang/OTP, Phoenix, Ecto, Mix and assistant-host versions are unspecified. The files reference Glob, Grep and CLAUDE_SKILL_DIR, but do not establish compatibility with other assistant hosts or explain how the /phx command namespace is registered.

mechanism

An assistant follows written rules, gathers dependency information and searches for suspicious code patterns. The prescribed separation places HTTP concerns in the web layer, business operations and Repo calls in contexts, and data definitions and validations in schemas. Dependency mapping is required before moving modules.

The health assessment assigns weights of 20% to module count, 15% to public API size, 20% to outgoing dependencies, 15% to incoming dependencies, 15% to circular dependencies and 15% to boundary violations. The weights total 100%, but penalties, intermediate ranges and aggregation are undefined. Counting public function definitions also needs interpretation because textual definition counts need not represent distinct API operations.

setup

The selected folder does not provide plugin installation steps or host configuration. Preserve SKILL.md and its references directory together so the documented reference paths remain meaningful. Availability of /phx:boundaries depends on configuration outside these files.

In a compatible, configured host, the documented starting request is /phx:boundaries. Adapt MyApp and my_app placeholders to the actual application. Confirm that the listed Mix commands and target arguments are accepted by the installed toolchain before relying on their output.

example

The supplied controller example calls Repo.get!(User, id) directly from MyAppWeb.UserController. Its proposed refactor introduces Accounts.get_user!/1 to perform the lookup, then changes the controller to call Accounts. This illustrates moving data access behind a context API.

For a broader review, /phx:boundaries --assess requests measurements and recommendations across contexts. The displayed 82/100 overall score and per-context scores are illustrative output, with no execution evidence supporting them.

Assessment & evidence

limitations

The numerical thresholds are heuristics with unexplained gaps between some healthy and red-flag ranges. Search patterns depend on naming and directory conventions, so matches require inspection and absence of matches does not establish clean architecture. The circular-dependency command explicitly targets compile-time dependencies; broader dependency coverage is unassessed.

The refactoring snippets need error-path review. In the cross-context example, the tap callback matches only {:ok, _}; an {:error, changeset} result would not match that callback. This is a source-level concern, not an observed runtime failure.

The LiveView refactor replaces a notification insertion with Ecto.Multi.run calling another context, without showing that function's implementation or transaction behavior. Several snippets also omit surrounding definitions. They do not establish a complete, behavior-preserving application change.

reasoning

The design rationale is that context APIs centralize business operations and reduce callers' dependence on schema details. Mapping dependencies before moving code can help identify affected callers. These are the guides' stated design goals; measured improvements in maintainability or developer productivity are unknown.

A dependency count or schema alias provides a reason to investigate. Whether it warrants a refactor depends on domain responsibilities and the application's intended architecture. The skill's strict rules are most useful when a team has explicitly adopted them.

alternatives

Developers can perform a manual review using the same Mix xref commands and source searches. That provides an alternative when assistant-guided interpretation is unnecessary. The supplied files do not compare this skill with other architecture tools or assistant skills.

Within the design guidance, direct context calls are proposed for simple synchronous work, PubSub for events triggering side effects, and domain-event dispatch for complex workflows. These alternatives have examples, but their delivery guarantees, operational costs and performance are not evaluated.

evidence

SKILL.md supports the documented commands, rules and scoring metrics. context-design.md supports the explanations of context responsibilities and communication choices. refactoring-boundaries.md supplies the migration examples and exposes the incomplete error-handling and transaction details discussed above. The root LICENSE supplies the rights terms.

The materials contain instructions, sample output and code snippets. They provide no command logs, application test results, diagnostic-accuracy measurements or demonstrated refactoring outcomes. Nothing was executed.

Access & freshness

costs

The MIT notice grants permission to use and redistribute the material free of charge. It does not establish the total cost of using the skill through an AI assistant.

Assistant subscriptions, model or API charges, token consumption, execution time and developer review effort are not priced or measured in the supplied files. Total operating cost is unknown.

rights

The accompanying repository LICENSE is MIT, with copyright attributed to Oliver Kriska for 2025–2026. It permits use, copying, modification, publication, distribution, sublicensing and sale of the software and associated documentation.

Copies or substantial portions must retain the copyright and permission notice. The material is supplied without warranty. No separate license notice appears in the three supplied skill files. License source: [https://raw.githubusercontent.com/oliver-kriska/claude-elixir-phoenix/4621ae486f3ef3270cc5871685c9b13735ad5e60/LICENSE].

freshness

The supplied snapshot was captured on 17 November 2026 at 00:19:16.521 UTC and pins revision 4621ae486f3ef3270cc5871685c9b13735ad5e60. The revision-specific folder is [https://github.com/oliver-kriska/claude-elixir-phoenix/tree/4621ae486f3ef3270cc5871685c9b13735ad5e60/plugins/elixir-phoenix/skills/boundaries].

The files do not specify a release version or supported toolchain versions. Changes after this snapshot and compatibility with a particular installed Phoenix application are unknown.

actions

Confirm that the intended assistant host exposes /phx:boundaries and that the documented Mix commands work with the project's installed tools. Begin with a boundary review, inspect the dependency data and source matches, and decide which architectural rules apply to the application.

Before adopting a suggested refactor, replace placeholders, complete omitted definitions, review transaction behavior and handle both success and error paths. Verify behavior with the project's relevant tests. Use the health score as a discussion aid until its calculation method is defined.

Evidence for this report

LICENSEnotice · checked 2026-11-17