From timemator
This skill should be used when the user wants to control Timemator or check tracked time. Triggers on "inicia el timer", "para el timer", "cuánto tiempo llevo hoy", "registra 2 horas de X", "resumen semanal de tiempo", "reporte Timemator", "cuánto he trabajado", "/timemator", "timer de", "start timer", "stop timer", "tiempo trabajado", "horas trabajadas", "pausa el timer".
How this skill is triggered — by the user, by Claude, or both
Slash command
/timemator:timematorThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Este skill permite controlar Timemator desde Claude usando AppleScript y GUI scripting. Timemator no
Este skill permite controlar Timemator desde Claude usando AppleScript y GUI scripting. Timemator no tiene diccionario AppleScript propio, por lo que la integración usa tres estrategias:
GUI scripting en macOS requiere que el proceso que ejecuta osascript tenga permiso de Accesibilidad. Si una operación falla con "not allowed assistive access", indica al usuario:
"Para que pueda controlar Timemator, necesitas dar permiso de Accesibilidad a la app que ejecuta Claude. Ve a Preferencias del Sistema → Privacidad y Seguridad → Accesibilidad y añade la aplicación correspondiente (Terminal, Claude, etc.)."
Timemator escribe datos en tiempo real en archivos JSON que usa el widget del sistema. Usa siempre esta fuente para consultas y reportes — no necesita ningún permiso extra:
~/Library/Group Containers/UZ3GNZNN2A.com.catforce.timemator.group/widgetData/
Archivos clave:
currentSession → estado actual (timerIsRunning, tarea activa, timestamps)timer → detalles del último timer registradoweeklyTimeTrackedChart → tiempo por día de la semana (en segundos)monthlyTimeTrackedChart → tiempo por día del mesLos scripts Python completos están en references/data-reading.md.
Los controles del timer están en el menú Tracking (verificado). Requiere permiso de Accesibilidad para Claude.app en Ajustes del Sistema → Privacidad y Seguridad → Accesibilidad.
Iniciar timer:
tell application "Timemator" to activate
delay 0.5
tell application "System Events"
tell process "Timemator"
click menu item "Start Timer" of menu "Tracking" of menu bar 1
end tell
end tell
Pausar timer:
tell application "Timemator" to activate
delay 0.5
tell application "System Events"
tell process "Timemator"
click menu item "Pause Timer" of menu "Tracking" of menu bar 1
end tell
end tell
Comprobar si el timer está corriendo (método fiable — menú):
tell application "Timemator" to activate
delay 0.3
tell application "System Events"
tell process "Timemator"
set startEnabled to enabled of menu item "Start Timer" of menu "Tracking" of menu bar 1
-- Si Start está deshabilitado → timer corriendo
-- Si Start está habilitado → timer parado
if startEnabled then
return "parado"
else
return "corriendo"
end if
end tell
end tell
Nota: El archivo JSON del widget (
currentSession.timerIsRunning) se actualiza con retraso. Para saber el estado en tiempo real, usa siempre el método del menú de arriba.
Timemator escribe archivos JSON en su Group Container para alimentar los widgets del sistema. Esta es la fuente de datos principal — no requiere permisos de accesibilidad ni GUI.
Ruta: ~/Library/Group Containers/UZ3GNZNN2A.com.catforce.timemator.group/widgetData/
import json, os
from datetime import datetime, date
BASE = os.path.expanduser(
"~/Library/Group Containers/UZ3GNZNN2A.com.catforce.timemator.group/widgetData/"
)
# Estado actual del timer
with open(os.path.join(BASE, "currentSession")) as f:
sesion = json.load(f)
corriendo = sesion.get("timerIsRunning", False)
tarea = sesion.get("currentTaskName", "—")
proyecto = sesion.get("parentName", "—")
inicio_ts = sesion.get("currentSessionBeginTimestamp")
# Tiempo de hoy (de los datos semanales)
with open(os.path.join(BASE, "weeklyTimeTrackedChart")) as f:
semana = json.load(f)
for bar in semana["bars"]:
if datetime.fromtimestamp(bar["date"]).date() == date.today():
segundos_hoy = bar.get("totalValue", 0)
break
Los scripts completos para estado, resumen diario, semanal y mensual están en
references/data-reading.md.
Para generar reportes precisos, exporta un CSV via GUI scripting:
tell application "Timemator" to activate
delay 0.5
tell application "System Events"
tell process "Timemator"
-- Abre el diálogo de exportación
try
click menu item "Export..." of menu "File" of menu bar 1
on error
click menu item "Exportar..." of menu "Archivo" of menu bar 1
end try
end tell
end tell
delay 1
-- Guardar en una ruta temporal conocida
tell application "System Events"
tell process "Timemator"
-- Navegar al diálogo de guardar y especificar ruta
keystroke "g" using {command down, shift down}
delay 0.5
keystroke "/tmp/timemator_export.csv"
keystroke return
delay 0.5
keystroke return
end tell
end tell
Luego parsea el CSV con Python:
import csv
from datetime import datetime, date, timedelta
with open('/tmp/timemator_export.csv', 'r', encoding='utf-8') as f:
reader = csv.DictReader(f)
entries = list(reader)
# Filtrar por fecha
today = date.today()
today_entries = [e for e in entries if e.get('Date', '').startswith(str(today))]
Para añadir tiempo pasado, usa el menú de Timemator o el diálogo de nueva entrada:
tell application "Timemator" to activate
delay 0.5
tell application "System Events"
tell process "Timemator"
-- Abrir diálogo de nueva entrada manual
try
click menu item "New Time Entry..." of menu "File" of menu bar 1
on error
keystroke "n" using {command down}
end try
end tell
end tell
tell application "Timemator" to activate antes de cualquier acción~/Library/Containers/ si Timemator usa sandboxingSi el usuario no tiene permisos de accesibilidad configurados, la lectura de datos vía plist (estrategias que no requieren GUI) seguirá funcionando. Solo las acciones de control (start/stop/add) necesitan el permiso de accesibilidad.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub novanoticia/claude-plugin-timemator --plugin timemator