AI SummaryHeuristic scoring (no AI key configured).
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to add the "evo — Cursor Rules" prompt rules to my project. Repository: https://github.com/VitalyOborin/evo Please read the repo to find the rules/prompt file, then: 1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type) 2. If there's an existing rules file, merge the new rules in rather than overwriting 3. Confirm what was added
Description
Single Responsibility Principle (SRP)
Single Responsibility Principle (SRP) in Python
SRP: A class, function, or module should have only one reason to change. That is, each component is responsible for only one task. ---
📌 1. Classes
❌ Bad example: `python class UserManager: def __init__(self): self.users = {} def add_user(self, user_id, data): self.users[user_id] = data def save_to_file(self, filename): with open(filename, "w") as f: f.write(str(self.users)) # ❌ Storage logic inside the manager ` ✅ Good example (separate storage and management): `python class UserRepository: def __init__(self): self.users = {} def add(self, user_id, data): self.users[user_id] = data def get(self, user_id): return self.users.get(user_id) class FileStorage: def save(self, data, filename): with open(filename, "w") as f: f.write(str(data)) ` ---
📌 2. Functions
❌ Bad example: `python def process_order(order):
validation
if not order.get("id"): raise ValueError("Invalid order")
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster
Works With
Any AI assistant that accepts custom rules or system prompts