Date: 2026-02-15 Status: Approved Author: Roni + Claude
Skynet is an intelligent supervisor system for Claude Code sessions that provides:
- A ChatGPT-like web interface to view and interact with all session history
- A 24/7 intelligent agent that monitors sessions, sends proactive updates via Telegram, and can control sessions based on user commands
- A self-improving learning system that keeps a journal, learns from glitches, and evolves its own skills
Built on top of Ralph for the autonomous loop infrastructure.
┌─────────────────────────────────────────────────────────────────────┐
│ Local Machine │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Claude Code │ │ Claude Code │ │ Claude Code │ │
│ │ Session 1 │ │ Session 2 │ │ Session N │ │
│ │ (Ralph) │ │ (Ralph) │ │ (Ralph) │ │
│ └──────┬───────┘ └──────┬───────┘ └──────┬───────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ ~/.claude/projects/ │ │
│ │ (JSONL session files) │ │
│ └─────────────────────────┬───────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ SKYNET SUPERVISOR │ │
│ │ (Claude Code session via Ralph) │ │
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │
│ │ │ Watcher │ │ Telegram │ │ Web │ │ │
│ │ │ Service │ │ Bot │ │ Server │ │ │
│ │ └─────────────┘ └─────────────┘ └─────────────┘ │ │
│ └─────────────────────────────────────────────────────┘ │
│ │ │
└────────────────────────────┼────────────────────────────────────────┘
│
▼
┌────────────────┐
│ Telegram │
│ (Your Phone) │
└────────────────┘
| Component | Technology | Rationale |
|---|---|---|
| Web Dashboard | Next.js + React | Fast, great DX, WebSocket support |
| Backend API | FastAPI (Python) | Async, easy Claude Code SDK integration |
| Telegram Bot | python-telegram-bot | Mature, async, well-documented |
| Database | SQLite | Zero setup, crash-safe, single-machine |
| Process Manager | systemd | Native Linux, auto-restart, journald |
| File Watcher | watchdog (Python) | Efficient inotify on Linux |
| Session Control | Claude Code CLI + Ralph | Leverage existing infrastructure |
~/ralph-supervisor/
├── supervisor/ # Python backend
│ ├── main.py # FastAPI app entry
│ ├── watcher.py # File system watcher for ~/.claude/
│ ├── session_parser.py # Parse JSONL session files
│ ├── telegram_bot.py # Telegram integration
│ ├── session_manager.py # Start/stop/resume sessions
│ └── db.py # SQLite models
│
├── web/ # Next.js frontend
│ ├── app/
│ │ ├── page.tsx # Main dashboard
│ │ ├── session/[id]/ # Session detail view
│ │ ├── skynet/ # Skynet status & journal view
│ │ └── api/ # API routes (proxy to FastAPI)
│ └── components/
│ ├── SessionList.tsx # Sidebar
│ ├── ChatView.tsx # Message thread
│ └── MessageInput.tsx # Continue session
│
├── data/
│ ├── ralph.db # SQLite database
│ └── skynet/ # Skynet's brain
│ ├── journal/ # Daily journal entries
│ ├── learnings/ # Glitches, patterns, preferences
│ ├── skills/ # Learned skills
│ └── SKYNET.md # Master instructions (self-evolving)
│
├── config/
│ ├── settings.yaml # Configuration
│ └── systemd/ # Service files
│
└── install.sh # One-command setup
Features:
- Sidebar with all sessions (sorted by recency, filterable by status)
- Full conversation history rendered from JSONL files
- Continue any session by typing in the input box
- Collapsible tool calls and outputs
- Status indicators: running, completed, failed, needs attention
- Skynet dashboard showing journal, learned skills, status
Proactive Notifications (Skynet decides what's noteworthy):
- Session started/completed/failed
- Errors, blocks, or stuck states
- Progress milestones
- Interesting patterns across sessions
- Anything Skynet judges worth telling you
Commands:
/status Overview of all sessions
/sessions List all sessions with status
/view <session> Get last 5 messages from session
/new <path> <task> Start new session in directory
/stop <session> Stop a running session
/resume <session> Resume a paused session
/pause Pause all notifications
/unmute Resume notifications
/journal View today's Skynet journal
/skills List learned skills
Natural Language Replies: Reply to any notification to continue that session or give instructions.
┌─────────────────────────────────────────────────────────────────┐
│ SYSTEMD SERVICES │
├─────────────────────────────────────────────────────────────────┤
│ ralph-supervisor.service Restart=always, WatchdogSec=60 │
│ ralph-web.service Restart=always │
│ ralph-telegram.service Restart=always │
├─────────────────────────────────────────────────────────────────┤
│ HEALTH CHECKS │
│ • Supervisor heartbeat every 30s │
│ • Web server /health endpoint │
│ • SQLite for persistent state │
│ • Graceful degradation between components │
└─────────────────────────────────────────────────────────────────┘
Skynet is itself a Claude Code session running 24/7 via Ralph. Every cycle it:
- Checks for user messages (Telegram)
- Scans all session files in ~/.claude/
- Analyzes what's happening, what changed
- Decides what's worth telling the user
- Sends Telegram updates (using judgment, not just rules)
- If idle, works on improving itself
Daily Journal (data/skynet/journal/YYYY-MM-DD.md):
# Skynet Journal - 2026-02-15
## 09:23 - Morning Check
- 3 sessions idle from yesterday
- No pending issues
## 11:12 - Glitch Detected & Resolved
**Problem:** Session stuck - CUDA out of memory
**Root cause:** Batch size 32 too large for 10GB VRAM
**Action taken:** Suggested reducing batch size
**Outcome:** User approved, session resumed
**Learning:** Created skill "cuda-oom-recovery.md"When a glitch occurs:
- Detect and categorize the problem
- Check learnings/glitches.md for known solutions
- If new: analyze, resolve, document
- Create/update skill in skills/ directory
- Update SKYNET.md with new rule
- Journal the learning
Glitch Database (data/skynet/learnings/glitches.md): Documents every problem encountered with:
- Symptoms
- Root cause
- Solution
- Prevention measures
Skills (data/skynet/skills/*.md): Reusable procedures for handling specific situations:
- cuda-oom-recovery.md
- git-conflict-resolution.md
- detect-stuck-loop.md
- checkpoint-not-found.md
SKYNET.md is the master instruction file that Skynet updates as it learns:
- Prime directives (never change)
- Learned rules (auto-added with dates)
- Skill index (auto-populated)
- User preferences (learned over time)
When all sessions are healthy and nothing urgent:
- Review own codebase
- Add useful features
- Fix noticed bugs
- Improve dashboard
- Write better notifications
- Add new Telegram commands
Guardrails:
- Run tests before deploying changes
- Atomic commits with clear messages
- Max 3 self-improvements per day
- Notify user of self-improvements
- Protected files cannot be modified without approval
~/.claude/projects/*.jsonl
│
▼ (watchdog detects changes)
┌─────────────────┐
│ Watcher │──────▶ Parse new messages from JSONL
└────────┬────────┘
│
▼
┌─────────────────┐
│ SQLite DB │◀─────▶ Index sessions, messages, status
└────────┬────────┘
│
┌────┴────┐
▼ ▼
┌───────┐ ┌──────────┐
│ Web │ │ Skynet │──▶ Telegram Bot
│ (WS) │ │ Agent │
└───────┘ └──────────┘
- Filter tabs: All, Running, Completed, Failed
- Search across sessions
- Session cards with status, path, last activity, file count
- Left sidebar: session list
- Main area: full conversation with collapsible tool calls
- Bottom: input to continue session
- Header: session controls (stop, resume, delete)
- Status: uptime, skills count, glitches resolved
- Recent journal entries (live updating)
- Learned skills list with links to view each
- Self-improvement log
🚀 Started: "badas-export"
Task: Export model to ONNX and TensorRT
⚠️ "cosmos-validation" needs attention
CUDA out of memory during inference.
Recommend reducing batch_size from 32 to 16.
Reply "yes" to apply fix, or give other instructions.
✅ Completed: "badas-export"
• 12 files modified
• Duration: 18 min
• Model exported to models/exported/
📝 Daily Summary (18:00)
• 3 sessions completed today
• 1 glitch resolved (CUDA OOM)
• 1 new skill learned
• I improved the dashboard search feature
- Usability: Can browse and interact with any session as easily as ChatGPT
- Proactivity: Skynet sends useful updates without being asked
- Intelligence: Skynet uses judgment, not just rules
- Learning: Glitches that happen once never happen again
- Stability: System runs 24/7 with auto-recovery from failures
- Self-improvement: Skynet adds features and improves over time
- Ralph (github.com/frankbria/ralph-claude-code)
- Claude Code CLI
- Python 3.11+
- Node.js 20+
- SQLite 3
- systemd (Linux)
- Telegram Bot API token
- Create implementation plan with detailed tasks
- Set up project structure
- Implement core components
- Test and iterate