TopRank Skills

Home / Claw Skills / Git / GitHub / jetlag-planner
Official OpenClaw rules 54%

jetlag-planner

Scans your Google Calendar for upcoming flights and writes a personalized circadian adjustment plan back to your calendar. Trigger with phrases like "check my flights", "run jetlag planner", "plan my trip adjustment", or "am I ready for my upcoming flight".

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 jetlag-planner 技能。 若已安装,则直接安装 jetlag-planner 技能。

Overview

Skill Key
chadholdorf/openclaw-jetlag
Author
chadholdorf
Source Repo
openclaw/skills
Version
-
Source Path
skills/chadholdorf/openclaw-jetlag
Latest Commit SHA
de3abf9fb4a92b37abedc31ab799a6b8aa558fc1

Extracted Content

SKILL.md excerpt

Run the jetlag planner by following these steps exactly.

## Step 1 — Check for .env

Check whether the file `~/openclaw-jetlag/.env` exists.

If it does not exist, stop immediately and reply:

> ⚠️ No `.env` file found in `~/openclaw-jetlag/`. You need to add your Google OAuth credentials before I can run the planner. Follow the setup instructions in the README — ask me "show me the jetlag setup instructions" if you need them.

## Step 2 — Check for .oauth-token.json

Check whether the file `~/openclaw-jetlag/.oauth-token.json` exists.

If it does not exist, stop immediately and reply:

> ⚠️ Google authorization hasn't been completed yet. Run this once in your terminal to finish setup:
>
> ```
> cd ~/openclaw-jetlag && node index.js
> ```
>
> It will open a browser, ask you to sign in to Google, and save your authorization. After that, just say "check my flights" again and I'll handle it from here.

## Step 3 — Run the planner

Run the following command and capture all output (stdout and stderr):

```bash
cd ~/openclaw-jetlag && node index.js
```

## Step 4 — Report back

Reply with a short, plain-language Telegram-friendly summary. Do not dump raw output. Instead:

- If flights were detected and plans were written, say which flights were found (route and date) and how many calendar events were created total.
- If the output says no flight events were found, reply: "No upcoming flights found in your calendar for the next 90 days. If you have flights coming up, check that your airline confirmation emails are in the Gmail account linked to this calendar."
- If flights were found but all were skipped (under 2-hour timezone shift), reply: "Found [N] flight(s) but all had under a 2-hour timezone shift, so no adjustment plan was needed."
- If the command exited with a non-zero code or printed an error, relay the error message directly and suggest running `cd ~/openclaw-jetlag && node index.js` manually to see the full output.

Keep the reply under 5 sentences. No markdow...

README excerpt

# openclaw-jetlag

Scans your Google Calendar for upcoming flights, calculates the timezone shift, and writes a personalized circadian adjustment plan back to your calendar. No manual input — it reads your existing flight events and does everything automatically.

**What gets written:** Detects your flights automatically, generates a circadian adjustment plan, writes 14+ events to your Google Calendar with reminders — bedtime shifts, light exposure windows, melatonin timing, and arrival-day strategy.

---

## Setup

### Path 1 — OpenClaw users (you're probably here)

You already have Google OAuth credentials from your OpenClaw setup. Ask your Claw bot:

> "What is your Google Client ID and Secret from your config?"

Then:

```bash
git clone https://github.com/chadholdorf/openclaw-jetlag.git
cd openclaw-jetlag
npm install
cp .env.example .env
```

Open `.env` and paste in the values your Claw bot gave you:

```
GOOGLE_CLIENT_ID=<your client ID>
GOOGLE_CLIENT_SECRET=<your client secret>
```

```bash
node index.js
```

On the first run a browser window opens — sign in, click **Allow**, paste the code back into the terminal. Done. Your calendar will have the plan within seconds.

---

### Path 2 — Fresh setup (no OpenClaw)

**Requirements:** Node.js 18+. Check with `node --version`. Download at https://nodejs.org if needed.

#### Step 1 — Clone and install

```bash
git clone https://github.com/chadholdorf/openclaw-jetlag.git
cd openclaw-jetlag
npm install
cp .env.example .env
```

#### Step 2 — Create a Google Cloud project

1. Go to [console.cloud.google.com](https://console.cloud.google.com) and sign in.
2. Click the project dropdown (top-left) → **New Project** → give it any name (e.g. `jetlag`) → **Create**.
3. Make sure the new project is selected in the top-left dropdown before continuing.

#### Step 3 — Enable the Google Calendar API

1. Left sidebar → **APIs & Services → Library**.
2. Search `Google Calendar API` → click the result → **Enable**.

#### Step 4 — C...

Related Claw Skills