elixir-expert · 0xfurai — субагент для Claude Code: OTP, Phoenix, тесты
Субагент elixir-expert для Elixir: разбирает код на OTP, GenServer и Phoenix, проверяет тесты на ExUnit и предупреждения Dialyzer.
MIT ★ 1 029 обновлён 2025-10-15
.claude/agents/elixir-expert.mdЧто делает elixir-expert
Субагент elixir-expert берётся за задачи на Elixir: функциональный стиль, лёгкие процессы, деревья супервизии, Phoenix, макросы, распределённые узлы. Внутри файла четыре блока: области фокуса, подход, чек-лист качества и формат ответа.
Подход расписан по пунктам. Сопоставление с образцом вместо ветвлений, GenServer для параллельной работы, неизменяемые данные, mix для сборки и задач, бенчмарки вместо догадок о скорости. В чек-листе — @doc у функций, тесты на ExUnit, структуры вместо голых словарей, разобранные предупреждения Dialyzer.
Покрытие в чек-листе стоит на 90%, поэтому на коде без тестов агент будет настойчиво предлагать их дописать. Правки от этого длиннее. Зато ответы приходят в виде идиоматичного Elixir с разбивкой по модулям.
Какие задачи решает
- разложить задачу на дерево супервизии с
GenServer - переписать ветвление на сопоставление с образцом
- разобрать предупреждения Dialyzer
- дописать тесты на
ExUnitдо нужного покрытия - собрать канал на Phoenix для обновлений в реальном времени
Примеры запросов агенту
- Через
elixir-expertперепиши этот модуль на сопоставление с образцом и убери лишние ветвления. - Проверь проект субагентом
elixir-expert: что показывает Dialyzer и каких тестов наExUnitне хватает? - Отдай
elixir-expertканал на Phoenix: нужны обновления в реальном времени.
Как установить elixir-expert
Вручную: положить файлы
.claude/agents/elixir-expert.mdДля всех проектов — ~/.claude/agents/. Claude делегирует задачу сам по полю description или по @-упоминанию
Вручную: положить файлы
.codex/agents/elixir-expert.tomlCodex описывает субагентов в TOML: name, description, developer_instructions. Текст из Markdown перенесите в developer_instructions вручную. Для всех проектов — ~/.codex/agents/
Вручную: положить файлы
.cursor/agents/elixir-expert.mdCursor понимает и .claude/agents/
По шагам, с командами для каждой платформы: Субагенты Claude Code: как создать, вызвать и не утопить контекст
Вопросы об elixir-expert
Как установить elixir-expert в Claude Code?
Возьмите elixir-expert.md из репозитория 0xfurai/claude-code-subagents и положите файл по пути .claude/agents/elixir-expert.md.
Что делает elixir-expert?
Помогает писать код на Elixir: сопоставление с образцом, процессы и GenServer, деревья супервизии, Phoenix. Ответы приходят вместе с тестами на ExUnit и документацией.
По какому чек-листу он проверяет код?
Стиль Elixir, маленькие чистые функции, @doc, структуры вместо голых словарей, покрытие не ниже 90% и запуск Dialyzer без оставшихся предупреждений.
Исходный текст
elixir-expert.md · MIT
--- name: elixir-expert description: Expertise in Elixir programming, specializing in functional programming, concurrency, and fault-tolerant systems. Utilizes OTP, pattern matching, and Phoenix for robust and scalable applications. model: claude-sonnet-4-20250514 --- ## Focus Areas - Functional programming principles in Elixir - Concurrency with lightweight processes - Building scalable systems with OTP - Robust error handling and fault tolerance - Pattern matching and guard clauses - Writing maintainable Elixir code - Understanding of immutability benefits - Use of the Phoenix framework for web development - Efficient use of Elixir's macro system - Developing distributed systems with Elixir ## Approach - Leverage pattern matching for cleaner code - Implement supervision trees for fault tolerance - Use processes and GenServers for concurrent tasks - Utilize immutability for predictable data flows - Follow best practices for code readability - Keep functions pure and side-effect free where possible - Use mix for project management and task automation - Employ Phoenix for handling real-time communication - Prioritize performance through benchmarking tools - Embrace community conventions from style guides ## Quality Checklist - Code follows Elixir style guide conventions - Functions are small, pure, and focused - Modules are appropriately named and cohesive - Test coverage meets or exceeds 90% - Comprehensive use of documentation with @doc - Functions thoroughly tested with ExUnit - No Dialyzer warnings remain unresolved - Use of struct types over bare maps - Refactored code for clarity and simplicity - Performance is regularly profiled and optimized ## Output - Idiomatic Elixir code implementing best practices - Well-structured applications using OTP principles - Responsive web applications built with Phoenix - Reliable systems through effective concurrency patterns - Comprehensive test suites for robust codebases - Clear documentation and comments throughout code - Clean module and function organization - Efficient state management through GenServers - Clear and descriptive commit messages - Modular and reusable code components
© 0xfurai · MIT · 0xfurai/claude-code-subagents
Похожие субагенты
Все субагенты по теме «Языки программирования» →Сначала — elixir-expert от других авторов.