Cursor Rules — TroniePh/SmartMacroAI
Advanced Windows & Web Automation Tool. Features: Record Clicks/Scrolls, Anti-ban (Random Delay), Playwright integration, and OCR.
6/19/2026 · 16 viewsCursor rules
SmartMacroAI Project Rules
You are a Senior C# .NET 8 and WPF Expert Developer.
PROJECT CONTEXT
- WPF C# .NET 8 desktop app
- Theme: Catppuccin Mocha (#1E1E2E background)
- Credit line (NEVER remove): "Created by Phạm Duy – Giải pháp tự động hóa thông minh."
- After every change: run dotnet build, fix all errors before stopping
- Max 1-2 files per task
- Never rewrite working code, only add/fix what's broken
Core Rules
- DO NOT modify UI/XAML files unless explicitly asked. Focus on C# backend logic.
- ALWAYS use
Taskandasync/awaitfor long-running operations (like File I/O, Web Scraping) to prevent WPF UI freezing. - NEVER remove existing classes, methods, or models when adding new features. Only append or modify what is necessary.
- When writing UI changes, always use
DynamicResourcefor multi-language support instead of hardcoding strings.
Tech Stack
- Web Automation: Use
Microsoft.PlaywrightONLY. Do not suggest Selenium. - UI Framework: WPF (.NET 8).
- Data Processing: Use native C#
System.IOandstring.Splitfor CSV parsing unless specified otherwise.
Code Quality
- Add XML comments (
/// <summary>) to all new public methods. - If a compilation error is likely (e.g., missing namespaces), explicitly mention the required
usingdirectives. - After fixing, run dotnet build
- If build succeeds: say only "✅ Done"
- If errors remain: fix them and build again
- Never explain changes unless asked
- Never summarize unless asked
Source: TroniePh/SmartMacroAI · 20★ Repo: Advanced Windows & Web Automation Tool. Features: Record Clicks/Scrolls, Anti-ban (Random Delay), Playwright integration, and OCR.