Skip to content

microsoft/SkillOpt / plugins/openclaw

skillopt-sleep

Verified

Reference-only OpenClaw adaptation of SkillOpt-Sleep. Use it to study or port the contributed DeepSeek wrapper, not as a ready-to-run installation.

FileKindSize
README.mdmarkdown5.0 KB
SKILL.mdskill md5.0 KB
config.jsonconfig763 B
run_sleep.pyexecutablescript5.1 KB
run_sleep_cron.shexecutablescript2.2 KB
skillopt_sleep_openclaw.pyscript10.0 KB
slash_sleep.pyexecutablescript11.7 KB
tests/devops-tasks.jsonconfig5.1 KB
tests/research-cron-tasks.jsonconfig6.8 KB
tests/wiki-tasks.jsonconfig5.0 KB

run_sleep_cron.sh

View on GitHub
#!/bin/bash
# run_sleep_cron.sh — wrapper for cron-driven nightly sleep cycle
#
# Usage: bash run_sleep_cron.sh [category1 category2 ...]
#   No args: run on all categories in tests/
#   With args: run only on listed categories (research-cron, devops, wiki)
#
# Cron (3am MYT daily):
#   0 3 * * * cd /home/ethanclaw/.openclaw/workspace/skills/skillopt-sleep && bash run_sleep_cron.sh >> ~/.skillopt-sleep/nightly.log 2>&1

set -euo pipefail

SKILL_DIR="/home/ethanclaw/.openclaw/workspace/skills/skillopt-sleep"
TESTS_DIR="$SKILL_DIR/tests"
LOG_DIR="$HOME/.skillopt-sleep/logs"
mkdir -p "$LOG_DIR"

TIMESTAMP=$(date +%Y%m%d-%H%M%S)
LOG_FILE="$LOG_DIR/night-$TIMESTAMP.log"

# category → test file map
declare -A CATEGORIES=(
    ["research-cron"]="research-cron-tasks.json"
    ["devops"]="devops-tasks.json"
    ["wiki"]="wiki-tasks.json"
)

# Determine which categories to run
if [ $# -eq 0 ]; then
    CATS=("research-cron" "devops" "wiki")
else
    CATS=("$@")
fi

{
    echo "=========================================="
    echo "SkillOpt-Sleep nightly — $TIMESTAMP"
    echo "Categories: ${CATS[*]}"
    echo "=========================================="
} | tee -a "$LOG_FILE"

# Pre-flight: check DeepSeek API key
if ! grep -q "DEEPSEEK_API_KEY=" "$HOME/.openclaw/.env" 2>/dev/null; then
    echo "ERROR: DEEPSEEK_API_KEY not found in ~/.openclaw/.env" | tee -a "$LOG_FILE"
    exit 1
fi

EXIT_CODE=0
for cat in "${CATS[@]}"; do
    tasks_file="$TESTS_DIR/${CATEGORIES[$cat]:-}"
    if [ ! -f "$tasks_file" ]; then
        echo "SKIP: $cat (no tasks file: $tasks_file)" | tee -a "$LOG_FILE"
        continue
    fi

    echo "" | tee -a "$LOG_FILE"
    echo "--- [$cat] starting cycle ---" | tee -a "$LOG_FILE"

    cd "$SKILL_DIR"
    if python3 run_sleep.py --tasks "$tasks_file" 2>&1 | tee -a "$LOG_FILE"; then
        echo "--- [$cat] OK ---" | tee -a "$LOG_FILE"
    else
        EC=$?
        echo "--- [$cat] FAILED (exit $EC) ---" | tee -a "$LOG_FILE"
        EXIT_CODE=$EC
    fi
done

{
    echo ""
    echo "=========================================="
    echo "Done. Exit: $EXIT_CODE"
    echo "=========================================="
} | tee -a "$LOG_FILE"

exit $EXIT_CODE
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall