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
min_length: 1 or integer(1..100) when shrunk cases expose invalid generator inputs# mix.exs
defp deps do
[
{:stream_data, "~> 1.0", only: :test}
]
enddefmodule MyApp.StringUtilsTest do
use ExUnit.Case, async: true
use ExUnitProperties
property "reversing a string twice returns the original" do
check all string <- string(:ascii) do
assert string |> String.reverse() |> String.reverse() == string
end
end
property "length of reversed string equals original length" do
check all string <- string(:ascii) do
assert String.length(String.reverse(string)) == String.length(string)
end
end
end# Combine multiple generators with one_of
one_of([constant(:a), constant(:b), constant(:c)])
one_of([integer(), string(:ascii), boolean()])
# Compose generators with gen all
gen all x <- integer(0..100),
y <- integer(0..100),
x != y do
{x, y}
end
# Non-empty collections
list_of(integer(), min_length: 1)
map_of(string(:alphanumeric), integer())# Generate a valid email
def email_generator do
gen all name <- string(:alphanumeric, min_length: 3),
domain <- string(:alphanumeric, min_length: 3) do
"#{name}@#{domain}.com"
end
end
# Generate a user struct
def user_generator do
gen all email <- email_generator(),
age <- integer(18..120) do
%User{email: email, age: age}
end
end
# Use in tests
property "users have valid emails" do
check all user <- user_generator() do
assert user.email =~ ~r/@.*\.com$/
assert user.age >= 18 and user.age <= 120
end
endKey invariants to test for collections: ordering, element preservation, and idempotence.
defmodule MyApp.SortingTest do
use ExUnit.Case, async: true
use ExUnitProperties
# Invariant: sorted list is ordered
property "sorted list is ordered" do
check all list <- list_of(integer()) do
sorted = Enum.sort(list)
sorted
|> Enum.chunk_every(2, 1, :discard)
|> Enum.each(fn [a, b] -> assert a <= b end)
end
end
# Invariant: sorting preserves all elements
property "sorted list contains same elements" do
check all list <- list_of(integer()) do
assert Enum.sort(list) |> Enum.frequencies() == Enum.frequencies(list)
end
end
endStreamData automatically shrinks failing inputs to the smallest example that still fails. The property below intentionally fails to illustrate shrinking output:
property "no list contains its own length as element" do
check all list <- list_of(integer()) do
refute list |> Enum.member?(length(list))
end
end
# StreamData will find and report:
# Failed with generated values: [0]
# (shrunk from something like [1, 5, 0, 3, 2])check all with appropriate generatorsmix test test/my_test.exs** (ExUnit.AssertionError)
Failed with generated values (after 3 successful runs):
* Clause: list <- list_of(integer())
Generated: [0]
(shrunk from [42, -7, 0, 15])min_length: 1, integer(1..100)); if it reveals a real bug, fix the implementation| ❌ Don't | ✅ Do |
|---|---|
Assert exact outputs (== [1, 2, 3]) | Assert invariants that always hold (ordering, length, membership) |
| Generate unconstrained inputs that break the code under test | Constrain generators (min_length: 1, integer(1..100)) to valid domains |
| Ignore the shrunk minimal case in failure output | Read the shrunk values first — they point straight at the bug |
Use check all without use ExUnitProperties | Add use ExUnitProperties alongside use ExUnit.Case |
| Write one giant property covering many behaviours | Split into focused properties, one invariant each |
| Leave generators unbounded, causing slow/huge cases | Bound ranges and collection sizes to keep runs fast |
| Predecessor | This Skill | Successor |
|---|---|---|
| testing-essentials | property-based-testing | None (standalone) |
.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