Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Claude Toggl Skill

A Claude Code skill that auto-fills your day in Toggl Track: pulls Outlook calendar events + your existing entries, proposes meeting + lunch + work blocks totaling 8.5h, and creates them via the Toggl API after you confirm.

Hardcoded for Relesys workspace (5163984) and Europe/Vilnius timezone. See Configuration to adapt for other workspaces.

Usage

/toggl today
/toggl yesterday
/toggl 2026-04-30
/toggl 2026-04-15/2026-04-30
/toggl week
/toggl lastweek
/toggl month
/toggl lastmonth
/toggl 2026-03

The skill prints a per-day proposal table, asks for confirmation in Russian (Создать эти записи? (yes / правки)), then creates entries one batch at a time. Days that are already ≥ 8h logged or marked as Time Off are skipped.

Prerequisites

  1. Claude Code (install)
  2. MCP Toggl server — enables the skill to read entries via MCP instead of curl. Recommended: mcp-server-toggl or any equivalent Toggl MCP. Add it to your ~/.claude.json MCP config.
  3. Toggl Track account with Outlook calendar integration enabled — Settings → Integrations → Calendar → Connect Outlook. Without this, calendar events are not fetched and only existing time entries + git log are used.

Installation

git clone https://github.com/sssats/claude-toggle-skill.git ~/.claude/skills/toggl

Then add your Toggl API token to ~/.claude/settings.local.json:

{
  "env": {
    "TOGGL_API_KEY": "<paste-from-https://track.toggl.com/profile>"
  }
}

Restart Claude Code so the skill is picked up. Verify by typing /toggl — autocomplete should suggest the command.

What's hardcoded (Relesys-specific)

These IDs are baked into SKILL.md. If you're at Relesys you don't need to change anything. If you're elsewhere, fork and edit:

Constant Value Meaning
WORKSPACE_ID 5163984 Relesys workspace
INTERNAL_PROJECT_ID 190265404 Project for meetings/sync/refinements
INTERNAL_MEETING_TID 90400216 Default task for untracked Outlook events
LUNCH_PROJECT_ID 167789692 Lunch project
TIMEOFF_PROJECT_ID 167789694 Vacation / public holiday / sick day
TIMEZONE Europe/Vilnius Used for all UTC ↔ local conversions
DAY_START / DAY_END 10:00 / 18:30 Working window per day
LUNCH_DEFAULT 13:00–13:30 Auto-shifted if it collides with a meeting
TARGET_SECONDS 30600 8.5h per day

The default work project/task and ticket description are detected automatically from your most recent dev entry + current git branch — no per-user configuration needed.

How it works (short version)

  1. Resolve the date range from the command argument (weekends always skipped).
  2. Parallel fetch: existing Toggl entries (MCP), Outlook calendar events (Toggl API), one git log for the whole range.
  3. Per day: compute occupied slots → match calendar events to existing meeting entries → untracked events become new Meeting entries → add a Lunch block → fill all remaining gaps inside the working window with Work entries using the most recent dev project/task as template.
  4. Print a proposal table per day; on confirmation, create entries via batched curl.

Full algorithm: see SKILL.md.

Limitations

  • No backdated-entry MCP method exists in current Toggl MCP servers, so creation still goes through curl to POST /workspaces/{id}/time_entries. Reads are MCP.
  • Travel task (90400224) is not auto-detected — set it manually in Toggl after the run if needed.
  • All-day Outlook events (training, vacation, conferences) are skipped automatically. Time Off should be logged as a Toggl entry on those days; if it's there, the day is skipped.
  • Timezone is hardcoded to Europe/Vilnius. The skill uses TZ=Europe/Vilnius date -d ... to handle DST correctly. Change TIMEZONE in SKILL.md if you live elsewhere.

Contributing

PRs welcome — especially for:

  • An optional /toggl init flow to discover project IDs interactively for non-Relesys users
  • Replacing curl-based entry creation once a Toggl MCP server gains a create_time_entry method

License

MIT

About

claude-toggle-skill

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors