一键导入
elixir
Use this skill for Elixir/Phoenix development in this repo: implementing features, refactors, debugging, tests, Ecto changes, and production-safe fixes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use this skill for Elixir/Phoenix development in this repo: implementing features, refactors, debugging, tests, Ecto changes, and production-safe fixes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Query the running HydraSRT instance via MCP (routes, logs, stats, control). Use when the user invokes /HydraSRT or asks to inspect or control a live HydraSRT deployment through MCP.
Use this skill for frontend work in web_app (React/TypeScript, UI implementation, tests, and refactors).
Run HydraSRT development workflows: mix q quality gate, Elixir unit/E2E tests, native Rust tests, web Vitest/Playwright, and make dev. Use when the user asks to run tests, check code quality, start the dev server, or debug CI locally.
Use this skill for GStreamer pipeline development and debugging: graph design, caps negotiation issues, latency, synchronization, and runtime diagnostics.
Use when designing or evolving Hydra platform architecture across Elixir/Phoenix, SQLite, DuckDB analytics, native/Rust, and runtime boundaries.
Use this skill for Rust development in this repo: design, implementation, debugging, performance work, and reliable testing.
| name | elixir |
| description | Use this skill for Elixir/Phoenix development in this repo: implementing features, refactors, debugging, tests, Ecto changes, and production-safe fixes. |
Use for any task touching Elixir, Phoenix, Ecto, Mix, OTP, or ExUnit.
map[:key]) for map reads in app code. Do not use Map.get/2. Use Map.get/3 only when an explicit default value is required.@spec for every function (def/defp).@spec becomes hard to read, introduce named custom types (@type, @opaque) and reuse them in specs.mix formatmix compile --warnings-as-errorsmix testmix test path/to/test_file.exsmix test path/to/test_file.exs:123validate_required, unique_constraint, foreign_key_constraint).Task.Supervisor for isolated async work.Many APIs in this repo take or store durations in milliseconds (Process.send_after/3, :inet.setopts/2 send_timeout, Cachex TTL, Application.get_env/3 defaults, test assert_receive timeouts, etc.).
Prefer :timer over raw integer literals so the unit is obvious:
# Good
@default_interval_ms :timer.seconds(30)
@recv_timeout :timer.seconds(10)
Process.send_after(self(), :tick, :timer.seconds(5))
config :app, ttl_ms: Env.get_integer("TTL_MS", :timer.minutes(5))
# Avoid (unless the value is not a duration, e.g. bytes or a port)
@default_interval_ms 30_000
send_timeout: 10_000
Use :timer.seconds/1, :timer.minutes/1, or :timer.hours/1 as appropriate. :timer returns milliseconds. Existing examples: HydraSrt.Auth (:timer.minutes(5)), HydraSrt.Stats.Cleaner (:timer.hours(1)), RTMP config in config/runtime.exs.
Do not use :timer for non-duration numbers (byte counts, port numbers, numeric limits).