elixir-performance-review
Skill91 starsChanged 4 days agoApache-2.0View on GitHub
Reviews Elixir code for performance issues including GenServer bottlenecks, memory usage, ETS concurrency, and task supervision. Use when reviewing high-throughput code or investigating BEAM performance issues.
In this repository85 other files it gives its agents.
- AGENTS.mdAGENTS.md
- llms.txtllms.txt
- agent-architecture-analysisSkill
- app-intents-code-reviewSkill
- artifact-analysisSkill
- axum-code-reviewSkill
- brainstorm-beagleSkill
- bubbletea-code-reviewSkill
- cloudkit-code-reviewSkill
- elixir-security-reviewSkill
- elixir-writing-docsSkill
- exdoc-configSkill
- exunit-code-reviewSkill
- fastapi-code-reviewSkill
- fetch-pr-feedbackSkill
- ffi-code-reviewSkill
- fix-llm-artifactsSkill
- fowler-refactoringSkill
- gen-test-planSkill
- go-architectSkill
- go-code-reviewSkill
- go-data-persistenceSkill
- go-testing-code-reviewSkill
- healthkit-code-reviewSkill
- humanize-beagleSkill
- improve-docSkill
- ios-animation-code-reviewSkill
- liveview-code-reviewSkill
- llm-artifacts-detectionSkill
- llm-judgeSkill
- macros-code-reviewSkill
- phoenix-code-reviewSkill
- postgres-code-reviewSkill
- prfaq-beagleSkill
- prometheus-go-code-reviewSkill
- pytest-code-reviewSkill
- quick-planSkill
- react-flow-code-reviewSkill
- react-flowSkill
- react-router-code-reviewSkill
- react-router-v7Skill
- receive-feedbackSkill
- refactor-repoSkill
- resolve-beagleSkill
- respond-pr-feedbackSkill
- review-ai-writingSkill
- review-elixirSkill
- review-frontendSkill
- review-goSkill
- review-iosSkill
- review-llm-artifactsSkill
- review-planSkill
- review-pythonSkill
- review-remix-v2Skill
- review-rustSkill
- review-skillSkill
- review-structureSkill
- review-tuiSkill
- review-verification-protocolSkill
- run-test-planSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 42
Single GenServer for low-throughput: - Not all state needs horizontal scaling
- Distinctive: line 57
Do these in order for the performance review.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Elixir Performance Review
Quick Reference
| Issue Type | Reference |
Mailbox overflow, PartitionSupervisor, blocking calls | references/genserver-bottlenecks.md |
ETS concurrency, :persistent_term, :atomics | references/ets-patterns.md |
Sub-binary retention, Repo.stream, large messages | references/memory.md |
Task.Supervisor, NimblePool, DynamicSupervisor | references/concurrency.md |
Review Checklist
GenServer
- Not a single-process bottleneck for all requests (use
PartitionSupervisoror ETS where appropriate) - No blocking operations in
handle_call/handle_cast - Proper timeout configuration (
catch :exit, {:timeout, _}on caller) - Consider ETS /
:persistent_term/:atomicsfor read-heavy state or high-contention counters
Memory
- Sub-binaries extracted from >64-byte binaries copied with
:binary.copy/1before long-lived retention - Streams (
File.stream!/1,Repo.stream/2insideRepo.transaction/2) used for large data transformations - No unbounded data accumulation in GenServer state or ETS TTL tables
Concurrency
Task.Supervisorfor dynamic tasks (not rawTask.asyncor unlinkedTask.start)- Process spawning bounded (
DynamicSupervisorwithmax_childrenininit/1,NimblePool,async_stream_nolink) - Proper backpressure for message producers
Database
- Preloading to avoid N+1 queries
- Pagination for large result sets
- Indexes for frequent queries
Valid Patterns (Do NOT Flag)
- Single GenServer for low-throughput - Not all state needs horizontal scaling
- Synchronous calls for critical paths - Consistency may require it
- In-memory state without ETS - ETS has overhead for small state
EnumoverStreamfor small collections - Stream overhead not worth it
Context-Sensitive Rules
| Issue | Flag ONLY IF |
| GenServer bottleneck | Handles > 1000 req/sec OR blocking I/O in callbacks |
| Use streams | Processing > 10k items OR reading large files |
| Use ETS | Read:write ratio > 10:1 AND concurrent access |
Gates — before reporting
Do these in order for the performance review. Do not publish findings until each step passes.
- Protocol loaded — Read the
review-verification-protocolskill (review-verification-protocol) and apply its checks for each finding (hot paths, concurrency, resource use). Pass: For every substantive finding, you can name which protocol subsection you satisfied or state N/A with reason (e.g. pure reference to this skill’s Valid Patterns). - Anchored evidence — Pass: Each finding includes a concrete locator:
path:line(or line range), orModule.function/arityplus a short quoted snippet from the file. - Performance claims — For anything under Context-Sensitive Rules, or any claim of bottleneck, N+1, unbounded growth, or heavy memory/binary cost, Pass: You state the observed or measured fact that meets “Flag ONLY IF” (e.g. rate, item count, ratio), or attach an artifact (profiler output, SQL/log excerpt,
grep/search scope)—otherwise downgrade to question / suspected with what was not verified.
Before Submitting Findings
Complete Gates — before reporting (section above) first; the review-verification-protocol skill (review-verification-protocol) is mandatory input to those gates.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

