Curated library of 38 atomic skills, 7 personas, and 1 orchestrator for Elixir and Phoenix development. Organized by category: fundamentals, phoenix, database, testing, auth, infrastructure, quality, security, integrations, tooling, frameworks, personas, and orchestration. Covers core Elixir patterns, Phoenix LiveView, Ecto, OTP, Oban, testing, security, deployment, real-time, and modern tooling (Req, Swoosh, Cachex, Broadway, Ash).
91
91%
Does it follow best practices?
Impact
91%
1.37xAverage score across 56 eval scenarios
Advisory
Suggest reviewing before use
:fprof or :eprof and verify the output explicitly names the expected slow call site; re-run with a larger workload if ambiguousMIX_ENV=prod for realistic resultswarmup: 2 and time: 10; repeat 3–5 times to rule out variance; if results are within noise (< 5% difference), run 3 additional timesbench/baseline.json; raise an error if performance degrades more than 10% (compare against the previous 3 baselines before raising to rule out noise)# mix.exs
defp deps do
[
{:benchee, "~> 1.3", only: :dev}
]
endUse this pattern as the starting point for any new benchmark — it covers timing, memory, multiple inputs, and formatted output in one call.
# bench/list_benchmark.exs
Benchee.run(
%{
"Enum.sort" => fn list -> Enum.sort(list) end,
"Enum.sort_by" => fn list -> Enum.sort_by(list, & &1) end
},
time: 10, # Run each scenario for 10 seconds
warmup: 2, # Warm up for 2 seconds
memory_time: 2, # Measure memory usage
reduction_time: 2, # Measure reductions
inputs: %{
"small list" => Enum.to_list(1..100),
"medium list" => Enum.to_list(1..10_000),
"large list" => Enum.to_list(1..100_000)
},
formatters: [
{Benchee.Formatters.Console, comparison: true},
{Benchee.Formatters.HTML, file: "output/benchmark.html"}
]
)# Run benchmark
MIX_ENV=prod mix run bench/list_benchmark.exsUse this pattern when you have multiple concrete implementations of the same operation and need to confirm which is fastest across realistic data. Unlike the basic example above, this section demonstrates benchmarking non-trivial logic defined in a module.
defmodule StringOperations do
def concat_loop(strings) do
Enum.reduce(strings, "", fn s, acc -> acc <> s end)
end
def concat_join(strings) do
Enum.join(strings)
end
def concat_comprehension(strings) do
for s <- strings, into: "", do: s
end
end
strings = for i <- 1..1000, do: "string_#{i}"
Benchee.run(%{
"reduce" => fn -> StringOperations.concat_loop(strings) end,
"join" => fn -> StringOperations.concat_join(strings) end,
"comprehension" => fn -> StringOperations.concat_comprehension(strings) end
}):fprof.trace(:start, file: 'trace.trace')
MyApp.SlowFunction.run()
:fprof.trace(:stop)
:fprof.profile(file: 'trace.trace')
:fprof.analyse(dest: 'analysis.txt'):eprof.start()
:eprof.start_profiling([self()])
MyApp.SlowFunction.run()
:eprof.stop_profiling()
:eprof.analyze()
:eprof.stop()bench/
├── string_benchmark.exs # String operations
├── list_benchmark.exs # List operations
├── json_benchmark.exs # JSON encoding/decoding
├── suite.exs # Run all benchmarks
└── baseline.json # Baseline for regression detection# bench/suite.exs
Code.require_file("bench/string_benchmark.exs")
Code.require_file("bench/list_benchmark.exs")
Code.require_file("bench/json_benchmark.exs")# .github/workflows/benchmark.yml
name: Benchmark
on:
push:
branches: [main]
jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run benchmarks
run: |
mix deps.get
MIX_ENV=prod mix run bench/suite.exs --output results.json
- name: Store results
uses: actions/upload-artifact@v3
with:
name: benchmark-results
path: results.json# bench/compare_with_baseline.exs
baseline_file = "bench/baseline.json"
results =
Benchee.run(
%{
"current" => fn -> MyApp.FastFunction.run() end
},
time: 5,
formatters: [{Benchee.Formatters.Console, comparison: true}]
)
if File.exists?(baseline_file) do
baseline = File.read!(baseline_file) |> Jason.decode!()
current_ips = results.scenarios |> hd() |> Map.get(:ips)
baseline_ips = baseline["ips"]
regression = (baseline_ips - current_ips) / baseline_ips * 100
if regression > 10 do
Mix.raise("Performance regression detected: #{regression}% slower")
end
end
File.write!(baseline_file, Jason.encode!(%{ips: results.scenarios |> hd() |> Map.get(:ips)}))Benchee.run(
%{
"String manipulation" => fn ->
list = for i <- 1..1000, do: "item_#{i}"
Enum.join(list, ",")
end,
"Binary manipulation" => fn ->
list = for i <- 1..1000, do: "item_#{i}"
IO.iodata_to_binary(Enum.intersperse(list, ","))
end
},
memory_time: 5,
reduction_time: 5
)| ❌ Don't | ✅ Do |
|---|---|
Benchmark in MIX_ENV=dev | Run with MIX_ENV=prod mix run bench/... for realistic numbers |
| Measure with no warmup | Set warmup: 2 and time: 10 before measuring |
| Compare approaches that return different results | Verify every implementation produces identical output first |
| Optimize before profiling | Run :fprof/:eprof to confirm the real hotspot |
| Benchmark a single input size | Use small/medium/large inputs to catch scaling behavior |
| Mix I/O and compute in one run | Separate network/disk benchmarks from CPU benchmarks |
| Fail CI on one noisy run | Compare against the last 3 baselines before raising a regression |
| Predecessor | This Skill | Successor |
|---|---|---|
| telemetry-essentials | benchee-profiling | deployment-gotchas |
| code-quality | benchee-profiling | None (standalone) |
Companion skills: telemetry-essentials, deployment-gotchas, code-quality.
.tessl-plugin
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
scenario-11
scenario-12
scenario-13
scenario-14
scenario-15
scenario-16
scenario-17
scenario-18
scenario-19
scenario-20
scenario-21
scenario-22
scenario-23
scenario-24
scenario-25
scenario-26
scenario-27
scenario-28
scenario-29
scenario-30
scenario-31
scenario-32
scenario-33
scenario-34
scenario-35
scenario-36
scenario-37
scenario-38
scenario-39
scenario-40
scenario-41
scenario-42
scenario-43
scenario-44
scenario-45
scenario-46
scenario-47
scenario-48
scenario-49
scenario-50
scenario-51
scenario-52
scenario-53
scenario-54
scenario-55
scenario-56
skills
frameworks
ash-framework
infrastructure
orchestration
elixir-skill-router
personas
phoenix
quality
security
security-essentials
tooling
mix-tasks-generators