dream
Use this skill to review recent conversations and consolidate learnings into Sibyl. Activates on mentions of dream, dreaming, consolidate memory, review conversations, what did we learn, sleep cycle, reflect on sessions, consolidate knowledge, memory maintenance, nightly review, digest sessions, or dream mode.
What this skill does
# Dream: Conversation Review & Knowledge Consolidation
Bio-inspired two-phase sleep cycle that reviews Claude Code and Codex conversations, extracts structured knowledge, and consolidates it into Sibyl. Like biological dreaming: NREM consolidates, REM discovers.
**Core insight:** Conversations contain ~10x more knowledge than what gets manually captured. Dreams extract decisions, patterns, corrections, anti-patterns, and open questions that would otherwise vanish when sessions scroll off.
**How to read this skill:** the phases below describe the rhythm of a useful dream cycle, not a procedure to march through. Quick naps compress most of it, deep sleeps stretch it out. The non-negotiable bits are extraction quality (Sibyl entries that meet the bar in `references/extraction-guide.md`) and dedup discipline (every write checked against existing entries). Process shape adapts; quality bar doesn't.
## The Shape
```dot
digraph dream {
rankdir=TB;
node [shape=box];
"1. ORIENT" [style=filled, fillcolor="#e8e8ff"];
"2. HARVEST" [style=filled, fillcolor="#ffe8e8"];
"3. NREM: Consolidate" [style=filled, fillcolor="#e8ffe8"];
"4. REM: Explore" [style=filled, fillcolor="#fff8e0"];
"5. REPORT" [style=filled, fillcolor="#e8e8ff"];
"1. ORIENT" -> "2. HARVEST";
"2. HARVEST" -> "3. NREM: Consolidate";
"3. NREM: Consolidate" -> "4. REM: Explore";
"4. REM: Explore" -> "5. REPORT";
}
```
### Depth Modes
| Mode | Sessions | Focus | When |
| -------------- | -------------------- | ----------------------------- | -------------------------- |
| **Quick nap** | Last 1-3 | Extract from today's work | End of day, `/dream quick` |
| **Full sleep** | Last 5-15 | Standard consolidation cycle | Default `/dream` |
| **Deep sleep** | All since last dream | Cross-project synthesis + REM | `/dream deep` |
| **Lucid** | Specific session(s) | Targeted extraction | `/dream <session-id>` |
---
## Phase 1: ORIENT
Get the lay of the land before harvesting. Re-processing already-dreamed sessions wastes tokens and creates duplicate entries.
### Common moves
1. **Check dream state**: when was the last dream cycle?
```bash
# Check Claude's auto-dream lock
stat ~/.claude/projects/*/memory/.consolidate-lock 2>/dev/null | grep -A1 "Modify"
# Check Sibyl for recent dream entries
sibyl search "dream report" --type episode --limit 3
```
2. **Discover conversation sources:**
**Claude Code sessions:**
```bash
# Find recent sessions across ALL projects (last 7 days)
find ~/.claude/projects -name "*.jsonl" -not -path "*/subagents/*" -mtime -7 -exec ls -lt {} + | head -30
```
**Codex sessions:**
```bash
# Find recent Codex rollouts
find ~/.codex/sessions -name "rollout-*.jsonl" -mtime -7 -exec ls -lt {} + | head -30
```
3. **Count the harvest:**
- How many sessions since last dream?
- Which projects were active?
- Any notably long or complex sessions? (file size > 100KB = rich conversation)
4. **Set dream scope** based on depth mode and available sessions.
---
## Phase 2: HARVEST
Read conversations and identify extractable knowledge. The trick is reading targeted segments rather than entire JSONL files; most session content is routine, and only specific patterns carry transferable signal.
### Reading Claude Code sessions
Claude Code JSONL files contain one JSON object per line. Key message types to look for:
| Content Type | Where to Find | What to Extract |
| --------------------------- | ---------------------------------------- | ------------------------------------ |
| **User corrections** | User messages following assistant errors | Anti-patterns, wrong assumptions |
| **Technical decisions** | Assistant text blocks with rationale | Decision + alternatives considered |
| **Tool invocations** | `tool_use` blocks (Bash, Edit, etc.) | Commands that worked, error patterns |
| **Debugging chains** | Sequences of failed → fixed attempts | Error patterns, root causes |
| **Architecture discussion** | Longer text blocks with design reasoning | Patterns, system relationships |
| **Thinking blocks** | `type: "thinking"` content | Reasoning chains, hidden insights |
**Extraction strategy, don't read whole files.** Use targeted python extraction:
```bash
# Extract all user prompts (most reliable method)
python3 -c "
import json, sys
with open('session.jsonl') as f:
for line in f:
obj = json.loads(line)
if obj.get('type') == 'user':
content = obj.get('message', {}).get('content', '')
if isinstance(content, str) and len(content) > 20 and not content.startswith('<'):
print(content[:300])
"
# Extract assistant decisions and rationale
python3 -c "
import json
with open('session.jsonl') as f:
for line in f:
obj = json.loads(line)
if obj.get('type') == 'assistant':
for block in obj.get('message', {}).get('content', []):
if isinstance(block, dict) and block.get('type') == 'text':
text = block['text']
if any(kw in text.lower() for kw in ['because', 'root cause', 'the issue', 'approach', 'trade-off']):
if len(text) > 100:
print(text[:400])
print('---')
"
# Get session titles (best way to understand session topics at a glance)
for f in ~/.claude/projects/-Users-bliss-dev-*/*.jsonl; do
title=\$(grep -m1 '"ai-title"' "\$f" 2>/dev/null | python3 -c "import sys,json; print(json.loads(next(sys.stdin)).get('aiTitle',''))" 2>/dev/null)
[[ -n "\$title" ]] && echo "\$(du -h "\$f" | cut -f1) \$(basename "\$(dirname "\$f")"): \$title"
done | sort -rh | head -20
```
**Why python over grep:** Claude Code JSONL has nested JSON structures (content arrays inside message objects). Simple grep patterns like `'"role":"user"'` match across the entire line, producing false positives from assistant messages that quote user content. Python parsing is slower but precise. Use grep only for initial signal scoring (counts), then python for actual extraction.
For promising sessions (high correction count, long duration, many tool calls), read key segments more deeply using `Read` tool on the JSONL file with offset/limit.
### Reading Codex Sessions
Codex rollouts at `~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl` use a different format. See `references/conversation-formats.md` for the full schema.
```bash
# Find Codex sessions with substantial content
find ~/.codex/sessions -name "rollout-*.jsonl" -mtime -7 -size +10k
# Get Codex session metadata (cwd, branch, model)
python3 -c "
import json
with open('rollout.jsonl') as f:
for line in f:
obj = json.loads(line)
if obj.get('type') == 'session_meta':
p = obj['payload']
print(f'cwd: {p.get(\"cwd\")}')
print(f'model: {p.get(\"model_provider\")}')
print(f'branch: {p.get(\"git\", {}).get(\"branch\")}')
break
"
# Extract user messages from Codex (payload.role == 'user')
python3 -c "
import json
with open('rollout.jsonl') as f:
for line in f:
obj = json.loads(line)
if obj.get('type') == 'response_item':
p = obj.get('payload', {})
if p.get('role') == 'user':
for c in p.get('content', []):
if c.get('type') == 'input_text':
text = c['text']
if not text.startswith('#') and not text.startswith('<') and len(text) > 20:
print(text[:200])
"
# Extract function calls
grep '"function_call"' rollout.jsonl | grep -v '"function_call_output"'
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.