elixir-meta-programming

elixir-meta-programming is a skill for Claude Code, Codex from pproenca/dot-skills. It costs 167 tokens per session (1,418 once invoked), scanned A, original, MIT.

Guidance for writing Elixir macros and declarative DSLs, which are code-like languages embedded inside an Elixir program. It covers compile-time code generation and module-building patterns.

In plain words
What is it for?
Use it to build schemas, routes, workflows, or other DSLs with quote, unquote, using, module attributes, and compile-time hooks.
Why use it?
It helps avoid making macros where ordinary functions would be clearer and prevents common mistakes when macros are genuinely needed.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md.

Good fit Use it to build schemas, routes, workflows, or other DSLs with quote, unquote, using, module attributes, and compile-time hooks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pproenca/dot-skills/elixir-meta-programming
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pproenca/dot-skills --skill elixir-meta-programming
Clone the repo
git clone --depth 1 https://github.com/pproenca/dot-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for elixir-meta-programming

README.md
[![agentmods](https://agentmods.dev/badge/skills/pproenca/dot-skills/elixir-meta-programming/github.svg)](https://agentmods.dev/skills/pproenca/dot-skills/elixir-meta-programming)
Your own site
<a href="https://agentmods.dev/skills/pproenca/dot-skills/elixir-meta-programming"><img src="https://agentmods.dev/badge/skills/pproenca/dot-skills/elixir-meta-programming/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for elixir-meta-programming

Your own site · 80×15
<a href="https://agentmods.dev/skills/pproenca/dot-skills/elixir-meta-programming"><img src="https://agentmods.dev/badge/skills/pproenca/dot-skills/elixir-meta-programming.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 167 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,418 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00167 $0.01418
Opus 5 $0.00084 $0.00709
Sonnet 5 $0.00033 $0.00284
Haiku 4.5 $0.00017 $0.00142

Measured 5d ago against content hash 8610e3dc4778, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

elixir-meta-programming scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/.experimental/elixir-meta-programming/SKILL.md · 82 lines

How it starts

The opening of the file, as written. The whole thing — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Elixir Metaprogramming & DSLs

How to build Elixir macros and declarative DSLs correctly — for the case where a macro is genuinely warranted and a plain function won't do. Each rule corrects a specific wrong default a capable model makes once it starts writing quote/unquote, __using__, and @before_compile; nothing here restates macro basics the model already knows.

First: is a macro actually warranted?

The default answer is no — reach for a higher-order function, a behaviour, or data-plus-an-interpreter first. That gate is not this skill's job; it lives in the sibling skills and you should apply it before opening this one:

  • staff-level-elixirdata-functions-over-macros (solve it with a function first)
  • adversarial-elixirmeta-functions-not-macro-dsl, meta-use-is-not-import, meta-no-compile-time-coupling

A macro earns its place only when you need something a function cannot give — new syntax, control over whether/when arguments evaluate, or code that must exist at compile time (compiling a schema, generating clauses from a declaration list). Once you've crossed that threshold, this skill is how you do it right.

When to Apply

  • Writing a macro — deciding what goes in the quote block versus a runtime function, and how arguments evaluate
  • Building a declarative DSL — a schema/spec/route/workflow block that collects declarations and generates a module
  • Wiring use MyDSL — what __using__ should inject and what belongs in @before_compile
  • Generating functions or clauses from a list of declarations at compile time
  • Making a DSL fail at mix compile with an error that points at the user's source
  • Reviewing existing macro/DSL code for evaluation, hygiene, escaping, and compile-time-validation bugs

Rule Categories

# Category Prefix Covers
1 Macro Design macro The shape of a single macro — thin macro over a runtime function; defguard for guard-safe constructs
2 Quote & Hygiene quote Compile-time semantics traps — multiple evaluation, Macro.escape, hygiene vs var!
3 DSL Construction dsl Assembling a block DSL — accumulating attributes + @before_compile, minimal __using__, unquote fragments, introspection
4 Compile-Time Validation valid Failing well — validate while compiling, locate errors at the caller's line

Read the full file on GitHub · 82 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 82 lines · 167 tokens per session scan A 8610e3dc4778

Subscribe to this mod's changes

elixir-meta-programming is a skill published in the GitHub repository pproenca/dot-skills (205 stars, last pushed 24d ago), licensed MIT. It adds 167 tokens to every session and 1,418 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

matlab

Build, review, migrate, and safely plan MATLAB or GNU Octave numerical workflows, including arrays, tabular/time data, tests, projects, graphics, MAT files, and explicit Python interoperability.

K-Dense-AI/scientific-agent-skills · 42 tokens

ast-grep

Guide for writing ast-grep rules to perform structural code search and analysis. Use when users need to search codebases using Abstract Syntax Tree (AST) patterns, find specific code structures, or perform complex code queries that go beyond simple text search. This skill should be used when users ask to search for…

JanDeDobbeleer/oh-my-posh · 80 tokens

platform-detection

Identify a .NET project's test platform, framework, command mode, and SDK-style vs classic project system. Use only for "which test platform/framework?", "VSTest or MTP?", or "what runner does this project use?", including bridge settings, UseVSTest opt-outs, and incompatible or conflicting VSTest/MTP configuration.…

dotnet/skills · 146 tokens

unity-version-split

Split a C# file into Unity 6.5+ and pre-Unity 6.5 variants. Use when a file needs different implementations for different Unity versions due to API changes (e.g., EntityId vs int, GetEntityId vs GetInstanceID).

IvanMurzak/Unity-MCP · 59 tokens

omh-rust

This is a Hermes-native rust workflow skill.

rlaope/oh-my-hermes · 69 tokens

axiom-concurrency

Use when writing ANY async code, actors, threads, or seeing ANY concurrency error. Covers Swift 6 concurrency, @MainActor, Sendable, data races, async/await patterns.

CharlesWiltgen/Axiom · 43 tokens