phoenix-contexts SKILL.md skillA
phoenix-contexts from oliver-kriska/claude-elixir-phoenix is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add oliver-kriska/claude-elixir-phoenix/phoenix-contexts@git:20260929.c08ad14Pins git:20260929.c08ad14 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- oliver-kriska/claude-elixir-phoenix
- Path
plugins/elixir-phoenix/skills/phoenix-contexts/SKILL.md- Versions recorded
- 6
- Latest version
- git:20260929.c08ad14, committed Sep 29, 2026
- First version recorded
- Mar 11, 2026
- Size
- 3,562 bytes
- Repository stars
- 573
- License
- MIT
Phoenix context design — creating/splitting contexts, Scope (1.8+), Ecto.Multi, PubSub, routers, plugs, controllers. Use when editing contexts, routers, or designing boundaries.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Phoenix Contexts Reference
> **Ash projects**: `Ash.Domain` replaces Phoenix contexts for data access — use the `ash-framework` skill. Context boundary and PubSub patterns still apply.
Reference for designing and implementing Phoenix contexts (bounded contexts).
## Iron Laws — Never Violate These
1. **CONTEXTS OWN THEIR DATA** — Never query another context's schema directly via Repo
2. **SCOPES ARE MANDATORY (Phoenix 1.8+)** — Every context function MUST accept scope as first parameter
3. **THIN CONTROLLERS/LIVEVIEWS** — Controllers translate HTTP, business logic stays in contexts
4. **NO SIDE EFFECTS IN SCHEMAS** — Use `Ecto.Multi` for transactions with side effects
## Context Structure
```
lib/my_app/
├── accounts/ # Context directory
│ ├── user.ex # Schema
│ ├── scope.ex # Scope struct (Phoenix 1.8+)
├── accounts.ex # Context module (public API)
```
## Phoenix 1.8+ Scopes (CRITICAL)
Context functions take the scope as their first parameter, so queries are filtered to the caller:
```elixir
def list_posts(%Scope{} = scope) do
from(p in Post, where: p.user_id == ^scope.user.id)
|> Repo.all()
end
…Read the whole file at its exact version.
How to install
mdr add oliver-kriska/claude-elixir-phoenix/phoenix-contexts@sha256:96f160174d35778eThe line at the top of this page pins the label git:20260929.c08ad14, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_5anvlt75otgbltc5)
3 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 6 versions of this file, between Mar 11, 2026 and Sep 29, 2026, about one every 40 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20260929.c08ad14 latest | 2026-09-29 | c08ad14 | 3,562 B | A | view · diff |
| git:20260608.02de457 | 2026-06-08 | 02de457 | 3,524 B | A | view · diff |
| git:20260401.f2ab67a | 2026-04-01 | f2ab67a | 3,363 B | A | view · diff |
| git:20260325.d20c8dd | 2026-03-25 | d20c8dd | 3,563 B | A | view · diff |
| git:20260321.4e9d9e9 | 2026-03-21 | 4e9d9e9 | 3,480 B | A | view · diff |
| git:20260311.422b844 | 2026-03-11 | 422b844 | 3,345 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (3562 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
oliver-kriska/claude-elixir-phoenix · 573 stars · license MIT · pushed 2026-11-06 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_5anvlt75otgbltc5 GET https://markdownregistry.com/api/v1/resolve?ref=oliver-kriska/claude-elixir-phoenix/phoenix-contexts GET https://markdownregistry.com/api/v1/blob/96f160174d35778e7fa3161124f65e9352c84d3592b410b378d912aa81f31c8a
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.
More from oliver-kriska/claude-elixir-phoenix
Every file in oliver-kriska/claude-elixir-phoenix