jpskill.com
📦 その他 コミュニティ

widget

macOSのデスクトップウィジェットを、作成、更新、表示・非表示、一覧表示、削除するためのSkillです。

📜 元の英語説明(参考)

Create, update, hide, show, list, and delete Übersicht desktop widgets on macOS. Use this skill whenever the user asks for desktop widgets, desktop gadgets, or widgets.

🇯🇵 日本人クリエイター向け解説

一言でいうと

macOSのデスクトップウィジェットを、作成、更新、表示・非表示、一覧表示、削除するためのSkillです。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o widget.zip https://jpskill.com/download/5577.zip && unzip -o widget.zip && rm widget.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/5577.zip -OutFile "$d\widget.zip"; Expand-Archive "$d\widget.zip" -DestinationPath $d -Force; ri "$d\widget.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して widget.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → widget フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-17
取得日時
2026-05-17
同梱ファイル
6

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

[スキル名] ウィジェット

WidgetDesk スキル

環境

  • ウィジェットディレクトリ: ~/Library/Application Support/Übersicht/widgets/
  • テンプレートディレクトリ: インストール後は ~/.claude/skills/widget/templates/、このリポジトリ内では .claude/skills/widget/templates/
  • ホスト要件: Übersicht がインストールされており、/Applications/Übersicht.app または /Applications/Uebersicht.app で利用可能であること

最初のステップ

  • WidgetDesk リポジトリのクローン内で作業する場合は、まず bash scripts/setup.sh を実行してください。
  • scripts/setup.sh はデフォルトのエントリポイントです。不足しているホスト依存関係をインストールし、Übersicht を起動し、ウィジェットディレクトリを準備し、スキルをインストールし、結果を検証します。
  • ユーザーが明示的にドライランチェックを要求した場合、またはインストール問題を診断している場合にのみ、bash scripts/setup.sh --check を使用してください。
  • インストール後の高速なヘルスチェックには、bash ~/.claude/skills/widget/scripts/doctor.sh のみを使用してください。
  • セットアップ後、~/.claude/skills/widget/ にあるインストール済みのスキルパスを使用してください。

参照ファイル

  • 再利用可能な実装パターン: patterns.md
  • ホスト管理スクリプト: セットアップ、Übersicht の起動、環境チェック、ウィジェットのインストール、ウィジェットのリスト表示のための scripts/

厳守事項

1. レイアウト

  • すべてのウィジェットはデフォルトで position: fixed にしてください。
  • 下揃えのウィジェットはすべて bottom >= 90px を維持してください。
  • デフォルトのエッジ間隔は 40px です。
  • デフォルトの幅は 140px から 360px の範囲に収めてください。
  • デフォルトの高さは 48px から 220px の範囲に収めてください。
  • ユーザーが明示的に大きなウィジェットを要求した場合にのみ、これらの寸法を超えてください。

2. インタラクション

  • 表示専用ウィジェットはデフォルトで pointer-events: none にしてください。
  • ウィジェットがクリック、ドラッグ、またはテキスト入力を本当に必要とする場合にのみ、インタラクションを有効にしてください。
  • インタラクティブなコントロールは操作しやすい状態を保ってください。
  • デフォルトでは、複雑な多段階のデスクトップインタラクションを避けてください。

3. 更新

  • コマンド駆動型ウィジェットは通常、1000ms から 600000ms の間で更新してください。
  • クロックまたは明らかに時間制約のある UI の場合にのみ、1000ms 未満で更新してください。
  • 純粋なフロントエンドウィジェットは refreshFrequency = false を使用してください。
  • 高頻度のネットワークリクエストは避けてください。

4. 実装

  • ファイル名は小文字のケバブケースを使用してください。
  • 新しい構造を考案する前に、既存のテンプレートと patterns.md を優先してください。
  • 追加の依存関係よりも、macOS の組み込み機能を優先してください。
  • シークレットをハードコードしないでください。
  • ユーザーが明示的に複雑さを要求しない限り、ウィジェットはデフォルトで単一ファイルにしてください。

5. 視覚スタイル

  • スタイルは一貫性があり、控えめで、macOS のような外観を保ってください。
  • デフォルトは暗い半透明のカードにしてください。
  • 推奨される角丸の半径: 14px から 20px
  • SF Pro DisplaySF Mono を優先してください。
  • モーションは短く、軽く、目的に沿ったものにしてください。
  • ウィジェットごとにまったく新しいビジュアル言語を考案しないでください。

操作

# このリポジトリ内での初回セットアップ
bash scripts/setup.sh
bash scripts/setup.sh --check

# インストール後の高速ヘルスチェック
bash ~/.claude/skills/widget/scripts/doctor.sh

# Übersicht を起動
bash ~/.claude/skills/widget/scripts/start-uebersicht.sh

# テンプレートウィジェットをインストールまたは更新
bash ~/.claude/skills/widget/scripts/install-widget.sh \
  ~/.claude/skills/widget/templates/clock.jsx

# インストール済みウィジェットをリスト表示
bash ~/.claude/skills/widget/scripts/list-widgets.sh

# まったく新しいカスタムウィジェットを作成
cat > ~/Library/Application\ Support/Übersicht/widgets/{name}.jsx << 'EOF'
{widget_code}
EOF

# ウィジェットを削除せずに非表示にする
mv ~/Library/Application\ Support/Übersicht/widgets/{name}.jsx \
   ~/Library/Application\ Support/Übersicht/widgets/{name}.jsx.disabled

# 非表示のウィジェットを表示する
mv ~/Library/Application\ Support/Übersicht/widgets/{name}.jsx.disabled \
   ~/Library/Application\ Support/Übersicht/widgets/{name}.jsx

# ウィジェットを削除する
rm ~/Library/Application\ Support/Übersicht/widgets/{name}.jsx

ホスト操作には scripts/ ヘルパーを優先してください。実際の JSX コンテンツを作成または置換する場合にのみ、生のウィジェットファイルを直接記述してください。

ユーザーが既存の組み込みテンプレートとして存在する標準ウィジェットを要求した場合、それをゼロから書き直さないでください。必要に応じて scripts/setup.sh を実行し、一致するテンプレートをインストールしてください。 scripts/setup.sh が正常に完了し、ホストアプリが利用可能になるまで、ウィジェットファイルをインストールまたはコピーしないでください。


ウィジェット形式

// オプションのシェルコマンド。stdout は output として render に渡されます。
export const command = "date '+%H:%M:%S'"

// 更新頻度(ミリ秒)。純粋なフロントエンドウィジェットは false を使用してください。
export const refreshFrequency = 1000

// CSS の位置指定。position: fixed を使用してください。
export const className = `
  position: fixed;
  bottom: 90px;
  right: 40px;
`

// render は { output, error } を受け取ります。
export const render = ({ output }) => {
  return <div>{output?.trim()}</div>
}

必須ルール

ルール 1: react から React をインポートしない

// 悪い例
import { useState } from 'react'

// 良い例
import { React } from 'uebersicht'

ルール 2: render 内で直接フックを呼び出さない

// 悪い例
export const render = () => {
  const [n, setN] = React.useState(0)
}

// 良い例
const Widget = () => {
  const { useState } = React
  const [n, setN] = useState(0)
  return <div>{n}</div>
}

export const render = () => <Widget />

ルール 3: ステートアップデーターから関数を返さない

// 悪い例
setRemaining(r => {
  if (r <= 1) return p => p === 'work' ? BREAK : WORK
})

// 良い例
useEffect(() => {
  if (remaining !== 0) return
  setPhase(p => p === 'work' ? 'break' : 'work')
  setRemaining(p => p === 'work' ? BREAK : WORK)
}, [remaining])

位置チートシート

位置 CSS
右下 bottom: 90px; right: 40px;
左下 bottom: 90px; left: 40px;
右上 top: 40px; right: 40px;
左上 top: 40px; left: 40px;

組み込みテンプレート

ファイル 目的 デフォルト位置
clock.jsx 時計と日付 右下
horizon-clock.jsx 代替の水平時計 右下
pomodoro.jsx ポモドーロタイマー 左下
`now-pla
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

WidgetDesk Skill

Environment

  • Widget directory: ~/Library/Application Support/Übersicht/widgets/
  • Template directory: ~/.claude/skills/widget/templates/ after install, or .claude/skills/widget/templates/ inside this repo
  • Host requirement: Übersicht is installed and available at /Applications/Übersicht.app or /Applications/Uebersicht.app

First Step

  • When working inside a WidgetDesk repo clone, run bash scripts/setup.sh first
  • scripts/setup.sh is the default entrypoint: it installs missing host dependencies, starts Übersicht, prepares the widget directory, installs the skill, and verifies the result
  • Use bash scripts/setup.sh --check only when the user explicitly wants a dry-run check or when you are diagnosing an installation problem
  • Use bash ~/.claude/skills/widget/scripts/doctor.sh only for a fast post-install health check
  • After setup, use the installed skill path under ~/.claude/skills/widget/

Reference Files

  • Reusable implementation patterns: patterns.md
  • Host management scripts: scripts/ for setup, starting Übersicht, checking the environment, installing widgets, and listing widgets

Hard Constraints

1. Layout

  • All widgets should default to position: fixed
  • Any bottom-aligned widget must keep bottom >= 90px
  • Default edge spacing is 40px
  • Default width should stay within 140px to 360px
  • Default height should stay within 48px to 220px
  • Only exceed these dimensions when the user explicitly asks for a large widget

2. Interaction

  • Display-only widgets should default to pointer-events: none
  • Only enable interaction when the widget truly needs clicking, dragging, or text input
  • Interactive controls must stay easy to hit
  • Avoid complex multi-step desktop interactions by default

3. Refresh

  • Command-driven widgets should normally refresh between 1000ms and 600000ms
  • Refresh below 1000ms only for clocks or clearly time-sensitive UI
  • Pure frontend widgets should use refreshFrequency = false
  • Avoid high-frequency network requests

4. Implementation

  • Use lowercase kebab-case filenames
  • Prefer existing templates and patterns.md before inventing new structure
  • Prefer built-in macOS capabilities over extra dependencies
  • Do not hardcode secrets
  • Keep widgets single-file by default unless the user explicitly asks for more complexity

5. Visual Style

  • Keep the style consistent, restrained, and macOS-like
  • Default to dark translucent cards
  • Recommended corner radius: 14px to 20px
  • Prefer SF Pro Display and SF Mono
  • Keep motion short, light, and purposeful
  • Do not invent a brand-new visual language for every widget

Operations

# First-time setup inside this repo
bash scripts/setup.sh
bash scripts/setup.sh --check

# Fast post-install health check
bash ~/.claude/skills/widget/scripts/doctor.sh

# Start Übersicht
bash ~/.claude/skills/widget/scripts/start-uebersicht.sh

# Install or update a template widget
bash ~/.claude/skills/widget/scripts/install-widget.sh \
  ~/.claude/skills/widget/templates/clock.jsx

# List installed widgets
bash ~/.claude/skills/widget/scripts/list-widgets.sh

# Write a brand-new custom widget
cat > ~/Library/Application\ Support/Übersicht/widgets/{name}.jsx << 'EOF'
{widget_code}
EOF

# Hide a widget without deleting it
mv ~/Library/Application\ Support/Übersicht/widgets/{name}.jsx \
   ~/Library/Application\ Support/Übersicht/widgets/{name}.jsx.disabled

# Show a hidden widget
mv ~/Library/Application\ Support/Übersicht/widgets/{name}.jsx.disabled \
   ~/Library/Application\ Support/Übersicht/widgets/{name}.jsx

# Delete a widget
rm ~/Library/Application\ Support/Übersicht/widgets/{name}.jsx

Prefer the scripts/ helpers for host operations. Only write raw widget files directly when creating or replacing actual JSX content.

When the user asks for a standard widget that already exists as a built-in template, do not rewrite it from scratch. Run scripts/setup.sh if needed, then install the matching template. Do not install or copy any widget file until scripts/setup.sh has completed successfully and the host app is available.


Widget Format

// Optional shell command. stdout is passed into render as output.
export const command = "date '+%H:%M:%S'"

// Refresh frequency in milliseconds. Pure frontend widgets should use false.
export const refreshFrequency = 1000

// CSS positioning. Use position: fixed.
export const className = `
  position: fixed;
  bottom: 90px;
  right: 40px;
`

// render receives { output, error }
export const render = ({ output }) => {
  return <div>{output?.trim()}</div>
}

Required Rules

Rule 1: Never import React from react

// Bad
import { useState } from 'react'

// Good
import { React } from 'uebersicht'

Rule 2: Never call hooks directly inside render

// Bad
export const render = () => {
  const [n, setN] = React.useState(0)
}

// Good
const Widget = () => {
  const { useState } = React
  const [n, setN] = useState(0)
  return <div>{n}</div>
}

export const render = () => <Widget />

Rule 3: Never return a function from a state updater

// Bad
setRemaining(r => {
  if (r <= 1) return p => p === 'work' ? BREAK : WORK
})

// Good
useEffect(() => {
  if (remaining !== 0) return
  setPhase(p => p === 'work' ? 'break' : 'work')
  setRemaining(p => p === 'work' ? BREAK : WORK)
}, [remaining])

Position Cheatsheet

Position CSS
Bottom right bottom: 90px; right: 40px;
Bottom left bottom: 90px; left: 40px;
Top right top: 40px; right: 40px;
Top left top: 40px; left: 40px;

Built-In Templates

File Purpose Default Position
clock.jsx Clock and date Bottom right
horizon-clock.jsx Alternate horizontal clock Bottom right
pomodoro.jsx Pomodoro timer Bottom left
now-playing.jsx Apple Music now playing Bottom center
system-stats.jsx CPU, memory, battery Top right
weather-canvas.jsx Animated weather card Top left
git-pulse.jsx Local Git activity heatmap Top right
memo-capsule.jsx Local quick-note capsule Top center
volume-knob.jsx System volume control knob Right side
tap-counter.jsx Simple interactive counter with persisted local state Bottom right

Copy a template directly when it already matches the request, or use it as the starting point for a custom widget.


Style Baseline

background: rgba(8, 12, 20, 0.72);
backdrop-filter: blur(24px);
-webkit-backdrop-filter: blur(24px);
border-radius: 18px;
border: 1px solid rgba(255, 255, 255, 0.08);
box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
color: rgba(255, 255, 255, 0.92);

Add this for display-only widgets:

pointer-events: none;

Useful macOS Shell Commands

date '+%H:%M:%S'
date '+%Y年%-m月%-d日 %A'
pmset -g batt | grep -o '[0-9]*%' | head -1
top -l 1 | grep "CPU usage" | awk '{print $3}'
curl -s "wttr.in/?format=%t+%C"

Remember to .trim() command output before rendering it.

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。