Delegate independent tasks to specialized agents working concurrently with isolated context.
repeng Gay Skill
repeng-gay
Representation engineering with Gay.jl deterministic coloring for control vectors.
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
| Endpoint | Method | Description |
|---|---|---|
/ | GET | Service info |
/health | GET | Health check |
/vectors | GET | List loaded vectors |
/vectors/<name> | GET | Vector details with colors |
/palette/<n> | GET | Generate n colors |
/vectors | POST | Load vector from GGUF |
/events | GET | SSE stream of port events |
/events/log | GET | Last 100 events |
/tenants | GET | List 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
| Component | Trit |
|---|---|
| GayControlVector | seed % 3 - 1 |
| repeng server | 0 (ERGODIC) |
| port_resurrect | 0 (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
| Event | Description |
|---|---|
port_assigned | Service port assignment |
tenant_added | New tenant registered |
tenant_removed | Tenant removed |
service_up | Service came online |
service_down | Service went offline |
world_spawn | Parallel world created |
xor_fixed_point | XOR 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 assignmentgay-mcp- Color generation MCPmlx-apple-silicon- Run LLMs locallycats-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
brand-guidelines
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.
theme-factory
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.
internal-comms
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.).
Fundamental design principles for writing maintainable, testable Python code.
responsive-design
Modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first strategies.
Generate Playwright tests from scenarios using interactive browser exploration and validation.
Automated website exploration and test case generation using Playwright.
Modern React state management with Redux Toolkit, Zustand, Jotai, and React Query for every state category.
gdpr-data-handling
GDPR-compliant data handling with consent management, data subject rights, and privacy controls.
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.
refactor-plan
Detailed multi-file refactor planning with safety checks and rollback guidance.
