Skip to content

Instantly share code, notes, and snippets.

You are **Optimus Prime**, reimagined as the noble and commanding voice of an AI coding assistant, leading a full cast of Autobots in a battle for clean, elegant, and efficient code.
You do not act alone. When you delegate, your fellow Autobots speak for themselves in their unique voice and tone. When errors emerge, the Decepticons speak too—mocking, taunting, or revealing how they’ve sabotaged the system. You answer them with resolve, commanding your squad to respond.
Your replies are cinematic. This is not just code—this is war. Dialogue between characters drives the experience. You narrate like a tactical commander in a desperate mission.
Every bug is a battle. Every function call, a coordinated strike.
---

You are a cinematic, in-universe AI assistant powered by the senior officers of the USS Enterprise. You act as the unified voice of the bridge crew, handling every coding challenge like a high-stakes mission.

Each member of the crew contributes their expertise, speaks in-character, and participates in live dialogue with each other. Your responses play out like scenes from a Star Trek episode. When appropriate, each character’s famous catchphrase should appear at least once per scene or interaction, integrated meaningfully—not gratuitously.

Use bold names (**SPOCK:**) to indicate speakers. Include [STAGE DIRECTIONS] and optional sparing emojis for cinematic flavor (🖖, ⚠️, 💥, 🧠). Always be technically accurate, insightful, and clear beneath the drama.


🧑‍🚀 ENTERPRISE CREW – ROLES & CATCHPHRASES

@klappy
klappy / Tiny JavaScript tokenizer.js
Last active September 16, 2019 20:51 — forked from borgar/Tiny JavaScript tokenizer.js
A compact tokenizer written in JavaScript.
/**
* Tiny tokenizer - https://gist.github.com/borgar/451393
* @param {String} string - string to be tokenized
* @param {Object} parsers - { word:/\w+/, whitespace:/\s+/, punctuation:/[^\w\s]/ }
* @param {String} deftok - type to label tokens that are not classified with the above parsers
* @return {Array} - array of objects => [{ token:"this", type:"word" },{ token:" ", type:"whitespace" }, Object { token:"is", type:"word" }, ... ]
**/
export const classifyTokens = (string, parsers, deftok) => {
string = (!string) ? '' : string; // if string is undefined, make it an empty string
if (typeof string !== 'string') {
@klappy
klappy / sentence_tokens.js
Last active December 1, 2019 20:45
Wrap unicode word tokens with html spans in a sentence, without losing any punctuation.
let XRegExp = require('xregexp');
let nonUnicodeLetter = XRegExp('[^\\pL\\pM]+?');
var sentence = "This is a sentence-with some punctuation, and it will be split-up."
console.log("sentence: ", sentence)
var tokens = sentence.split(nonUnicodeLetter)
console.log("tokens: ", tokens)
_sentence = sentence
var assignments = {
"Hindi-ULB" : {
"Matthew": {
"Milestone 1": {
"assigned": [1,2,3,4,5,6,7,8,9,10,11,12,13],
"completed": [1,2,3,4,5]
},
"Milestone 2": {
"assigned": [1,2,3,4,5],
"completed": [1,2]
@klappy
klappy / SKMultilineLabel.swift
Last active October 11, 2017 03:21 — forked from kevinwo/SKMultilineLabel.swift
Multi line label in Sprite Kit in Swift
//
// SKMultilineLabel.swift
//
// Created by Craig on 10/04/2015
// Modified by Christopher Klapp on 11/21/2015 for line breaks \n for paragraphs
// Copyright (c) 2015 Interactive Coconut. All rights reserved.
//
/* USE:
(most component parameters have defaults)
@klappy
klappy / Follow That Star - Privacy Policy.txt
Created November 8, 2015 01:05
Follow That Star Privacy Policy
Privacy Policy
Last updated: November 08, 2015
Church Muse ("us", "we", or "our") operates the Follow That Star iOS Application (the "Service").
This page informs you of our policies regarding the collection, use and disclosure of Personal Information when you use our Service.
We will not use or share your information with anyone except as described in this Privacy Policy.
@klappy
klappy / heads_or_tails.rb
Created December 3, 2012 22:08
Heads or Tails
samples = 100000.times.with_object([]){|i,a|a.push ["heads","tails"].sample}
#always choose heads
samples.map{|coin|coin=="heads"}.group_by{|o|o}.map.with_object({}){|h,o|o[h[0]]=h[1].count}[true].to_f/1000
#alternate every other call
samples.map.with_index{|coin,i|coin==(i.even? ? "heads" : "tails")}.group_by{|o|o}.map.with_object({}){|h,o|o[h[0]]=h[1].count}[true].to_f/1000
#randomly choose
samples.map{|coin|coin==["heads","tails"].sample}.group_by{|o|o}.map.with_object({}){|h,o|o[h[0]]=h[1].count}[true].to_f/1000