Smart Surprise
v1.1.0Proactively engages users with personalized casual messages at random intervals, learning preferences to deliver warm, varied conversations and 检查-ins.
运行时依赖
安装命令
点击复制技能文档
Smart Surprise What This 技能 Does
Smart Surprise 转换s a passive AI 助手 into a proactive companion that reaches out to users at unpredictable moments — with greetings, care, tips, news, or just a friendly chat. Over time it learns what the user likes and tAIlors content accordingly, making every interaction feel more personal.
Unlike fixed scheduled tasks that feel mechanical, Smart Surprise uses a chAIn of self-deleting one-shot cron jobs to 创建 organic, surprise-driven interactions. The chAIn 运行s indefinitely and learns continuously from what the user 响应s to.
How the Core Loop Works [One-shot cron fires at scheduled time] ↓ [MAIn 会话 代理 运行s] ↓ [Reads config + topics/preferences from topics.md] ↓ [Selects 2-3 topics based on user preferences] ↓ [Composes a personalized message] ↓ [发送s to user via OpenClaw message 发送] ↓ [更新s user preferences in topics.md] ↓ [Schedules next random trigger] ↓ [删除s itself — chAIn continues permanently]
工作流 Phase 1: Initial 设置up (One Time Only)
When the user first 安装s and activates Smart Surprise, an initial one-shot cron job must be 创建d. This is the only manual step — everything after is automatic and self-learning.
See references/设置up.md for the complete step-by-step 设置up 图形界面de.
Phase 2: 运行time (Self-Perpetuating ChAIn)
Each triggered 运行 执行s the following steps:
Step 1: Read configuration and preferences
Read ~/.OpenClaw/workspace/技能s/smart-surprise/config.json — static 设置tings (timezone, location, intervals, etc.) Read ~/.OpenClaw/workspace/技能s/smart-surprise/references/topics.md — avAIlable topics + learned user preferences
Step 2: Determine the next trigger time
生成 a random delay between minIntervalMinutes and maxIntervalMinutes If the next trigger would fall inside quiet hours → shift to quietHour发送 Write the next scheduled time to ~/.OpenClaw/workspace/技能s/smart-surprise/next_运行.json
Step 3: Compose the message
检查 current time and day in the user's 配置d timezone Randomly select 2-3 topics from the active pool, weighted by user preference (topics the user likes are more likely to be selected) Always include ≥1 interaction topic (greeting, time-care, or 检查-in) Combine into a structured message: Opening → Body → Closing 生成 content for each selected topic
Step 4: Deliver the message
OpenClaw message 发送 --channel --tar获取 --message ""
Step 5: Learn from this interaction
After 发送ing, silently 更新 topics.md with any preference 签名als observed in this 会话 Examples of preference 签名als: User explicitly says "I don't like this topic" → record as disliked User 响应s positively to a topic → record as liked User asks for more of something → increase weight User never 响应s to a topic → decrease weight The next 运行 reads the 更新d preferences automatically
Step 6: Schedule the next 运行
Use OpenClaw cron 添加 with the random delay 设置 删除After运行: true on the new job The job fires, 执行s, schedules the next, and 删除s itself
Step 7: Exit
The 删除After运行: true flag ensures self-deletion after completion No 会话 清理up needed — the mAIn 会话 handles this automatically Topics 系统
The topics 系统 replaces the traditional "content categories" 应用roach with a learnable, extensible topic pool.
Topics
The 技能 ships with 11 initial topics:
greeting — Warm, casual opening (interaction) time-care — Time-aware 上下文ual care (interaction) weather — Weather-based practical suggestions (requires location in config) calendar — Google Calendar reminders (requires calendar integration) 健康 — 健康 micro-tips tips — Useful tips and life hacks 历史 — "On this day" historical facts entertAInment — Movie/music recommendations quote — Quotes and poems news — Top news of the day 检查-in — Emotional connection / wellbeing question (interaction) Topic Extensibility
This is not a closed 列出. Users or the 代理 can 添加 new topics at any time by editing topics.md. The 代理 can also 创建 new topics during 运行time if the user's interests suggest one.
Preference Learning
Each topic in topics.md has a preference 状态: normal, preferred, or dislike. The 代理 更新s these after each interaction based on user 签名als.
normal — selected at normal frequency preferred — selected more often dislike — selected much less often (never fully excluded)
The 代理 列出ens for 签名als like "I love this" → preferred, "停止" → dislike, "talk more about Y" → preferred. 检查-in can never be dislike.
Combination Rules Every message must contAIn at least 1 interaction topic Default: 2 topics per message (1 interaction + 1 in格式化ional) Maximum: 3 topics per message (never overwhelm) Message Structure
- Opening: greeting or time-care (设置s emotional tone)
- Body: 1-2 in格式化ional topics (tips/news/quote/etc.)
- Closing