Skip to content
Back to skills

Elixir Context Fn

ASecurity

Add a read, write, or action to an existing Emisar context using its Query, Subject, Authorizer, tagged returns, and denial/isolation tests.

  • 391 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
ai-agentsrustbashapidatabasedocumentation

Works with

  • api

Security analysis

A100/100

Scanned November 7, 2026

npx -y skills add AndrewDryga/emisar --skill elixir-context-fn --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Elixir Context Fn?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Elixir Context Fn
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/andrewdryga-elixir-context-fn/badge)](https://www.skillsdirectory.com/skills/andrewdryga-elixir-context-fn)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: elixir-context-fn
description: Add a read, write, or action to an existing Emisar context using its Query, Subject, Authorizer, tagged returns, and denial/isolation tests.
effort: medium
argument-hint: "<Context>.<function> e.g. Runbooks.archive_runbook"
allowed-tools: Read, Grep, Glob, Bash, Write, Edit
---

# Add a context function

Read portal/AGENTS.md and sections 1, 2, 4, 5, and 7 of
portal/.agent/kb/rules/elixir-layered-contexts.md as relevant to the operation.
Read the target context and match its existing functions.

For Subject-gated public APIs, Subject is the last required positional argument.
Check permission before database access, scope with Authorizer.for_subject
immediately before the Repo call, and return the documented tagged tuple.
Read section 1.2 for self-service and section 1.4 for already-authorized internal
helpers; do not apply a generic template over those explicit exceptions.

Choose the existing Repo operation for the contract: fetch for a tagged row, list
for a paginated result, insert for creation, fetch_and_update for guarded single-row
mutations, and Multi for multi-row composition. Confirm signatures in source.
Queries own predicates; changesets own casts, validations, and state transitions.

Audit writes belong in the transaction; external side effects belong after the
outer commit. Use named per-event broadcast helpers. Do not place audit insertion
inside an after_commit callback or nest after_commit under another transaction.

Reuse permission accessors; introduce a new one only for a new capability and wire
its role grants. State the function's contract in its documentation.
Cover happy, denial, and cross-account behavior for both reads and writes.
Use focused checks while working; the lead owns `./run gate portal --changed`,
the relevant trust-boundary review, and the complete `./run gate portal` before
pushing.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.