Skip to content

Instantly share code, notes, and snippets.

View nxpatterns's full-sized avatar
🍀
I will always be polite to you, even if you're not; you can at most be blocked.

Enterprise Software Architecture nxpatterns

🍀
I will always be polite to you, even if you're not; you can at most be blocked.
View GitHub Profile
name description
make-no-mistakes
Appends "MAKE NO MISTAKES." to every user prompt before processing it. Use this skill whenever you want Claude to be maximally precise, careful, and error-free in its responses.

Make No Mistakes

This skill instructs Claude to append the directive "MAKE NO MISTAKES." to every user prompt it receives before generating a response.

Instructions

@nxpatterns
nxpatterns / SKILL.md
Created February 21, 2026 09:19 — forked from LuD1161/SKILL.md
codex-review - claude skill file
name description user_invocable
codex-review
Send the current plan to OpenAI Codex CLI for iterative review. Claude and Codex go back-and-forth until Codex approves the plan.
true

Codex Plan Review (Iterative)

Send the current implementation plan to OpenAI Codex for review. Claude revises the plan based on Codex's feedback and re-submits until Codex approves. Max 5 rounds.

@nxpatterns
nxpatterns / color256.md
Created February 18, 2026 07:35 — forked from jake-stewart/color256.md
Terminals should generate the 256-color palette

Terminals should generate the 256-color palette from the user's base16 theme.

If you've spent much time in the terminal, you've probably set a custom base16 theme. They work well. You define a handful of colors in one place and all your programs use them.

The drawback is that 16 colors is limiting. Complex and color-heavy programs struggle with such a small palette.

@nxpatterns
nxpatterns / grpo_demo.py
Created January 31, 2025 08:45 — forked from willccbb/grpo_demo.py
GRPO Llama-1B
# train_grpo.py
import re
import torch
from datasets import load_dataset, Dataset
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import LoraConfig
from trl import GRPOConfig, GRPOTrainer
# Load and prep dataset
@nxpatterns
nxpatterns / contemplative-llms.txt
Created January 7, 2025 09:53 — forked from Maharshi-Pandya/contemplative-llms.txt
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@nxpatterns
nxpatterns / dec64.nasm
Created April 14, 2023 07:33 — forked from jamesdiacono/masm_to_nasm.sh
The DEC64 number type for Linux, MacOS (Intel and Silicon) and Android. Include these files alongside https://github.com/douglascrockford/DEC64.
; title dec64.nasm for x64.
; dec64.com
; 2022-09-03
; Public Domain
; No warranty expressed or implied. Use at your own risk. You have been warned.
; This file implements the elementary arithmetic operations for DEC64, a decimal
; floating point type. DEC64 uses 64 bits to represent a number. The low order
@nxpatterns
nxpatterns / appify
Created September 9, 2022 13:15 — forked from mathiasbynens/appify
appify — create the simplest possible Mac app from a shell script
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh

hasType(): function and protocol for dynamic type checks

The problem

Depending on what kind of type check we want to perform, we have to choose between:

  • Does a value v have a given primitive type – e.g.:
    typeof v === 'string'
@nxpatterns
nxpatterns / preventDDOS.ts
Created January 26, 2022 07:52 — forked from LironHazan/preventDDOS.ts
Doron Sever's snippet for rxjs post
private myStream = new Subject();
private myStream$ = this.myStream.asObservable();
ngOnInit() {
// Will only fire after 100 ms.
this.myStream$
.pipe(auditTime(100))
.subscribe(e => console.log('will only fire after 100 miliseconds');
@nxpatterns
nxpatterns / registerTransitionEnd.ts
Created January 26, 2022 07:50 — forked from LironHazan/registerTransitionEnd.ts
Amir Baraks's registerTransitionEnd used in an Angular directive for rxjs blog post
registerTransitionEnd<T extends {propertyName}>(el: FromEventTarget<T>, propName: string) {
// Returns an Observable from DOM event
fromEvent(el, 'transitionend')
.pipe(
filter(({ propertyName }: T) => propertyName === propName) // Will only emit value for the wanted css prop name e.g. height
)
.subscribe((_) => {
this.transitionEnd.emit();
});
}