Skill: loudmouthedmedia/context-bridger (version 1.0.1)

# Context Bridge **The unified continuity system for OpenClaw.** Ensures context persists across sessions, models, and time. Prevents "starting from zero" on every `/new`. **Version:** 1.0 **Created:** 2026-04-03 --- ## Quick Start ### Installation ```bash # 1. Install the skill openclaw skills install https://github.com/loudmouthedmedia/context-bridge # 2. Run setup to create registry files cd ~/.openclaw/workspace/skills/context-bridge/scripts ./setup.sh # 3. Update AGENTS.md (see below) ``` ### Setup Script The `setup.sh` script **auto-discovers and populates** all existing skills, crons, and agents: 1. Scans `~/.openclaw/workspace/skills/` for local skills 2. Scans `~/.openclaw/skills/` for system skills 3. Checks `openclaw cron list` for active cron jobs 4. Checks `openclaw agents list` and `~/.openclaw/agents/` for agents 5. Creates and populates all registry files with actual data --- ## What It Does **Before Context Bridge:** ``` You: /new Model A: "Hello! How can I help?" [blank slate] You: [re-explain everything] You: /new Model B: "Hello! How can I help?" [blank slate again] You: [re-explain everything again] ``` **After Context Bridge:** ``` You: /new Model C: "📧 [email-skill] available, 📈 [analytics-skill] ready. Working on [Your Project]. Previous model (GPT-X) scheduled a meeting 30 min ago. Ready to continue." ``` --- ## Components ### 1. Registries (The "What Exists") | Registry | File | Tracks | |----------|------|--------| | **Skills** | `~/.openclaw/skills-registry.json` | All installed skills | | **Crons** | `~/.openclaw/cron-registry.json` | Active scheduled jobs | | **Agents** | `~/.openclaw/agents/*/agent.md` | Agent configurations | | **Discovery** | `~/.openclaw/skills-discovery.json` | Skill capabilities | ### 2. Handoff Memory (The "What Happened") **File:** `~/.openclaw/model-agnostic-memory/model-handoff.md` - Session-to-session context - What previous models did - Active projects - Recent actions ### 3. SOPs (The "Rules") **Documentation:** `~/.openclaw/workspace/notes/openclaw-reliability-issues.md` (Issue #9) - File responsibility assignments - Before-adding-content checklist - Cross-reference comments --- ## Session Startup Protocol **Required by AGENTS.md:** ``` 1. Read SOUL.md 2. Read USER.md 3. Read memory files 4. READ CONTEXT BRIDGE FILES: - ~/.openclaw/skills-discovery.json - ~/.openclaw/model-agnostic-memory/model-handoff.md - ~/.openclaw/cron-registry.json - ~/.openclaw/skills-registry.json 5. ACKNOWLEDGE context in first response ``` --- ## File Responsibilities (SOP) | File | Responsibility | Must NOT | |------|----------------|----------| | AGENTS.md | Session startup rules | Periodic checks | | HEARTBEAT.md | Periodic health checks | Session setup | | SOUL.md | Personality/vibe | Technical instructions | | Context Bridge | Registries & discovery | Implementation | --- ## Usage ### Automatic On `/new` or model switch: Registries auto-load via AGENTS.md ### Manual Fallback If needed, say: `load context` ### Update Workflow When adding skills/crons/agents: 1. Update appropriate registry 2. Update discovery (if new capabilities) 3. Update handoff (log the change) 4. Git commit --- ## Why "Context Bridge"? - **Context** = What the model knows - **Bridge** = Connection between isolated sessions/Models Builds bridges across the memory gap.

path: clawhub.json
content: {
  "name": "Context Bridge",
  "tagline": "Unified continuity system for OpenClaw - registries, discovery, and model handoff",
  "description": "Context Bridge ensures context persists across sessions, models, and time. It prevents 'starting from zero' on every /new or model switch. Provides four core components: Registries (track skills, crons, agents), Discovery (skill capabilities), Handoff Memory (what previous models did), and SOPs (rules to prevent duplication).",
  "category": "productivity",
  "tags": ["continuity", "memory", "registries", "context", "multi-model"],
  "version": "1.0.0",
  "license": "MIT",
  "pricing": "free",
  "support_url": "https://github.com/loudmouthedmedia/context-bridge/issues",
  "homepage": "https://github.com/loudmouthedmedia/context-bridge",
  "binaries": {
    "required": ["jq"],
    "optional": ["openclaw"],
    "notes": "setup.sh requires jq for JSON manipulation. openclaw CLI is optional but enables auto-discovery of crons and agents."
  }
}

path: PUBLISHED.md
content: # ✅ CONTEXT BRIDGE PUBLISHED

**Status:** Successfully Published to GitHub Releases
**Release:** v1.0.0

## 📦 Downloads Available

| Format | Size | URL |
|-------|-----|-----|
| TAR.GZ | 7.0K | https://github.com/loudmouthedmedia/context-bridge/releases/download/v1.0.0/context-bridge-1.0.0.tar.gz |
| ZIP | 9.5K | https://github.com/loudmoutclawmedia/context-bridge/releases/download/v1.0.0/context-bridge-1.0.0.zip |

## What's Included

- SKILL.md — Complete documentation
- clawhub.json — ClawHub metadata
- README.md — Full documentation  
- LICENSE — MIT License
- setup.sh — Automated setup
- RELEASE_NOTES.md — This file

## For ClawHub Users

Submit the repository URL:
```
https://github.com/loudmouthedmedia/context-bridge
```

ClawHub will pull from this URL and create a public skill listing.

---

**Published:** 2026-04-06 15:58 UTC

path: PUBLISH.md
content: # Publish Context Bridge to ClawHub

## Submission Steps

### 1. Ensure clawhub.json exists ✅
- Already created: `clawhub.json`

### 2. Submit via ClawHub
- Visit: https://clawhub.ai/publish/context-bridge
- Sign in with GitHub
- Enter repository URL: `https://github.com/loudmouthedmedia/context-bridge`
- Click "Publish" or "Submit Skill"

### 3. ClawHub Will Import
ClawHub pulls from GitHub and creates:
- Public skill page
- Searchable in ClawHub registry
- Version: 1.0.0
- Category: Productivity

### Post-Publish
- Share skill URL
- Add to README badges
- Update openclaw.ai skills listing

---

**Status:** Ready to submit to ClawHub
**Repository:** https://github.com/loudmouthedmedia/context-bridge

path: README.md
content: # Context Bridge

**The unified continuity system for OpenClaw.**

Ensures context persists across sessions, models, and time. Prevents "starting from zero" on every `/new`.

[![OpenClaw](https://img.shields.io/badge/OpenClaw-Skill-blue)](https://openclaw.ai)
[![Version](https://img.shields.io/badge/version-1.0-green)](https://github.com/loudmouthedmedia/context-bridge)

## Problem It Solves

**Before Context Bridge:**
```
You: /new
Model A: "Hello! How can I help?" [blank slate - no memory of previous work]
You: [re-explain everything]

You: /new  
Model B: "Hello! How can I help?" [blank slate again]
You: [re-explain everything again]
```

**After Context Bridge:**
```
You: /new
Model C: "📧 [email-skill] available, 📈 [analytics-skill] ready. 
          Working on [Your Project]. Previous model 
          (GPT-X) scheduled a meeting 30 min ago. 
          Ready to continue."
```

## What It Does

Context Bridge provides four core components:

### 1. Registries (The "What Exists")

Track all system resources in JSON files:

| Registry | File | Tracks |
|----------|------|--------|
| **Skills** | `~/.openclaw/skills-registry.json` | All installed skills |
| **Crons** | `~/.openclaw/cron-registry.json` | Active scheduled jobs |
| **Agents** | `~/.openclaw/agents/*/agent.md` | Agent configurations |

### 2. Discovery (The "How To Use")

**File:** `~/.openclaw/skills-discovery.json`

- Skill capabilities with examples
- Commands and triggers
- Last used by which model

### 3. Handoff Memory (The "What Happened")

**File:** `~/.openclaw/model-agnostic-memory/model-handoff.md`

- Session-to-session context
- What previous models did
- Active projects
- Recent actions

### 4. SOPs (The "Rules")

**Documentation:** Included in reliability issues

- File responsibility assignments
- Before-adding-content checklist
- Cross-reference comments

## Installation

### Method 1: Direct Install (Recommended)

```bash
openclaw skills install https://github.com/openclaw/context-bridge
```

### Method 2: Manual Setup

1. Clone this repository:
```bash
cd ~/.openclaw/workspace/skills
git clone https://github.com/openclaw/context-bridge.git
```

2. Update AGENTS.md to load Context Bridge on session start:
```markdown
## Session Startup

Before doing anything else:

1. Read SOUL.md
2. Read USER.md  
3. Read memory files
4. READ CONTEXT BRIDGE FILES:
   - ~/.openclaw/skills-discovery.json
   - ~/.openclaw/model-agnostic-memory/model-handoff.md
   - ~/.openclaw/cron-registry.json
   - ~/.openclaw/skills-registry.json
5. ACKNOWLEDGE context in first response
```

3. Create initial registries:
```bash
mkdir -p ~/.openclaw/model-agnostic-memory
mkdir -p ~/.openclaw/agents/defaults
```

## File Structure

```
~/.openclaw/
├── skills-registry.json          # Track all skills
├── cron-registry.json            # Track all crons
├── skills-discovery.json         # Skill capabilities
├── model-agnostic-memory/
│   └── model-handoff.md          # Cross-model context
├── agents/
│   └── defaults/
│       └── session-start-hook.md # Session startup rules
└── workspace/
    └── skills/
        └── context-bridge/
            ├── SKILL.md          # This skill
            └── README.md         # This file
```

## Usage

### Automatic
On `/new` or model switch: Registries auto-load via AGENTS.md

### Manual Fallback
If context missing, say: `load context`

### Update Workflow
When adding skills/crons/agents:
1. Update appropriate registry
2. Update discovery (if new capabilities)
3. Update handoff (log the change)
4. Git commit

## Session Startup Protocol

**Required by AGENTS.md:**

```
1. Read SOUL.md
2. Read USER.md  
3. Read memory files
4. READ CONTEXT BRIDGE FILES:
   - ~/.openclaw/skills-discovery.json
   - ~/.openclaw/model-agnostic-memory/model-handoff.md
   - ~/.openclaw/cron-registry.json
   - ~/.openclaw/skills-registry.json
5. ACKNOWLEDGE context in first response
```

## Why "Context Bridge"?

- **Context** = What the model knows
- **Bridge** = Connection between isolated sessions/models

Builds bridges across the memory gap.

## Compatibility

- OpenClaw >= 2026.4.x
- Works with any model provider (Ollama, OpenAI, Anthropic, etc.)
- Cross-platform (Linux, macOS, Windows)

## License

MIT - See LICENSE file

## Contributing

1. Fork the repository
2. Create your feature branch
3. Submit a pull request

## Related Skills

- [marketing-mode](https://clawhub.ai/thesethrose/marketing-mode) - Marketing strategy
- [systems-engineer](https://openclaw.ai/skills/systems-engineer) - System health
- [self-improving](https://openclaw.ai/skills/self-improving) - Learning & memory

## Support

- GitHub Issues: https://github.com/openclaw/context-bridge/issues
- OpenClaw Discord: https://discord.com/invite/clawd
- Documentation: https://docs.openclaw.ai

---

**Version:** 1.0  
**Created:** 2026-04-03  
**Maintained by:** OpenClaw Community

## Download Archives

### For Manual Installation

**TAR.GZ:**
```bash
curl -L https://github.com/loudmouthedmedia/context-bridge/releases/download/v1.0.0/context-bridge-1.0.0.tar.gz | tar -xzf -
```

**ZIP:**
```bash
curl -L https://github.com/loudmouthedmedia/context-bridge/releases/download/v1.0.0/context-bridge-1.0.0.zip -o context-bridge.zip
unzip context-bridge.zip
```

### For ClawHub Submission

Submit the GitHub repository URL:
```
https://github.com/loudmouthedmedia/context-bridge
```

path: RELEASE_NOTES.md
content: # Context Bridge v1.0.0 Release

**Release Date:** 2026-04-06
**Tag:** v1.0.0

## What's Included

- SKILL.md — Complete skill documentation
- clawhub.json — ClawHub metadata
- README.md — Full project documentation
- setup.sh — Automated setup script
- LICENSE — MIT License

## Features

- ✅ Four registry system (skills, crons, agents)
- ✅ Discovery system for capabilities
- ✅ Handoff memory system
- ✅ Setup automation

## For ClawHub Users

Install via:
```bash
openclaw skills install https://github.com/loudmouthedmedia/context-bridge
```

Or manual:
1. Download archive from GitHub releases
2. Extract to `~/.openclaw/skills/context-bridge/`
3. Run `./setup.sh`

path: scripts/setup.sh
content: #!/bin/bash
# Context Bridge Setup Script
# Creates and populates all required registry files

set -e

echo "=== Context Bridge Setup ==="
echo ""

# Create directories
echo "Creating directories..."
mkdir -p ~/.openclaw/model-agnostic-memory
mkdir -p ~/.openclaw/agents/defaults
mkdir -p ~/.openclaw/workspace/skills
mkdir -p ~/.openclaw/scripts
mkdir -p ~/.openclaw/agents

NOW=$(date -u +%Y-%m-%dT%H:%M:%SZ)

# ============================================================================
# SCAN FOR EXISTING SKILLS
# ============================================================================
echo ""
echo "Scanning for existing skills..."

SKILLS_JSON="{}"
SKILLS_LIST="[]"

# Scan workspace skills
if [ -d ~/.openclaw/workspace/skills ]; then
    for skill_dir in ~/.openclaw/workspace/skills/*/; do
        if [ -d "$skill_dir" ]; then
            skill_name=$(basename "$skill_dir")
            skill_file="${skill_dir}SKILL.md"
            
            # Extract info from SKILL.md if it exists
            if [ -f "$skill_file" ]; then
                # Get first header as name
                skill_display_name=$(grep -m1 "^# " "$skill_file" 2>/dev/null | sed 's/^# //' || echo "$skill_name")
                # Get emoji if present
                skill_emoji=$(grep -o "emoji.*" "$skill_file" 2>/dev/null | head -1 | cut -d'"' -f2 || echo "📦")
                # Get description from first paragraph
                skill_desc=$(grep -m1 "^[^#]" "$skill_file" 2>/dev/null | head -1 | sed 's/^[[:space:]]*//' || echo "No description")
            else
                skill_display_name="$skill_name"
                skill_emoji="📦"
                skill_desc="Local workspace skill"
            fi
            
            # Add to skills JSON
            SKILLS_JSON=$(echo "$SKILLS_JSON" | jq --arg name "$skill_name" --arg display "$skill_display_name" --arg emoji "$skill_emoji" --arg desc "$skill_desc" --arg path "~/.openclaw/workspace/skills/$skill_name" --arg now "$NOW" '
                .[$name] = {
                    "name": $display,
                    "emoji": $emoji,
                    "location": $path,
                    "description": $desc,
                    "installed": $now,
                    "status": "active"
                }
            ')
            
            # Add to discovery list
            SKILLS_LIST=$(echo "$SKILLS_LIST" | jq --arg id "$skill_name" --arg name "$skill_display_name" --arg emoji "$skill_emoji" --arg desc "$skill_desc" '
                . + [{
                    "id": $id,
                    "name": $name,
                    "emoji": $emoji,
                    "status": "active",
                    "setupRequired": false,
                    "description": $desc
                }]
            ')
            
            echo "  ✓ Found: $skill_emoji $skill_name"
        fi
    done
fi

# Scan system skills
if [ -d ~/.openclaw/skills ]; then
    for skill_dir in ~/.openclaw/skills/*/; do
        if [ -d "$skill_dir" ]; then
            skill_name=$(basename "$skill_dir")
            skill_file="${skill_dir}SKILL.md"
            
            # Skip if already in workspace
            if echo "$SKILLS_JSON" | jq -e "has(\"$skill_name\")" >/dev/null 2>&1; then
                continue
            fi
            
            # Extract info from SKILL.md if it exists
            if [ -f "$skill_file" ]; then
                skill_display_name=$(grep -m1 "^# " "$skill_file" 2>/dev/null | sed 's/^# //' || echo "$skill_name")
                skill_emoji=$(grep -o "emoji.*" "$skill_file" 2>/dev/null | head -1 | cut -d'"' -f2 || echo "📦")
                skill_desc=$(grep -m1 "^[^#]" "$skill_file" 2>/dev/null | head -1 | sed 's/^[[:space:]]*//' || echo "System skill")
            else
                skill_display_name="$skill_name"
                skill_emoji="📦"
                skill_desc="System skill"
            fi
            
            SKILLS_JSON=$(echo "$SKILLS_JSON" | jq --arg name "$skill_name" --arg display "$skill_display_name" --arg emoji "$skill_emoji" --arg desc "$skill_desc" --arg path "~/.openclaw/skills/$skill_name" --arg now "$NOW" '
                .[$name] = {
                    "name": $display,
                    "emoji": $emoji,
                    "location": $path,
                    "description": $desc,
                    "installed": $now,
                    "status": "active"
                }
            ')
            
            SKILLS_LIST=$(echo "$SKILLS_LIST" | jq --arg id "$skill_name" --arg name "$skill_display_name" --arg emoji "$skill_emoji" --arg desc "$skill_desc" '
                . + [{
                    "id": $id,
                    "name": $name,
                    "emoji": $emoji,
                    "status": "active",
                    "setupRequired": false,
                    "description": $desc
                }]
            ')
            
            echo "  ✓ Found: $skill_emoji $skill_name (system)"
        fi
    done
fi

SKILL_COUNT=$(echo "$SKILLS_JSON" | jq 'length')
echo "  → Total skills found: $SKILL_COUNT"

# ============================================================================
# SCAN FOR EXISTING CRONS
# ============================================================================
echo ""
echo "Scanning for existing cron jobs..."

CRONS_JSON="{}"
CRON_COUNT=0

if command -v openclaw &>/dev/null; then
    # Get cron list from openclaw if available
    CRON_LIST=$(openclaw cron list --json 2>/dev/null || echo "[]")
    
    if [ "$CRON_LIST" != "[]" ] && [ -n "$CRON_LIST" ]; then
        CRONS_JSON=$(echo "$CRON_LIST" | jq --arg now "$NOW" 'map({(.id // .name): {
            "schedule": .schedule,
            "payload": .payload,
            "enabled": (.enabled // true),
            "created": (.created // $now),
            "lastRun": .lastRun
        }}) | add // {}')
        CRON_COUNT=$(echo "$CRONS_JSON" | jq 'length')
    fi
else
    echo "  ⚠️ openclaw CLI not available, skipping cron scan"
fi

echo "  → Total crons found: $CRON_COUNT"

# ============================================================================
# SCAN FOR EXISTING AGENTS
# ============================================================================
echo ""
echo "Scanning for existing agents..."

AGENTS_JSON="{}"
AGENT_COUNT=0

if command -v openclaw &>/dev/null; then
    AGENT_LIST=$(openclaw agents list --json 2>/dev/null || echo "[]")
    
    if [ "$AGENT_LIST" != "[]" ] && [ -n "$AGENT_LIST" ]; then
        AGENTS_JSON=$(echo "$AGENT_LIST" | jq --arg now "$NOW" 'map({(.id // .agentId): {
            "name": (.name // .id),
            "status": (.status // "active"),
            "workspace": .workspace,
            "created": (.created // $now)
        }}) | add // {}')
        AGENT_COUNT=$(echo "$AGENTS_JSON" | jq 'length')
    fi
else
    echo "  ⚠️ openclaw CLI not available, skipping agent scan"
fi

# Also check for agent directories directly
if [ -d ~/.openclaw/agents ]; then
    for agent_dir in ~/.openclaw/agents/*/; do
        if [ -d "$agent_dir" ]; then
            agent_id=$(basename "$agent_dir")
            if ! echo "$AGENTS_JSON" | jq -e "has(\"$agent_id\")" >/dev/null 2>&1; then
                AGENTS_JSON=$(echo "$AGENTS_JSON" | jq --arg id "$agent_id" --arg now "$NOW" '
                    .[$id] = {
                        "name": $id,
                        "status": "active",
                        "discovered": $now
                    }
                ')
                AGENT_COUNT=$((AGENT_COUNT + 1))
                echo "  ✓ Found agent: $agent_id"
            fi
        fi
    done
fi

echo "  → Total agents found: $AGENT_COUNT"

# ============================================================================
# CREATE/UPDATE REGISTRY FILES
# ============================================================================

# Create skills-registry.json
echo ""
echo "Creating skills-registry.json..."
cat > ~/.openclaw/skills-registry.json << EOF
{
  "version": "1.0",
  "lastUpdated": "$NOW",
  "skills": $SKILLS_JSON,
  "missing": {},
  "rules": {
    "beforeCreatingSkill": [
      "Check this registry - does skill already exist?",
      "If exists: UPDATE existing, don't create duplicate",
      "If not exists: CREATE new, then ADD to this registry",
      "Use canonical naming: {agent}-{purpose}"
    ],
    "namingConvention": "lowercase-with-hyphens",
    "examples": [
      "marketing-ga4-reporter",
      "fleet-reporter",
      "systems-engineer"
    ]
  }
}
EOF
echo "  ✓ Created skills-registry.json ($SKILL_COUNT skills)"

# Create cron-registry.json
echo "Creating cron-registry.json..."
cat > ~/.openclaw/cron-registry.json << EOF
{
  "version": "1.0",
  "lastUpdated": "$NOW",
  "crons": $CRONS_JSON,
  "rules": {
    "beforeCreatingCron": [
      "Check this registry for existing cron with same purpose/name",
      "If exists: UPDATE existing, don't create duplicate",
      "If not exists: CREATE new, then ADD to this registry",
      "Use canonical naming: {agent}-{purpose}"
    ],
    "namingConvention": "{agent-name}-{purpose-or-time}"
  }
}
EOF
echo "  ✓ Created cron-registry.json ($CRON_COUNT crons)"

# Create skills-discovery.json
echo "Creating skills-discovery.json..."
cat > ~/.openclaw/skills-discovery.json << EOF
{
  "version": "1.0",
  "lastUpdated": "$NOW",
  "discoveryMethod": "Auto-discovered on Context Bridge setup",
  "skills": $SKILLS_LIST,
  "usageInstructions": {
    "forModels": "On session start, read this file and acknowledge available skills",
    "forUsers": "Say 'what skills do we have' to see current capabilities",
    "forSetup": "Skills marked 'setupRequired: true' need configuration before use"
  }
}
EOF
echo "  ✓ Created skills-discovery.json ($SKILL_COUNT skills)"

# Create model-handoff.md if missing
echo "Creating model-handoff.md..."
if [ ! -f ~/.openclaw/model-agnostic-memory/model-handoff.md ]; then
cat > ~/.openclaw/model-agnostic-memory/model-handoff.md << 'EOF'
# Model Handoff Log

**Purpose:** Track context between model sessions to prevent "starting from zero"

---

## Latest Session

**Model:** (current model)  
**Started:** (timestamp)  
**Previous Model:** (previous model)

**Context:**
- (Add context here)

**Active Projects:**
- (Add projects here)

**Recent Actions:**
- (Add actions here)

---

## How to Update

After each session, append:
```
### TIMESTAMP - MODEL_NAME
**Actions:**
- What was done

**Context for next model:**
- What they should know
```

EOF
echo "  ✓ Created model-handoff.md"
else
    echo "  ✓ model-handoff.md already exists"
fi

# Create session-start-hook.md if missing
echo "Creating session-start-hook.md..."
if [ ! -f ~/.openclaw/agents/defaults/session-start-hook.md ]; then
cat > ~/.openclaw/agents/defaults/session-start-hook.md << 'EOF'
# Session Start Hook

**Purpose:** Auto-load shared context on every session start

---

## Auto-Load Sequence

On EVERY session start (`/new`, model switch, restart):

1. READ: ~/.openclaw/skills-discovery.json
2. READ: ~/.openclaw/model-agnostic-memory/model-handoff.md
3. READ: ~/.openclaw/cron-registry.json
4. READ: ~/.openclaw/skills-registry.json
5. CHECK: Recent memory files

## Output Format

If loaded successfully:
```
[Context Loaded]
📧 Skills available: (list)
🔁 Crons active: (count)
📋 Projects: (active)

Ready.
```

If auto-load FAILS:
```
[Session Started]
⚠️ Auto-context load failed
📋 Manual load: Say "load context"

Ready.
```
EOF
echo "  ✓ Created session-start-hook.md"
else
    echo "  ✓ session-start-hook.md already exists"
fi

# Create load-context.sh if missing
echo "Creating load-context.sh..."
if [ ! -f ~/.openclaw/scripts/load-context.sh ]; then
cat > ~/.openclaw/scripts/load-context.sh << 'EOF'
#!/bin/bash
# load-context.sh - Manual context loader

echo "=== Loading Session Context ==="
echo ""

echo "1. Skills Discovery..."
cat ~/.openclaw/skills-discovery.json 2>/dev/null | jq '.skills[].id' 2>/dev/null || echo "  (discovery file empty)"

echo ""
echo "2. Model Handoff..."
cat ~/.openclaw/model-agnostic-memory/model-handoff.md 2>/dev/null | head -30 || echo "  (handoff file empty)"

echo ""
echo "3. Active Crons..."
cat ~/.openclaw/cron-registry.json 2>/dev/null | jq '.crons | keys' 2>/dev/null || echo "  (cron registry empty)"

echo ""
echo "4. Installed Skills..."
cat ~/.openclaw/skills-registry.json 2>/dev/null | jq '.skills | keys' 2>/dev/null || echo "  (skills registry empty)"

echo ""
echo "=== Context Loaded ==="
EOF
chmod +x ~/.openclaw/scripts/load-context.sh
echo "  ✓ Created load-context.sh"
else
    echo "  ✓ load-context.sh already exists"
fi

echo ""
echo "=== Setup Complete ==="
echo ""
echo "📊 Summary:"
echo "  • Skills registered: $SKILL_COUNT"
echo "  • Crons registered: $CRON_COUNT"
echo "  • Agents discovered: $AGENT_COUNT"
echo ""
echo "Registry files auto-populated with existing data!"
echo ""
echo "Next steps:"
echo "1. Update AGENTS.md to require Context Bridge files on startup"
echo "2. Test manual load: ~/.openclaw/scripts/load-context.sh"
echo ""


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (HIGH)