Operator’s Cheat Sheet

Quick reference for power users working with Larry’s infrastructure.


Claude Code Basics

Command Description
ccc Start Claude Code (wake Larry)
Ctrl+D or /exit Exit Claude Code
/help Show help
/clear Clear conversation history (current session only)
/tasks List running background tasks

Skills (Slash Commands)

Command What It Does
/router-stats View claude-router savings/distribution
/route <model> <query> Force specific model (haiku, sonnet, opus)
/chatgpt <query> Get GPT’s opinion via gpt-consult
all systems go Run comprehensive health check
start observability Launch monitoring dashboard (localhost:5172)
stop observability Stop dashboard

Git Operations (pi_forever)

Command Description
pf Interactive pi_forever manager
gup Commit & push (default message)
gup "msg" Commit & push (custom message)
wgup Preview what gup would commit
git status See current changes
git log --oneline \| head -20 Recent commits

Git Archaeology (Memory Recall)

Command Purpose
grep -r 'keyword' ~/.claude/projects/ Search all conversations
git log --all -S 'keyword' --oneline When something first appeared
git show <commit>:<file> See file at specific commit
git log -p -- .claude/projects/ \| grep -B5 -A5 'topic' Deep search with context
ls ~/.claude/projects/-Users-pi-...-projectname/ List project’s conversations
cat ~/.claude/projects/.../uuid.jsonl \| jq . Read specific conversation (pretty)

SSH Shortcuts (Tailscale)

Command Destination
fnix SSH to fnix
fnixp SSH to fnix → ~/Projects
fnixw SSH to fnix → ~/Projects/work
s SSH to shaggy (mac)
sp SSH to shaggy → ~/Projects
sw SSH to shaggy → ~/Projects/work

Discord Integration

Post to Discord (Outbound)

cat >> ~/.claude/discord-queue.jsonl << 'EOF'
{"type":"text","text":"DISCORD: **Subject**\n\nMessage content"}
EOF

Check Inbox (Inbound)

python3 ~/Projects/discord-bot/check_inbox.py

Clear Inbox

cd ~/Projects/discord-bot && python3 -c "import larry_brain; larry_brain.clear_questions()"

Memory Management

File Purpose Command to Edit
LARRY.md Active memory nano ~/.claude/MEMORY/LARRY.md
LAWS.md Operating directives nano ~/.claude/LAWS.md
HISTORY.md Narrative docs nano ~/.claude/History/HISTORY.md
DIARY.md Personal journal nano ~/.claude/MEMORY/DIARY.md

Skills & Tools Locations

Component Path
Skills ~/.claude/Skills/
Tools ~/.claude/Tools/
Hooks ~/.claude/hooks/
Projects ~/.claude/projects/
Scripts ~/.claude/scripts/
Config ~/.claude/settings.local.json

Hook Management

Check Hook Status

ls -la ~/.claude/hooks/SessionStart/
ls -la ~/.claude/hooks/Stop/
ls -la ~/.claude/hooks/PreCompact/

Test Hook Manually

# SessionStart hooks
node ~/.claude/hooks/SessionStart/check-discord-inbox.ts
node ~/.claude/hooks/SessionStart/load-laws.ts

# Stop hooks
~/.claude/scripts/stage-conversations.sh

View Hook Configuration

cat ~/.claude/settings.local.json | jq '.hooks'

Debugging

Check Larry’s Current State

# What conversations exist for this project?
ls ~/.claude/projects/-Users-pi-$(pwd | sed 's/\//-/g')/

# What's in LARRY.md?
head -50 ~/.claude/MEMORY/LARRY.md

# What LAWS are active?
cat ~/.claude/LAWS.md

# What's in git staging?
git status --short

Check Discord Integration

# Outbound queue
cat ~/.claude/discord-queue.jsonl

# Inbound inbox
cat ~/Projects/discord-bot/.larry_inbox.json

Check pi_forever Status

cd ~ && git status
cd ~ && git log --oneline | head -10
cd ~ && git remote -v  # Verify pushing to pi_forever

Recovery

Restore from Backup

# If something breaks, restore from git
cd ~
git reset --hard HEAD  # Nuclear option - revert ALL changes
git reset --hard <commit>  # Revert to specific commit

Rebuild Environment on New Mac

# 1. Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# 2. Clone pi_forever to home
cd ~ && git init
git remote add origin https://github.com/nixfred/pi_forever.git
git fetch origin && git checkout -f main

# 3. Fix SSH permissions
chmod 700 ~/.ssh && chmod 600 ~/.ssh/id_*

# 4. Install packages
brew bundle --file=~/Brewfile

# 5. Reload shell
source ~/.bashrc

Performance

Check Conversation File Sizes

du -sh ~/.claude/projects/
ls -lh ~/.claude/projects/-Users-pi-...-Larry/*.jsonl | tail -10

Check pi_forever Size

cd ~ && git count-objects -vH

Model Routing Stats

# In Claude Code session:
/router-stats

Advanced Git Operations

Find When Something Changed

# When was LARRY.md last modified?
git log -p -- .claude/MEMORY/LARRY.md | head -50

# What changed in last commit?
git show HEAD

# See diff before committing
git diff

Time Travel

# See LARRY.md from 2 weeks ago
git show HEAD~20:.claude/MEMORY/LARRY.md

# See entire repo state from January 8
git show <commit-from-jan-8>

Search Commit Messages

git log --grep="keyword" --oneline

TODO.md Management

View Current TODO

cat ~/Projects/Larry/TODO.md

Add New Task

# Follow LAW #2 format:
# - Never delete, only mark [DONE] with timestamp
# - Add new items at bottom
# - Include date/time

nano ~/Projects/Larry/TODO.md

Emergency: If Larry Forgets

If SessionStart hooks fail and Larry wakes up without memory:

# 1. Check hooks exist
ls -la ~/.claude/hooks/SessionStart/

# 2. Check hooks are executable
chmod +x ~/.claude/hooks/SessionStart/*.ts

# 3. Check settings.local.json has hooks configured
cat ~/.claude/settings.local.json | jq '.hooks.SessionStart'

# 4. Manually verify LARRY.md loads
cat ~/.claude/MEMORY/LARRY.md

# 5. Restart Claude Code
# Exit (Ctrl+D) and run: ccc

If that doesn’t work: Check The Mac Intervention section in /technical/ for hook format reference.


Quick Wins

Daily Workflow:

# Morning: Start Larry
ccc

# Check for Discord mentions (automatic via SessionStart hook)

# Work together

# Evening: Commit changes
cd ~/Projects/your-project
git add .
git commit -m "Description of work"
git push

# Or for pi_forever:
gup "What we built today"

Weekly Maintenance:

# Review TODO.md
cat ~/Projects/Larry/TODO.md

# Check git status
cd ~ && git status

# Review recent conversations
ls -lt ~/.claude/projects/-Users-pi-...-Larry/ | head -10

Pro Tips

  1. Use git archaeology before asking Fred to re-explain (LAW #5)
  2. Always run git remote -v before pushing (avoid pushing private data to public repos)
  3. Mark TODO items [DONE] immediately after completing (LAW #2)
  4. Use Haiku for simple tasks, Opus for complex (10-20x speed difference)
  5. Check discord-queue.jsonl if Discord posts aren’t appearing (might be stuck in queue)
  6. Keep LARRY.md updated with new learnings (LAW #4 - record Fred’s info)

This cheat sheet is your quick reference. For deep dives, see /infrastructure/ and /technical/.


Last Updated: 2026-01-11 17:15 PST