SkillsGrove
SkillsGrove/生産性向上/codemo1991/nanobot-webui/calendar

calendar

インストール

$npx skills add https://github.com/codemo1991/nanobot-webui --skill calendar
$git clone --depth 1 https://github.com/codemo1991/nanobot-webui.git /tmp/nanobot-webui && mkdir -p ~/.claude/skills && cp -r /tmp/nanobot-webui/nanobot/skills/calendar ~/.claude/skills/calendar
この Agent Skill をインストールしてください:https://github.com/codemo1991/nanobot-webui/tree/7af2a2a150a682920f1f72a11abbe4f1f912dd5e/nanobot/skills/calendar — まず SKILL.md とスクリプトを読み、安全であることを確認してから、私のスキルフォルダにインストールしてください。

概要

原文の説明 · MITRecord calendar events from natural language. Creates all-day events with no reminders.
以下の SKILL.md は codemo1991/nanobot-webui(コミット 7af2a2a)から MIT ライセンスに基づいて転載しています。本文は変更しておらず、ファイル先頭のメタデータのみ省略し、画像はリンクとして表示し、非常に長いファイルは途中までの表示としています。Copyright 2025 nanobot contributors。ライセンス:LICENSE。表示しているのは指示ファイルのみです。スクリプト等は元のリポジトリをご覧ください。

Calendar

Use this skill when the user wants to record something on a specific day.

Behavior

  • Automatically extract the date and event title from the user's message.
  • Create an all-day event with no reminders.
  • Confirm the created event to the user.

How to Create an Event

Use the exec tool to run a short Python script that imports nanobot.storage.calendar_repository and creates the event directly in ~/.nanobot/system.db.

Template

import sys
from pathlib import Path

# Ensure nanobot is importable
project_root = Path(__file__).resolve().parent if '__file__' in dir() else Path.cwd()
while project_root.name != 'nanobot-webui' and project_root.parent != project_root:
    project_root = project_root.parent
if str(project_root) not in sys.path:
    sys.path.insert(0, str(project_root))

from nanobot.storage.calendar_repository import get_calendar_repository

repo = get_calendar_repository()

# Optional deduplication: check for existing events on the same day
title = "<event title>"
start_time = "<YYYY-MM-DD>T00:00:00"
end_time = "<YYYY-MM-DD>T23:59:59"
existing = repo.get_events(start_time=start_time[:10], end_time=end_time[:10])
if any(e.get("title") == title for e in existing):
    print(f"Event '{title}' already exists on {start_time[:10]}")
else:
    event = repo.create_event({
        "title": title,
        "description": "",
        "start_time": start_time,
        "end_time": end_time,
        "is_all_day": True,
        "priority": "medium",
        "reminders": [],
    })
    print(f"Created event: {event['id']} — {event['title']} on {event['start_time'][:10]}")

Rules

  • is_all_day must always be True.
  • reminders must always be an empty list [].
  • start_time and end_time should use ISO format (YYYY-MM-DDTHH:MM:SS).
  • For all-day events, use 00:00:00 for start and 23:59:59 for end.
  • The Web UI uses the is_all_day flag to display the event correctly; end_time is only a storage convenience.

Date Parsing

Convert relative expressions to absolute dates before creating the event:

User says Date handling
今天 today
明天 tomorrow
后天 day after tomorrow
下周X next week's corresponding weekday
下个月X号 same day next month
X月X号 that specific date (current year)
YYYY-MM-DD use as-is

If the date is ambiguous, ask the user for clarification before creating the event.

Examples

User: 记录明天要开会
Action: Create an all-day event titled "开会" on tomorrow's date.

User: 后天下午去医院
Action: Create an all-day event titled "去医院" on the day after tomorrow.

User: 5月1号出去旅游
Action: Create an all-day event titled "出去旅游" on May 1st of the current year.

Error Handling

  • If the exec call fails, show the error to the user and suggest trying again.
  • If you cannot determine the exact date, ask the user before proceeding.
ライセンス全文を見る(MIT)
MIT License

Copyright (c) 2025 nanobot contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.