Hello guys,
I have created an md file. you can always attach it to your prompts, and the models wont make any stupid snytax or terminal errors anymore. By using it, the agents effectiveness and efficiency have increased DRAMATICALLY and will also save a lot of tokens!!
Just create a md file of it: (changes might apply based on what stack you use. I use render for my deployment).
I have installed the windows cli mcp because cursors terminal often gets stuck… :
AGENT QUICK RULES – UNIVERSAL RULES
Only universal terminal/syntax rules for any prompt – specific workflows have separate files
EMERGENCY FIXES
bash
copy
edit
Terminal is frozen
taskkill /F /IM python.exe
Git pager freeze (black “END” terminal)
git --no-pager log --oneline -3
ModuleNotFoundError in scripts/
import sys, os
sys.path.append(os.path.join(os.path.dirname(file), ‘..’, ‘..’))
TERMINAL SYNTAX
bash
Kopieren
Bearbeiten
NEVER – PowerShell && chaining doesn’t work
cd “path” && python script.py
ALWAYS – Use Microsoft CLI MCP directly
python script.py # with workingDir parameter
NEVER – Wildcards freeze the terminal
ls *.xlsx | dir *.py | Get-ChildItem *
ALWAYS – Use specific filenames
ls specific_file.xlsx
TOOL CHOICE
Microsoft CLI MCP: For scripts <30s, status checks, debugging
Cursor Terminal: For scripts >30s, use run_safe.py for risky commands
workingDir: Microsoft CLI MCP starts in C:/Users/L490 → use workingDir param
PYTHON ENCODING
python
Kopieren
Bearbeiten
NEVER – UnicodeDecodeError on German Windows systems
subprocess.run(cmd, shell=True, capture_output=True, text=True)
ALWAYS – Unicode-safe
subprocess.run(cmd, shell=True, capture_output=True, text=True,
encoding=‘utf-8’, errors=‘ignore’)
UNICODE PREVENTION (PROACTIVE)
python
Kopieren
Bearbeiten
NEVER – Emojis crash PowerShell
print(“
Import successful!
”)
print(f"
{count} new drivers imported")
ALWAYS – ASCII-only output for agent scripts
print(“[SUCCESS] Import successful!”)
print(f"[STATS] {count} new drivers imported")
NEVER – Unicode in script output
status_icons = {“success”: “
”, “error”: “
”, “info”: “
”}
ALWAYS – ASCII status markers
status_markers = {“success”: “[OK]”, “error”: “[ERROR]”, “info”: “[INFO]”}
AGENT SCRIPT STANDARDS:
Agent scripts: ASCII-only output
Human-only scripts: Emojis allowed (use run_safe.py)
New scripts: Always test Unicode output via Microsoft CLI MCP before commit
COMPLEX PROBLEMS
For complex issues, always run the sequential thinking MCP before making changes.
DOCUMENT RULE
ONLY UNIVERSAL TERMINAL/SYNTAX RULES – no specific feature notes!
CHANGES: Add new content only after user approval.
SCRIPT MANAGEMENT
Always load the script overview before any coding task (prevents duplicates)
Move one-time scripts to archive/legacy/ after success
WEB SEARCH CHOICE
Tavily: Quick tech facts, API syntax, specific metrics (<3min research)
Cursor WebSearch: Problem-solving, current 2025 practices, full guides
TOOL DEVELOPMENT
MCP Tool: For agents used frequently (>5x/week), performance-critical
Python Script: For one-time or rare use, human-triggered
RENDER DEPLOYMENT (CRITICAL)
Manual scripts (e.g., check_render_db.py)
Render CLI MCP (direct service access, logs)
AFTER GIT PUSH: End the chat! User must verify deployment manually
DEPLOYMENT TIME: 2–3 minutes – NEVER test immediately
PATTERN: Push → End chat → User tests → New chat if issues arise
UNIVERSAL DON’TS
PowerShell && command chaining
Deleting files without user permission
Scripts from subfolders without sys.path.append
subprocess without encoding=‘utf-8’, errors=‘ignore’
UNIVERSAL DO’S
Use Microsoft CLI MCP for short commands
Use sys.path.append() in scripts/ subfolders
Use Unicode-safe subprocess on German Windows
Use sequential thinking for complex problems
Always follow these universal rules for any prompt