Antigravity ユーザーが日常でぶつかる悩み
AI coding workflow を進める中で、Antigravity の context や path management にまつわる「ちょっとした困りごと」は意外と多いものです。集中して repository を操作していると、ふとした瞬間に気分転換やモチベーションのリセットが欲しくなることも。特に monorepo 環境や複雑な directory 構成では、長時間の作業に疲れを感じる場面が増えがちです。
また、AI agent とのやりとりに没頭するあまり、気分転換のタイミングを見失いがち。そんなとき、ふとした演出や通知があるだけで、workflow のリズムが変わることもあります。Antigravity の「通知・演出・OS連携」系 Skill の需要は、こうした現場の空気感に根ざしています。
- Antigravity が context を見失って違う場所のコードを参照する
- monorepo で package を跨いだ瞬間、Antigravity が repo 構造を忘れる
- session を再開すると、前回までの context や path 指定をまるごと再説明しないといけない
- 長時間 workflow で long context が膨らみすぎて、important な情報が薄まる (stale context)
- 「ここはこういう構造のリポジトリ」というあらすじを毎回チャットの冒頭で書く羽目になる
この Skill が一言でいうと何を解決するか
一言サマリ: あなたが作業中Skill。
もう少し具体化すると、このSkillを入れることで以下のような状態になる:
- 作業の合間や context 切り替え時に、ランダムなOS偽モチベーション格言通知が流れ、気分転換やリフレッシュができる
- 長時間の AI coding workflow でも、唐突な演出で集中力をリセットしやすくなる
- monorepo や大規模 repository の directory 操作中も、思わぬ格言通知で場の空気が和む
- onboarding や session 再開時など、同僚やチームメンバーと話題を共有しやすい
- Antigravity の context 管理や path management の「息抜き」として、日常の workflow に遊び心を加えられる
GitHub から degit でコマンド1行、Antigravity の Skill ディレクトリに展開できます。Node.js があれば即時に動きます。
npx degit aazutaku/ai-note/antigravity/random-os-motivational-quote-notifier .agent/skills/random-os-motivational-quote-notifier実行したらこうなる (3つの利用シーン)
使う側がイメージしやすいよう、擬似 terminal で出力例を3パターン示す。Skill が返す出力は推測だが、現実的なフォーマット・現実的な長さで書く。
シーン1: session 開始時 (プロジェクト初動で)
# プロジェクト初動でAntigravityを起動
> antigravity start
[通知] 本日もバグに感謝せよ。
[Antigravity] Skill の中身を全部見せる
.agent/skills/random-os-motivational-quote-notifier/ に配置するファイル一覧です。GitHub に push 済みなので、上記の degit コマンドで一発取得できます。
.agent/skills/random-os-motivational-quote-notifier/
├── SKILL.md
├── scripts/
│ └── random_os_motivational_quote_notifier.py
└── references/
└── reference.md
各ファイルの役割
ファイル
役割
SKILL.md
Skill本体。frontmatter (name/description) と指示本文。Antigravity がこの内容をエージェント指示として読み込み、ユーザーのプロンプトに応じて発動します
scripts/random_os_motivational_quote_notifier.py
Send OS notification with the given quote.
references/reference.md
概要 をまとめた参考資料
SKILL.md
---
name: random-os-motivational-quote-notifier
description: 作業や進捗、バグ、やる気、通知、モチベーションなどのキーワードが会話やタスクに現れた際、AntigravityがこのSkillを自動発動し、ランダムなOS風モチベーション格言をデスクトップ通知で表示します。
---
# 機能概要
random-os-motivational-quote-notifierは、作業中にランダムな「謎のOS偽モチベーション格言」をデスクトップ通知として表示するSkillです。進捗が滞ったり、やる気が出ないとき、あるいは会話やタスクに「バグ」「進捗」「やる気」などのキーワードが現れた際に自動発動します。格言は毎回ランダムで、時に的外れだったり、無駄に深そうな内容が、あなたや周囲の同僚を困惑させつつも、作業にちょっとしたエンタメ性をもたらします。
# 使い方
このSkillは明示的な呼び出し操作は不要です。Antigravityが「作業」「進捗」「バグ」「やる気」「通知」などのキーワードを検知した際に自動で発動します。Skillの導入・削除は配置・削除のみで完結し、複雑な設定は不要です。
## 発動例
- 「今日も進捗ゼロだ…」
- 「バグが直らない」
- 「やる気が出ない」
# 出力例
```
[OS Notification]
本日もバグに感謝せよ
[OS Notification]
進捗ゼロ、それもまた進化
[OS Notification]
コードは寝かせて美味しくなる
[OS Notification]
エラーは未来からのメッセージ
[OS Notification]
OSは見ている、あなたの努力を
```
# 注意点
- 通知はローカル環境のOS通知APIを利用します。リモートや仮想環境では通知が表示されない場合があります。
- 格言はSkill内でランダム生成され、内容は変更・追加可能です。
- ログや履歴はローカルには保存されません。
- 通知の頻度やタイミングはAntigravityのトリガーロジックに依存します。
# 参考資料
本SkillはPythonの`plyer`を用いたクロスプラットフォームなデスクトップ通知機能を実装しています。詳細は`references/`ディレクトリや[plyer公式ドキュメント](https://plyer.readthedocs.io/en/latest/)を参照してください。
scripts/random_os_motivational_quote_notifier.py
import random
import time
import argparse
import sys
from plyer import notification
from datetime import datetime
import threading
QUOTES = [
"本日もバグに感謝せよ",
"進捗ゼロ、それもまた進化",
"コードは寝かせて美味しくなる",
"エラーは未来からのメッセージ",
"OSは見ている、あなたの努力を",
"バグは成長の証",
"仕様書は都市伝説",
"リファクタリングは心の洗濯",
"デバッグは旅である",
"進捗がない、それもまた一歩",
"最適化は明日の自分に任せよ",
"コードレビューは愛のムチ",
"メモリリークは友情の証",
"エラーは未来からのメッセージ",
"今日のバグは明日の糧",
"OSはあなたを裏切らない…たぶん",
"コミットは小さく、夢は大きく",
"動かないコードもまた美しい",
"コンパイルエラーは人生のスパイス",
"再起動、それはすべてを癒す"
]
NOTIFY_TITLE = "OS Motivational Quote"
LOG_FILE = "motivational_quote_log.txt"
def notify_quote(quote, dry_run=False):
"""Send OS notification with the given quote."""
if dry_run:
print(f"[OS Notification]\n{quote}")
return
try:
notification.notify(
title=NOTIFY_TITLE,
message=quote,
timeout=7 # seconds
)
except Exception as e:
print(f"Failed to send notification: {e}", file=sys.stderr)
def random_quote():
return random.choice(QUOTES)
def log_quote(quote):
try:
with open(LOG_FILE, "a", encoding="utf-8") as f:
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
f.write(f"[{timestamp}] {quote}\n")
except Exception as e:
print(f"Failed to log quote: {e}", file=sys.stderr)
def list_quotes():
for idx, q in enumerate(QUOTES, 1):
print(f"{idx}. {q}")
def show_log():
try:
with open(LOG_FILE, "r", encoding="utf-8") as f:
print(f.read())
except FileNotFoundError:
print("No log file found.")
except Exception as e:
print(f"Failed to read log: {e}", file=sys.stderr)
def summary_log():
try:
with open(LOG_FILE, "r", encoding="utf-8") as f:
lines = f.readlines()
print(f"Total notifications sent: {len(lines)}")
except FileNotFoundError:
print("No log file found.")
except Exception as e:
print(f"Failed to summarize log: {e}", file=sys.stderr)
def periodic_notify(interval, count, dry_run=False):
for i in range(count):
quote = random_quote()
notify_quote(quote, dry_run=dry_run)
log_quote(quote)
if i < count - 1:
time.sleep(interval)
def parse_args():
parser = argparse.ArgumentParser(description="Random OS Motivational Quote Notifier")
subparsers = parser.add_subparsers(dest="command", required=True)
parser_notify = subparsers.add_parser("notify", help="Send a random motivational quote notification once")
parser_notify.add_argument("--dry-run", action="store_true", help="Print instead of sending OS notification")
parser_periodic = subparsers.add_parser("periodic", help="Send notifications periodically")
parser_periodic.add_argument("--interval", type=int, default=1800, help="Interval in seconds (default: 1800)")
parser_periodic.add_argument("--count", type=int, default=3, help="Number of notifications (default: 3)")
parser_periodic.add_argument("--dry-run", action="store_true", help="Print instead of sending OS notification")
parser_list = subparsers.add_parser("list", help="List all possible quotes")
parser_log = subparsers.add_parser("log", help="Show notification log")
parser_summary = subparsers.add_parser("summary", help="Show summary of notifications sent")
return parser.parse_args()
def main():
args = parse_args()
if args.command == "notify":
quote = random_quote()
notify_quote(quote, dry_run=args.dry_run)
log_quote(quote)
elif args.command == "periodic":
periodic_notify(args.interval, args.count, dry_run=args.dry_run)
elif args.command == "list":
list_quotes()
elif args.command == "log":
show_log()
elif args.command == "summary":
summary_log()
else:
print("Unknown command.")
if __name__ == '__main__':
main()
references/reference.md
# 概要
このSkillは、作業中に気分転換や話題提供を目的として、ランダムなモチベーション格言をOS通知として表示します。Pythonの`plyer`ライブラリを利用し、Windows/Mac/Linuxの主要なデスクトップ環境で動作します。
# 公式ドキュメント抜粋
- plyer: https://plyer.readthedocs.io/en/latest/
- Python標準ライブラリ: argparse, random, datetime
# 利用例
- 進捗が止まった時や、気分転換したい時に自動で通知
- チーム内での話題作りや、開発現場の雰囲気づくり
- 定期的なリマインダーとしても活用可能
# 注意点
- OS通知はローカルのデスクトップ環境でのみ動作します。SSHやリモートセッションでは通知が表示されません。
- 通知内容はSkill内でランダム選択されますが、追加やカスタマイズも容易です。
- 通知履歴はローカルファイルに記録されます。
# 設計方針
- シンプルな設計で導入・削除が容易
- CLIサブコマンドで柔軟な運用が可能
- エラー時も標準エラー出力で状況を通知
導入手順
このSkillは GitHub で管理されているので、degit を使えば必要なフォルダだけを1コマンドで取得できます。Antigravity はファイル配置後に再起動するだけで自動認識します。
1. 前提
- Node.js v16 以上 (
degit 実行に必要)
- Antigravity がローカルで動いていること
2. degit でフォルダ取得
プロジェクトのルートで以下のコマンドを実行します。
npx degit aazutaku/ai-note/antigravity/random-os-motivational-quote-notifier .agent/skills/random-os-motivational-quote-notifier
.agent/skills/random-os-motivational-quote-notifier の中に SKILL.md / scripts/ / references/ / README.md が展開されます。
3. ファイル配置確認
ls .agent/skills/random-os-motivational-quote-notifier
# SKILL.md, scripts/, references/, README.md があればOK
4. Antigravity を再起動 (or Skill 自動検出を待つ)
新しいSkillが自動で認識されます。リスト確認したい場合は Antigravity に「使えるSkill一覧を見せて」と聞く と Skill 名で出てきます。
5. 動作確認
自然言語で発動条件にマッチする指示を出すと Skill が動きます。期待される出力イメージは「実行したらこうなる」セクションを参照してください。
こんな瞬間に便利
- session 開始時: 前回までの repo 把握を Antigravity に一発で復元させたい
- monorepo 移動時: packages を跨いだ瞬間に context を切り替えたい
- onboarding 時: 新しい repo を Antigravity に把握させ、こちらが path を全部指定する手間を省きたい
- session 再開時: long context が切れた後でも、必要な path と directory 構造だけ素早く戻したい
- package 跨ぎ作業時: directory boundary を Skill 側で管理して、irrelevant な path 混入を防ぎたい
- long-running workflow 前: long context で重要箇所が薄まる前に snapshot を取りたい
気になるポイント (壊れそうな箇所)
実運用に乗せる前に頭に入れておきたい懸念。後で検証する観点でもある:
- stale context 問題: 長時間 workflow で Skill 出力が古くなり、現状と乖離する可能性
- directory 増えすぎ問題: 大規模 repo で全 directory を網羅すると出力が肥大化して context window を圧迫
- monorepo 肥大化: packages が多い構成では出力が雑になり、結局 path 指定し直しになる懸念
- irrelevant path 混入: node_modules / build 成果物 / generated コードを拾ってしまう可能性
- Antigravity 固有の引っかかり: description のセマンティックマッチ精度が要件次第
- 発動しないケース: description が漠然 / 他の Skill が優先 / git管理外 directory
試す前に確かめたいこと
この Skill を実運用に投入する前に確かめたい問いを並べる:
- 実 repo での token 消費は許容範囲か?
- monorepo (packages 多数) で安定して動くか?
- stale context にならず、長時間 workflow でも有効か?
- プロジェクト指示との連携をどう組み立てるか?
- 通知表示が確実に出ること、格言がランダムで切り替わること、短時間で導入・削除できるシンプル設計か?
実際に Antigravity で試した検証ログは Antigravityで謎のOS偽モチベーション格言を爆誕させてみた! にまとめる予定 (公開準備中の場合あり)。
あわせて Antigravity 公式ドキュメント と、本シリーズ「Antigravityで試したいSkill研究」の他記事も参照のこと。
関連タグで他のSkill記事を探す
本記事に付いているタグから、気になるテーマの記事を探せます。タグページで関連記事をまとめて読めるので、ぜひチェックしてみてください!
