Menu

Post image 1
Post image 2
1 / 2
0

CLAUDE.md for Elixir: 13 Rules That Make AI Write Idiomatic OTP Code

DEV Community·Olivia Craft·29 days ago
#USW8yv34
#rule#elixir#claudeai#aitools#fullscreen#user
Reading 0:00
15s threshold

CLAUDE.md for Elixir: 13 Rules That Make AI Write Idiomatic OTP Code When AI assistants write Elixir, they often produce code that runs but feels wrong. They write imperative if/else chains where pattern matching belongs. They reach for try/rescue like it's Ruby. They ignore changesets, drop IO.inspect calls into production code, and treat GenServers like classes with state. The result is code that compiles, technically works, and ages badly the moment a real OTP supervisor restarts a process. The fix isn't a smarter model. It's giving the model the same conventions every senior Elixir developer internalized after their first three production incidents. A CLAUDE.md (or .cursorrules , or AGENTS.md — same idea) at the root of your project teaches the AI your house rules before it writes a single line. Below are the 13 rules I keep in mine. Each one closes a specific failure mode I've seen AI repeat across real projects.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More