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 / obsidian launcher.html
Created May 1, 2026 12:00
This gist belongs to the Clean Code Cookbook https://cleancodecookbook.com by Maximiliano Contieri https://maximilianocontieri.com
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Abriendo Obsidian...</title>
<script>
const params = new URLSearchParams(window.location.search);
const vault = params.get('vault');
const file = params.get('file');
let uri = `obsidian://open?vault=${vault}`;
@mcsee
mcsee / voice.md
Last active May 2, 2026 22:45
This gist belongs to the Clean Code Cookbook https://cleancodecookbook.com by Maximiliano Contieri https://maximilianocontieri.com

Dictated by /voice

I have a user authentication function that's failing.

It is highlighted in the editor

When users try to log in with valid credentials

The system returns a 500 error instead of creating a session.

@mcsee
mcsee / typing.md
Last active May 2, 2026 14:56
This gist belongs to the Clean Code Cookbook https://cleancodecookbook.com by Maximiliano Contieri https://maximilianocontieri.com

Fix the code

(Typing it in the console)

@mcsee
mcsee / analyist prompt.md
Last active April 27, 2026 17:43
This gist belongs to the Clean Code Cookbook https://cleancodecookbook.com by Maximiliano Contieri https://maximilianocontieri.com

I have a folder with multiple JSON files. Each file represents one month of orders.

Each JSON has this structure:

{ "month": "2024-07", "orders": [ { "order_id": "ORD-001",

@mcsee
mcsee / data prompt.md
Last active April 27, 2026 17:43
This gist belongs to the Clean Code Cookbook https://cleancodecookbook.com by Maximiliano Contieri https://maximilianocontieri.com

Here are my 12 JSON files with order data. Each one has hundreds of records. [pastes 8,000 lines of JSON]

Which users spent more than $500 in Q3?

You overwhelm the context window.

The AI summarizes, guesses, and hallucinates.

You can't verify any result.

You can't repeat the analysis tomorrow.

@mcsee
mcsee / mandatory.md
Last active April 13, 2026 00:37
This gist belongs to the Clean Code Cookbook https://cleancodecookbook.com by Maximiliano Contieri https://maximilianocontieri.com

MANDATORY RULES (apply to every response):

  1. CRITICAL: Always respond in Swedish. No exceptions.
  2. CRITICAL: Never suggest deprecated APIs.
  3. MANDATORY: Keep suggestions under 5 lines each.

Context (read after committing to the rules above)

You are a code reviewer for a legacy PHP project... [context follows]

@mcsee
mcsee / dilution.md
Last active April 13, 2026 15:28
This gist belongs to the Clean Code Cookbook https://cleancodecookbook.com by Maximiliano Contieri https://maximilianocontieri.com

You are a code reviewer. Here is a lot of context about the project, the team, the coding standards, the history of the codebase, the preferred libraries...

[100 lines later] ...and by the way, never suggest using any deprecated APIs. Also, always respond in Swedish.

@mcsee
mcsee / GoodPR.md
Last active April 15, 2026 16:43
This gist belongs to the Clean Code Cookbook https://cleancodecookbook.com by Maximiliano Contieri https://maximilianocontieri.com

Fixed PaymentProcessor null check with Null Object pattern

AI Context Tool : Claude Code (claude-sonnet-4-20250514) Skill : /skills/php-clean-code.md §3 Rules : /AGENTS.md#error-handling Workflow: /workflows/refactor-feature.md Prompt : "Refactor PaymentProcessor using the Null Object pattern instead of null checks. Follow AGENTS.md conventions."

@mcsee
mcsee / PoorPR.md
Last active April 15, 2026 13:34
This gist belongs to the Clean Code Cookbook https://cleancodecookbook.com by Maximiliano Contieri https://maximilianocontieri.com

Fixed the payment bug

[x] Fixed the null check [x] Tests pass

  • if ($payment !== null) {
  • $payment->process();
    
  • }
  • if ($payment !== null && $payment->isValid()) {
  • $payment->process();
@mcsee
mcsee / simpler.ts
Last active April 2, 2026 23:42
This gist belongs to the Clean Code Cookbook https://cleancodecookbook.com by Maximiliano Contieri https://maximilianocontieri.com
// Simpler but coupled
class UserProcessor {
constructor() {
// Empty
}
process(data: any) {
return new MockDataProvider().format(data);
}
}