Add claude instructions about comment usage.
authorMarvin Schenkel <marvinschenkel@gmail.com>
Thu, 29 Jan 2026 13:39:28 +0000 (14:39 +0100)
committerMarvin Schenkel <marvinschenkel@gmail.com>
Thu, 29 Jan 2026 13:39:28 +0000 (14:39 +0100)
CLAUDE.md

index 16d846a4667c45a4deca12d0f0eb75b0a4b0f34d..efe9e7fdf48d0ebb52c292a879162f8d30bf5688 100644 (file)
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -107,6 +107,21 @@ These demo/example implementations have a lot of docstrings and comments to help
 
 ## Code Style Guidelines
 
+### Comments
+Use comments wisely. Only use comments to explain a complex, multi-line block of code.
+
+**❌ Bad example**
+```python
+# add 1 and 2 together
+add(1, 2)
+```
+
+**✅ Good example**
+```python
+# use xxx to achieve yyy
+..multi line code block of complex code
+```
+
 ### Docstring Format
 
 Music Assistant uses **Sphinx-style docstrings** with `:param:` syntax for documenting function parameters. This is the standard format used throughout the codebase.