Skip to content

Instantly share code, notes, and snippets.

View mcsee's full-sized avatar
🏠
Working from home

mcsee mcsee

🏠
Working from home
View GitHub Profile
@mcsee
mcsee / skill.md
Last active January 26, 2026 19:40
This gist belongs to the Clean Code Cookbook https://cleancodecookbook.com by Maximiliano Contieri https://maximilianocontieri.com

Use the PHP-Clean-Code skill.

Create a tax calculator function from the business specification taxes.md

Follow the 'Early Return' rule defined in that skill.

@mcsee
mcsee / agent prompt.md
Created January 26, 2026 19:38
This gist belongs to the Clean Code Cookbook https://cleancodecookbook.com by Maximiliano Contieri https://maximilianocontieri.com

Here are 50 pages of our company coding standards and business rules.

Now, please write a simple function to calculate taxes.

@mcsee
mcsee / good prompt.md
Last active January 17, 2026 01:32
This gist belongs to Clean Code Cookbook http://cleancodecookbook.com By Maximiliano Contieri http://maximilianocontieri.com

Read @Dashboard.tsx and @api.ts. Do not write code yet.

Analyze the stack dump.

When you find the problem, explain it to me.

Then, write a Markdown plan to fix it, restricted to the REST API..

[Activate Code Mode]

@mcsee
mcsee / vague instruction.md
Last active January 17, 2026 01:31
This gist belongs to Clean Code Cookbook http://cleancodecookbook.com By Maximiliano Contieri http://maximilianocontieri.com

Fix the probabilistic predictor in the Kessler Syndrome Monitor component using this stack dump.

@mcsee
mcsee / english.md
Created January 9, 2026 16:41
This gist belongs to Clean Code Cookbook http://cleancodecookbook.com By Maximiliano Contieri http://maximilianocontieri.com

Refactor this code and make it cleaner

@mcsee
mcsee / spanish.md
Created January 9, 2026 16:40
This gist belongs to Clean Code Cookbook http://cleancodecookbook.com By Maximiliano Contieri http://maximilianocontieri.com

Mejorá este código y hacelo más limpio

@mcsee
mcsee / prompt reference.sh
Last active January 11, 2026 23:53
This gist belongs to Clean Code Cookbook http://cleancodecookbook.com By Maximiliano Contieri http://maximilianocontieri.com
git status # Check for uncommitted changes
git add . # Stage all changes
git commit -m "msg" # Commit with message
git diff # See AI's changes
git reset --hard HEAD # Revert AI changes
@mcsee
mcsee / fixing_real_hotspot.py
Last active January 17, 2026 13:19
This gist belongs to Clean Code Cookbook http://cleancodecookbook.com By Maximiliano Contieri http://maximilianocontieri.com
# You analyze git history first:
# git log --format=format: --name-only |
# grep -E '\.py$' | sort | uniq -c | sort -rn
# Results show PaymentProcessor changed 47 times this month
# And it doesn't have good enough coverage
# LegacyAuthenticator: 0 changes in 3 years
# Focus on the actual hotspot:
class PaymentProcessor:
@mcsee
mcsee / refactoring_stable_legacy.py
Created December 24, 2025 13:06
This gist belongs to Clean Code Cookbook http://cleancodecookbook.com By Maximiliano Contieri http://maximilianocontieri.com
# This authentication module hasn't changed in 3 years
# It's deprecated and will be removed next quarter
# But you spend a week "improving" it
class LegacyAuthenticator:
def authenticate(self, user, pwd):
# Original messy code from 2019
if user != None:
if pwd != None:
if len(pwd) > 5:
@mcsee
mcsee / password_reset_normalized.py
Last active December 17, 2025 00:49
This gist belongs to Clean Code Cookbook http://cleancodecookbook.com By Maximiliano Contieri http://maximilianocontieri.com
import unicodedata
def normalize_email(email):
# Convert to NFKC normalized form
normalized = unicodedata.normalize('NFKC', email)
# Ensure only ASCII characters
try:
normalized.encode('ascii')
except UnicodeEncodeError: