Skip to content
repeng-gay logo

repeng Gay Skill

repeng-gay

Representation engineering with Gay.jl deterministic coloring for control vectors.

plurigrid/asi0installs67starsOther

SKILL.md

Full skill instructions

repeng Gay Skill

Representation engineering with Gay.jl deterministic coloring for control vectors.

Source

Repository: https://github.com/vgel/repeng
Author: Theia Vogel
Port: 8849 (color #152961)

Trigger Conditions

  • Training control vectors for LLMs
  • Representation engineering, activation steering
  • Behavioral control of language models
  • Visualizing layer activations with colors

Quick Start

from repeng import GayControlVector, visualize_control, make_gay_dataset

# Train with color tracking
vector = GayControlVector.train(
    model, tokenizer, dataset,
    seed=137508  # Deterministic colors
)

# Visualize layer activations
visualize_control(vector)

# Get resurrection port
print(vector.resurrection_port())  # 8849

Server

# Start on resurrected port
python -m repeng.server

# Custom seed = different port
python -m repeng.server --seed 42

# Override port
python -m repeng.server --port 8080

Endpoints

EndpointMethodDescription
/GETService info
/​healthGETHealth check
/​vectorsGETList loaded vectors
/​vectors/<name>GETVector details with colors
/​palette/<n>GETGenerate n colors
/​vectorsPOSTLoad vector from GGUF
/​eventsGETSSE stream of port events
/​events/​logGETLast 100 events
/​tenantsGETList tenants/​parallel worlds

GayControlVector API

vector = GayControlVector.train(model, tokenizer, dataset, seed=137508)

# Layer colors
vector.layer_colors  # {-5: '#223857', -6: '#90EDC7', ...}

# Get color for specific layer
vector.layer_color(-5)  # '#223857'

# Resurrection port
vector.resurrection_port()  # 8849

# GF(3) trit for triadic coordination
vector.trit()  # -1, 0, or 1

# Visualize
print(vector.visualize())

# Convert back to base ControlVector
base = vector.to_control_vector()

Dataset with Colors

from repeng import make_gay_dataset

dataset, colors = make_gay_dataset(
    template="Act as if you're extremely {persona}.",
    positive_personas=["happy", "creative", "confident"],
    negative_personas=["sad", "dull", "insecure"],
    suffixes=["I think", "In my opinion"],
    seed=137508
)

# Each dataset entry has a deterministic color
for entry, color in zip(dataset, colors):
    print(f"{color}: {entry.positive[:50]}...")

Port Resurrection

# Check repeng port
python3 /​Users/​bob/​ies/​port_resurrect.py -s repeng
# Service: repeng
# Port: 8849
# Color: #152961

# All service ports
python3 /​Users/​bob/​ies/​port_resurrect.py

Integration with Gay.jl

using Gay

# Get repeng color (service index 16)
color = Gay.color_at(16, 137508)  # → #152961
port = 8000 + (parse(Int, color[2:end], base=16) % 2000)  # → 8849

Control Vector Arithmetic with Colors

# Vectors preserve color tracking
happy = GayControlVector.train(model, tokenizer, happy_dataset, seed=137508)
creative = GayControlVector.train(model, tokenizer, creative_dataset, seed=137509)

# Arithmetic (converts to base, loses color tracking)
combined = happy.to_control_vector() + creative.to_control_vector()

GF(3) Conservation

ComponentTrit
GayControlVectorseed % 3 - 1
repeng server0 (ERGODIC)
port_resurrect0 (ERGODIC)

CLI (No Torch Required)

# Generate palette
python -m repeng.cli palette 10

# Check service status  
python -m repeng.cli services --check

# Get specific port
python -m repeng.cli port repeng  # → 8849

# Get color at index
python -m repeng.cli color 5

# Export shell vars
eval $(python -m repeng.cli export)

# JSON output
python -m repeng.cli services --json

# Subscribe to events (SSE)
python -m repeng.cli subscribe

# List tenants/​worlds
python -m repeng.cli tenants

# Emit test event
python -m repeng.cli emit port_assigned -m "test"

MCP Bridge

from repeng.mcp_bridge import RepengMCPBridge, check_services

# Sync check
for svc in check_services():
    print(f"{svc['name']}: {svc['port']} {'✓' if svc['connected'] else '✗'}")

# Async bridge
async with RepengMCPBridge(seed=137508) as bridge:
    palette = await bridge.get_palette(10)
    functions = await bridge.analyze_binary_functions("/​path/​to/​binary")

Subscriptions

from repeng.subscriptions import PortSubscriptionHub, EventType

hub = PortSubscriptionHub(seed=137508)

# Subscribe to port assignments
async for event in hub.subscribe([EventType.PORT_ASSIGNED]):
    print(f"{event.color} {event.data['service']} → {event.data['port']}")

# Spawn 27 parallel worlds (GF(3) 3×3×3 matrix)
events = await hub.spawn_3x3x3_matrix()

# Add tenant
await hub.add_tenant(271828, "eve")

# Check XOR fixed points
fixed_points = await hub.check_xor_fixed_points(137508)

Event Types

EventDescription
port_assignedService port assignment
tenant_addedNew tenant registered
tenant_removedTenant removed
service_upService came online
service_downService went offline
world_spawnParallel world created
xor_fixed_pointXOR fixed point discovered

NATS Transport (Optional)

from repeng.subscriptions import NATSTransport

transport = NATSTransport(hub)
await transport.connect()  # Uses resurrected NATS port
await transport.publish(event)

Files

  • /​Users/​bob/​ies/​repeng-src/​repeng/​gay.py - Gay integration
  • /​Users/​bob/​ies/​repeng-src/​repeng/​cli.py - Standalone CLI
  • /​Users/​bob/​ies/​repeng-src/​repeng/​server.py - HTTP server
  • /​Users/​bob/​ies/​repeng-src/​repeng/​subscriptions.py - Pub/​sub system
  • /​Users/​bob/​ies/​repeng-src/​repeng/​mcp_bridge.py - MCP integration
  • /​Users/​bob/​ies/​port_resurrect.py - Port resurrection

Related Skills

  • port-resurrection - Deterministic port assignment
  • gay-mcp - Color generation MCP
  • mlx-apple-silicon - Run LLMs locally
  • cats-for-ai - Category theory for ML

Autopoietic Marginalia

The interaction IS the skill improving itself.

Every use of this skill is an opportunity for worlding:

  • MEMORY (-1): Record what was learned
  • REMEMBERING (0): Connect patterns to other skills
  • WORLDING (+1): Evolve the skill based on use

Add Interaction Exemplars here as the skill is used.

More Other skills

Delegate independent tasks to specialized agents working concurrently with isolated context.

295.4K 206.3K
View

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

179.7K 100.1K
View

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

179.7K 89.5K
View

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

179.7K 76.1K
View

Fundamental design principles for writing maintainable, testable Python code.

40.2K 21.9K
View

Modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first strategies.

40.2K 20K
View

Generate Playwright tests from scenarios using interactive browser exploration and validation.

39.7K 18.2K
View

Modern React state management with Redux Toolkit, Zustand, Jotai, and React Query for every state category.

40.2K 14.7K
View

GDPR-compliant data handling with consent management, data subject rights, and privacy controls.

40.2K 14.3K
View

Python error handling patterns including input validation, exception hierarchies, and partial failure handling. Use when implementing validation logic, designing exception strategies, handling batch processing failures, or building robust APIs.

40.2K 13.5K
View

Detailed multi-file refactor planning with safety checks and rollback guidance.

39.7K 13K
View