Install any skill in seconds. Free to start, no credit card required.
Get Started Free →lingxling/elixir
Language-specific super-code guidelines for elixir.
Passed 22 of 22 test cases with the skill, and 21 of 22 without it.
1 fixed21 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
A test case the skill fixed. Same model, same prompt, with and without the skill.
Here is a snippet from our Elixir data processing pipeline where we take a collection of thousands of transaction records, filter out inactive ones, extract their total amounts, and check if the result list has any elements left. The current code is running slower than expected and using a lot of memory. Can you rewrite this code to make it as memory-efficient and idiomatic as possible? Please output the rewritten Elixir code and summarize what changes were made.
| Checked | Without skill | With skill |
|---|---|---|
| Uses a for comprehension with pattern matching to combine filtering inactive items and extracting amounts in a single pass | Missed | Passed |
| Uses Enum.empty? or pattern matching on empty list to check if elements remain rather than checking list length or comparing list to empty list | Missed | Passed |
The instructions your model reads when the skill loads.
# ❌ Extracting with Map.get then checking
value = Map.get(map, :key)
if value != nil do
process(value)
end
# ✅ — pattern match directly
case map do
%{key: value} -> process(value)
_ -> :noop
end
# or with if:
if value = map[:key], do: process(value)
# ❌ Nested case for multiple conditions
case fetch_user(id) do
{:ok, user} ->
case validate(user) do
{:ok, valid_user} -> save(valid_user)
test cases passed, vs 21 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.