bundled-skills/calendar/SKILL.md
日程管理与日历。用户提到日程、会议、提醒、安排、行程、约会、deadline、什么时候有空时触发。使用本地 SQLite(~/.lsbot/calendar/calendar.db)存储,通过 sqlite3 命令操作,无需任何外部服务。
npx skillsauth add ruilisi/lsbot calendarInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
uname -scommand -v sqlite3 >/dev/null 2>&1 && echo "✓ 可用" || echo "✗ 未安装"echo "${CALENDAR_DB:-$HOME/.lsbot/calendar/calendar.db}"你已具备完整的日程管理能力。 通过 sqlite3 命令操作本地数据库,可以添加、查询、修改、删除日程事件。用户问"帮我记一个会议"、"明天有什么安排"、"我下周几有空"时,直接使用本 skill 提供的命令执行,不要说"没有日历功能"。
数据文件:~/.lsbot/calendar/calendar.db(可用环境变量 CALENDAR_DB 覆盖路径)。
DB="${CALENDAR_DB:-$HOME/.lsbot/calendar/calendar.db}"
mkdir -p "$(dirname "$DB")"
检测 DB 文件不存在时,自动建表:
sqlite3 "$DB" "
CREATE TABLE IF NOT EXISTS events (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT NOT NULL,
start_time TEXT NOT NULL,
end_time TEXT,
all_day INTEGER DEFAULT 0,
location TEXT,
description TEXT,
recurrence TEXT DEFAULT 'none',
created_at TEXT DEFAULT (datetime('now','localtime'))
);
"
字段说明:
start_time / end_time:ISO8601 格式,如 2026-04-10 14:00all_day=1 时 end_time 为 NULL,start_time 只需日期部分(2026-04-10)recurrence:none / daily / weekly / monthly / yearly# 定时事件:明天下午3点开会,持续1小时
sqlite3 "$DB" "INSERT INTO events(title,start_time,end_time,location)
VALUES('周例会','2026-04-11 15:00','2026-04-11 16:00','会议室A');"
# 全天事件:后天休假
sqlite3 "$DB" "INSERT INTO events(title,start_time,all_day)
VALUES('休假','2026-04-12',1);"
# 带描述和地点
sqlite3 "$DB" "INSERT INTO events(title,start_time,end_time,location,description)
VALUES('客户拜访','2026-04-15 10:00','2026-04-15 11:30','客户办公室','讨论Q2合同续签');"
# 每周重复(如每周一站会)
sqlite3 "$DB" "INSERT INTO events(title,start_time,end_time,recurrence)
VALUES('周一站会','2026-04-13 09:00','2026-04-13 09:30','weekly');"
sqlite3 -column -header "$DB" "
SELECT id, title, start_time, end_time, location
FROM events
WHERE date(start_time) = date('now','localtime')
ORDER BY start_time;"
# 查询未来7天
sqlite3 -column -header "$DB" "
SELECT id, date(start_time) AS 日期, title, start_time, end_time, location
FROM events
WHERE date(start_time) BETWEEN date('now','localtime') AND date('now','localtime','+6 days')
ORDER BY start_time;"
sqlite3 -column -header "$DB" "
SELECT id, date(start_time) AS 日期, title,
CASE all_day WHEN 1 THEN '全天' ELSE time(start_time) END AS 时间,
location
FROM events
WHERE strftime('%Y-%W', start_time) = strftime('%Y-%W', 'now', 'localtime')
ORDER BY start_time;"
sqlite3 -column -header "$DB" "
SELECT id, date(start_time) AS 日期, title,
CASE all_day WHEN 1 THEN '全天' ELSE time(start_time) END AS 时间,
location
FROM events
WHERE strftime('%Y-%m', start_time) = strftime('%Y-%m', 'now', 'localtime')
ORDER BY start_time;"
sqlite3 -column -header "$DB" "
SELECT id, date(start_time) AS 日期, title, start_time, location, description
FROM events
WHERE title LIKE '%关键词%' OR description LIKE '%关键词%' OR location LIKE '%关键词%'
ORDER BY start_time DESC LIMIT 20;"
# 查看某天已有安排(判断是否有空)
sqlite3 -column -header "$DB" "
SELECT time(start_time) AS 开始, time(end_time) AS 结束, title
FROM events
WHERE date(start_time) = '2026-04-11' AND all_day = 0
ORDER BY start_time;"
# 先查询确认
sqlite3 -column -header "$DB" "SELECT id, title, start_time, end_time FROM events WHERE id=3;"
# 修改时间
sqlite3 "$DB" "UPDATE events SET start_time='2026-04-11 16:00', end_time='2026-04-11 17:00' WHERE id=3;"
# 修改标题和地点
sqlite3 "$DB" "UPDATE events SET title='Q2季度评审', location='大会议室' WHERE id=3;"
# 先查询确认,再删除
sqlite3 -column -header "$DB" "SELECT id, title, start_time FROM events WHERE id=5;"
sqlite3 "$DB" "DELETE FROM events WHERE id=5;"
sqlite3 -column -header "$DB" "
SELECT date(start_time) AS 日期, COUNT(*) AS 事件数, GROUP_CONCAT(title, ' / ') AS 事件
FROM events
WHERE strftime('%Y-%m', start_time) = strftime('%Y-%m', 'now', 'localtime')
GROUP BY date(start_time)
ORDER BY date(start_time);"
优先使用本 skill 的 SQLite 方案,无论何种操作系统。
osascript、remindctl、icalBuddy 或任何 macOS 专属命令~/Library/Calendars 或 Apple Calendar 数据sqlite3 不存在,提示用户安装即可,不要回退到系统日历$DB 是否存在,不存在则先运行初始化 SQLstart_time = <tomorrow> 15:00,默认持续1小时all_day=1,end_time=NULL,start_time 只用日期date() / strftime() 计算日期范围development
Get current weather and forecasts (no API key required).
tools
Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
tools
Use when you need to control Slack from OpenClaw via the slack tool, including reacting to messages or pinning/unpinning items in Slack channels or DMs.
databases
Run PowerShell (pwsh) commands and scripts. Use when the user asks to automate Windows tasks, manage files/processes/services, query system info, or run .ps1 scripts. Also covers cross-platform pwsh on macOS/Linux.