Skip to content

Instantly share code, notes, and snippets.

View thecaffeinatedengineer's full-sized avatar

Ian thecaffeinatedengineer

View GitHub Profile
@thecaffeinatedengineer
thecaffeinatedengineer / 00 - Cursor AI Prompting Rules.md
Created May 13, 2025 08:43 — forked from aashari/00 - Cursor AI Prompting Rules.md
Cursor AI Prompting Rules - This gist provides structured prompting rules for optimizing Cursor AI interactions. It includes three key files to streamline AI behavior for different tasks.

Cursor AI Prompting Framework Usage Guide

This guide explains how to use the structured prompting files (core.md, refresh.md, request.md) to optimize your interactions with Cursor AI, leading to more reliable, safe, and effective coding assistance.

Core Components

  1. core.md (Foundational Rules)
    • Purpose: Establishes the fundamental operating principles, safety protocols, tool usage guidelines, and validation requirements for Cursor AI. It ensures consistent and cautious behavior across all interactions.
    • Usage: This file's content should be persistently active during your Cursor sessions.
@thecaffeinatedengineer
thecaffeinatedengineer / server.ts
Created December 31, 2024 13:34 — forked from ashbuilds/server.ts
Implementing GraphQL Subscriptions with Websockets in a Bun Server using graphql-yoga
import Bun from 'bun'
import { createYoga, YogaInitialContext, YogaServerInstance } from 'graphql-yoga'
import { makeHandler } from "graphql-ws/lib/use/bun";
import { ExecutionArgs } from "@envelop/types";
import { schema } from './graphql/schema';
interface IUserContext {
token?: string;
}