elixir-idioms

仓库创建 2026年2月12日最近提交 5 小时前SkillHot 收录 20 天前
▸ 精选理由

帮助遵循 BEAM 思想写出更可靠的并发与守护进程代码。

这个 Skill 做什么

提供 Elixir/BEAM 的常用范式与并发模式(GenServer、Supervisor 等)。

帮你把 Elixir/BEAM 的并发和进程设计讲清楚,覆盖 GenServer、Supervisor、Task、Registry、模式匹配、管道等常用范式。会在设计进程拓扑或排查 BEAM 性能与稳定性问题时用到。特点是贴合 BEAM 的运行约束(比如消息会被拷贝、不要无理由启动进程),给出可落地的实战建议,而不是抽象原则。

▸ 展开 SKILL.md 英文原文

OTP/BEAM patterns and Elixir idioms — GenServer, Supervisor, Task, Registry, pattern matching, with chains, pipes. Use when designing processes or debugging BEAM issues.

开发编程ElixirOTP并发Claude Code
505
Stars
34
Forks
40
仓库内 Skill
+35
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/oliver-kriska/claude-elixir-phoenix/main/plugins/elixir-phoenix/skills/elixir-idioms/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/oliver-kriska/claude-elixir-phoenix/main/plugins/elixir-phoenix/skills/elixir-idioms/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# Elixir Idioms

Reference for writing idiomatic Elixir code with BEAM-aware patterns.

## Iron Laws — Never Violate These

1. **NO PROCESS WITHOUT A RUNTIME REASON** — Processes model concurrency, state, isolation—NOT code structure
2. **MESSAGES ARE COPIED** — Keep messages small (except binaries >64 bytes)
3. **GUARDS USE `and`/`or`/`not`** — Never use short-circuit operators in guards (guards require boolean operands)
4. **CHANGESETS FOR EXTERNAL DATA** — Use `cast/4` for user input, `change/2` for internal
5. **RESCUE ONLY FOR EXTERNAL CODE** — Never use rescue for control flow
6. **NO DYNAMIC ATOM CREATION** — `String.to_atom(user_input)` causes memory leak (atoms aren't GC'd)
7. **@ex
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有