Rule Python

No Mutable Defaults

Never use mutable default arguments in function signatures

pythonbugssafety
CLAUDE.md

Never use mutable default arguments: def f(items=[]) is a classic Python bug. The default list is shared across all calls. Use None and create a new list inside the function.

Copy this block into your CLAUDE.md or agent config file to enforce it in your workflow.

get crystl