intelligent-greeting
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "intelligent-greeting" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-6765aa1eb7b8c70a4ca38ea89cb0ca6448344484ddd7a705238305ea58599c40. Verify the upstream source and version against https://skillhub.cn/skills/user_cfc7383d/intelligent-greeting before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Intelligent greeting: an AI proactive greeting system that detects silence by querying session state in SQLite, then after a random delay creates a one-time agent to deliver a natural-feeling greeting. Runs as a guardian process with zero token consumption.
Introduction source: third_party · user_cfc7383d · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Limits and differences
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: intelligent-greeting
slug: intelligent-greeting
displayName: 智能问候系统
description: AI智能主动问候系统 — 沉默检测脚本通过SQLite查询会话状态,随机延时后创建一次性agent问候,像真人一样自然上线打招呼。零token消耗守护进程。
version: 1.0.0
category: companion智能问候系统(v1.0.0)
AI助手在随机时间主动给用户发消息,像真人一样自然上线打招呼。每次问候由AI根据实际语境(时间、天气、最近聊天内容等)实时生成。
核心特性:
- 零token守护进程 — 对话检测脚本(no_agent模式)纯SQLite查询,不消耗LLM
- 一次性问候 — 只在需要问候时消耗一次LLM调用,问候完自动消失
- 时间随机延迟 — 沉默检测后随机等待 10~120 分钟才问候,自然感强
- 锁文件防重复 — 确保同一时间段不会创建多个问候任务
架构原理
┌──────────────────────────────────────────────────────────┐
│ 对话检测脚本 session_watchdog.py │
│ no_agent | 定时运行 | 零token消耗 │
│ │
│ Step 1: 查会话最后一条 user 消息时间戳 (state.db) │
│ Step 2: 距现在 > 设定的沉默窗口? │
│ └─ 否 → 清锁 → 安静退出 │
│ └─ 是 → Step 3 │
│ Step 3: 检查锁文件 │
│ └─ 已有排队问候 → 到触发时间了? │
│ ├─ 是 → 创建一次性问候cronjob → 清锁 │
│ └─ 否 → 安静退出 │
│ └─ 无排队 → 随机延时 → 写锁 → 安静退出 │
└──────────────────────────────────────────────────────────┘
│ 到触发时间
▼
┌──────────────────────────────────────────────────────────┐
│ 一次性问候 cronjob (agent模式, repeat=1) │
│ 调度为 "1分钟后执行" │
│ │
│ 1. 获取当前时间 │
│ 2. 查询天气和场景信息 │
│ 3. 查看最近聊天历史 │
│ 4. LLM 生成自然问候 │
│ 5. 投递到用户 → 任务自动消失 │
└──────────────────────────────────────────────────────────┘
配置说明
对话检测脚本 (scripts/session_watchdog.py)
| 配置项 | 变量 | 说明 |
|---|---|---|
| SQLite数据库路径 | DB_PATH |
Agent的数据状态文件路径 |
| 目标会话ID | CHAT_ID |
投递问候的目标会话 |
| Hermes CLI 路径 | HERMES_BIN |
Hermes Agent CLI 可执行文件路径 |
| 锁文件路径 | LOCK_FILE |
排队状态锁文件 |
| 沉默检测窗口 | SILENCE_WINDOW |
不说话多久视为沉默(默认300秒) |
| 随机等待下限 | WAIT_MIN |
沉默后至少等多久(默认600秒) |
| 随机等待上限 | WAIT_MAX |
沉默后最久等多久(默认7200秒) |
一次性问候 Prompt 配置
问候prompt中包含以下可自定义参数:
- 城市 — 天气查询的城市(默认为 {{CITY}})
- 称呼 — 对用户的称呼方式
- 语言风格 — 问候语的语气和风格
部署步骤
# 1. 复制脚本到部署目录
cp scripts/session_watchdog.py /path/to/your/scripts/
# 2. 根据环境修改脚本中的配置变量
# 编辑 DB_PATH, CHAT_ID, HERMES_BIN 等配置项
# 3. 修改 GREETING_PROMPT 中的个性化内容(称呼、城市等)
# 4. 创建对话检测 cronjob(no_agent模式)
hermes cron create \
"every 3m" \
--name "智能问候检测" \
--deliver local \
--script session_watchdog.py \
--no-agent
# 5. 验证
hermes cron list | grep 智能问候检测
自定义配置
| 配置项 | 默认值 | 说明 |
|---|---|---|
| 沉默检测窗口 | 300秒(5分钟) | 不说话多久视为沉默 |
| 随机等待下限 | 600秒(10分钟) | 沉默后至少等多久 |
| 随机等待上限 | 7200秒(120分钟) | 沉默后最久等多久 |
| 检查频率 | 每3分钟 | 对话检测脚本运行间隔 |
| 城市 | {{CITY}} | 天气查询城市 |
注意事项
- 脚本部署路径需与 cronjob 的
--script参数保持一致 - 锁文件机制是防重复的关键,确保锁文件存在时不重复排队
- 数据库时间戳通常为Unix秒浮点数,注意时区转换
- Hermes CLI 路径可能不在系统 PATH 中,需使用绝对路径或配置 PATH
- 数据库查询需过滤 cron 系统消息,避免误判
版本历史
v1.0.0 — 初始发布
- 🆕 零token守护进程 + 一次性问候架构
- 🎲 时间型随机延迟(10~120分钟)
- ⏱ 沉默检测窗口可配置
- 🔒 锁文件机制防重复排队
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Areas to improve
-
缺少 When to Use 章节 Reported severity: Minor
文档缺少典型使用场景说明
Recommendation: 建议补充 When to Use 章节,说明适合使用该 Skill 的具体场景
Highlights
- 解决用户沉默场景下的自然互动需求
- 架构设计完整,守护进程+一次性问候模式
- 零token消耗设计,成本效益高
Highlights
- 触发词精准完整,覆盖核心功能点
- description 位置正确,内容完整
- 边界清晰,无明显歧义
Areas to improve
-
文档较长 Reported severity: Minor
文档约450行,略显冗长
Recommendation: 可考虑将部分配置说明折叠或移至单独文档
Highlights
- Phase/步骤清晰,架构原理图直观
- 包含端到端部署示例
- frontmatter 完整,版本信息清晰
Highlights
- 工具来源明确,参数配置完整
- 锁文件机制有效防重复
- 注意事项详细,覆盖部署关键点
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.