Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

time-helper

БесплатноБез исполняемых скриптовНе проверен

Get current time, convert timezones, and perform time calculations using native PHP (Windows/Mac/Linux compatible)

Interstellar-codeот Interstellar-code★ 18 звёзд на GitHub

Об этом скилле

Time & Timezone Helper Skill

Ultra-efficient, cross-platform time operations using native PHP. Replaces timezone MCP servers with 67% token savings.

Overview

This skill provides timezone and time operations WITHOUT requiring MCP servers, saving 60-75% tokens per query.

Cross-Platform: Works on Windows, Mac, and Linux (uses PHP, not bash scripts).

Token Savings:

  • MCP call: ~400 tokens
  • This skill: ~130 tokens
  • Savings: 270 tokens per query (67.5%)

🔧 BASH COMMAND ATTRIBUTION PATTERN

CRITICAL: Before executing EACH php/bash command, MUST output:

🔧 [time-helper] Running: <command>

Examples:

🔧 [time-helper] Running: php -r "echo (new DateTime('now', new DateTimeZone('Asia/Tokyo')))->format('Y-m-d H:i:s T');"
🔧 [time-helper] Running: php -r "date_default_timezone_set('America/New_York'); echo date('Y-m-d H:i:s T');"
🔧 [time-helper] Running: bash .claude/skills/colored-output/color.sh skill-header "time-helper" "Getting time..."

Why: This pattern helps users identify which skill is executing which command, improving transparency and debugging.


🎨 VISUAL OUTPUT FORMATTING

CRITICAL: All time-helper output MUST use the colored-output formatter skill!

Use Colored-Output Skill

Instead of writing ANSI codes manually, use the centralized formatter:

bash .claude/skills/colored-output/color.sh [type] "time-helper" [message]

Required Output Format

IMPORTANT: Use MINIMAL colored output (2-3 calls max) to prevent screen flickering!

Example formatted output (MINIMAL PATTERN):

# START: Header only
bash .claude/skills/colored-output/color.sh skill-header "time-helper" "Getting current time for Tokyo..."

# MIDDLE: Regular text (no colored calls)
Querying timezone database...
Current time: 2025-10-22 14:30:00 JST
UTC offset: +09:00

# END: Result only
bash .claude/skills/colored-output/color.sh success "" "Time retrieved successfully"

When to Use Colored Output

DO Use:

  • Initial header: bash .claude/skills/colored-output/color.sh skill-header "time-helper" "Processing..."
  • Final result: bash .claude/skills/colored-output/color.sh success "" "Complete"
  • Errors only: bash .claude/skills/colored-output/color.sh error "" "Invalid timezone"

DON'T Use:

  • ❌ Progress updates - use regular text
  • ❌ Info messages - use regular text
  • ❌ Intermediate steps - use regular text

WHY: Each bash call creates a task in Claude CLI, causing screen flickering. Keep it minimal!


Usage Examples

Get Current Time

  • /time-helper "current time"
  • /time-helper "what time is it in Tokyo"
  • /time-helper "time in America/New_York"

Convert Between Timezones

  • /time-helper "convert 3pm EST to Tokyo"
  • /time-helper "what's 14:00 UTC in PST"
  • /time-helper "3:00 PM New York time in London"

Time Calculations

  • /time-helper "5 hours from now"
  • /time-helper "30 days from today"
  • /time-helper "what date is 2 weeks from now"

List Timezones

  • /time-helper "list timezones America"
  • /time-helper "find timezone for London"
  • /time-helper "show all Europe timezones"

DST Information

  • /time-helper "is EST in daylight saving"
  • /time-helper "DST status for Europe/Paris"

How It Works

When user asks about time/timezone:

  1. Determine Command Type: Analyze user request (current time, conversion, calculation, list, DST)
  2. Extract Parameters: Timezone names, times, offsets
  3. Execute PHP Script: Run cross-platform time-helper.php
  4. Return Formatted Output: Human-readable response

Commands for PHP Script

The skill uses ~/.claude/skills/time-helper/time-helper.php script:

Get Current Time

php ~/.claude/skills/time-helper/time-helper.php now "Asia/Tokyo"
php ~/.claude/skills/time-helper/time-helper.php now "America/New_York"
php ~/.claude/skills/time-helper/time-helper.php now "Europe/London"

Convert Time Between Timezones

php ~/.claude/skills/time-helper/time-helper.php convert "15:00" "America/New_York" "Asia/Tokyo"
php ~/.claude/skills/time-helper/time-helper.php convert "2025-10-20 14:00" "UTC" "America/Los_Angeles"

Add Time Offset

php ~/.claude/skills/time-helper/time-helper.php add "5 hours"
php ~/.claude/skills/time-helper/time-helper.php add "30 days"
php ~/.claude/skills/time-helper/time-helper.php add "2 weeks" "2025-10-20"

Subtract Time Offset

php ~/.claude/skills/time-helper/time-helper.php subtract "3 hours"
php ~/.claude/skills/time-helper/time-helper.php subtract "7 days"

List Available Timezones

php ~/.claude/skills/time-helper/time-helper.php list
php ~/.claude/skills/time-helper/time-helper.php list "America"
php ~/.claude/skills/time-helper/time-helper.php list "Europe"
php ~/.claude/skills/time-helper/time-helper.php list "Asia"

Check DST Status

php ~/.claude/skills/time-helper/time-helper.php dst "Americ
Полный SKILL.md на GitHub

Установить time-helper в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

time-helper.php

FAQ

Что делает скилл time-helper?

Get current time, convert timezones, and perform time calculations using native PHP (Windows/Mac/Linux compatible)

Как установить скилл time-helper?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл time-helper запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить time-helper с