Deleting the same five things
Claude writes working code, then buries it. A comment narrating every line, null checks on values the types already guarantee, and a try/except that swallows the error and returns None. One security firm audited 300-plus repos and found tautological comments in nearly all of the AI-written ones. I was deleting the same five patterns from every diff, so I wrote the deletions down and made them load before the model types anything.
def get_user(user_id):
# Fetch user by ID
try:
result = db.query(User).filter(User.id == user_id).first()
if result is not None:
return result
else:
return None
except Exception as e:
return None
def get_user(user_id):
return db.query(User).filter(User.id == user_id).first()
Nine ways to say less
kanso (簡素, elimination of clutter) is a Claude Code plugin. The core skill is a standing set of anti-dilution rules that loads automatically: comments must explain why rather than echo the code, and an abstraction waits until the third concrete case. Around it sit eight commands for auditing, refactoring, committing and writing PRs, all with the same curatorial bias. The audit reports before it edits, the refactor never mixes cleanup with behaviour change, and a hook lints every touched file the moment it changes. Anything that writes is manual-only.
def process_order(order: Order) -> Invoice:
try:
if order is None:
raise ValueError("Order cannot be None")
if not isinstance(order, Order):
raise TypeError("Expected Order instance")
try:
total = sum(item.price for item in order.items)
except Exception as e:
logger.error(f"Error summing items: {e}")
return None
return Invoice(order_id=order.id, total=total)
except Exception as e:
logger.error(f"Unexpected error: {e}")
return None
def process_order(order: Order) -> Invoice:
total = sum(item.price for item in order.items)
return Invoice(order_id=order.id, total=total)
The deleting habit
Building it changed how I read my own code. I now spot a filler variable from across the room, and I have caught myself writing commit messages that answer why instead of what, which the plugin nags about anyway. The taxonomy will drift as models do. Half of it will need rewriting within a year, and that’s fine. Git remembers.