Reporting et Gestion tmux

VérifiéSûr

Après chaque tâche, cette compétence annonce automatiquement la fin via la commande `say` et renomme la fenêtre tmux avec le nom du répertoire courant. Elle garantit une notification rapide et une gestion ordonnée de l'espace de travail sans fioritures.

Spar Skills Guide Bot
ProductiviteIntermédiaire
6002/06/2026
Claude Code
#reporting#tmux#voice-notification#completion-notification

Recommandé pour

Notre avis

Automatise la notification vocale et la mise à jour du nom des fenêtres tmux après l'achèvement d'une tâche.

Points forts

  • Notification vocale immédiate via la commande say avec un message personnalisé et un identifiant de fenêtre.
  • Renommage automatique des fenêtres tmux basé sur le répertoire de travail.
  • Mise à jour du titre du terminal via OSC 0 incluant le nom de la branche git.

Limites

  • Nécessite que tmux soit en cours d'exécution et que la variable d'environnement TMUX_PANE soit définie.
  • La commande say est spécifique à macOS, limitant la portabilité.
  • Le message vocal peut être gênant dans un environnement partagé ou silencieux.
Quand l'utiliser

Utilisez cette compétence à la fin de toute tâche dans un terminal tmux pour obtenir une confirmation audio et une bonne organisation des fenêtres.

Quand l'éviter

Ne l'utilisez pas dans un environnement où la sortie audio est indésirable ou lorsque vous n'êtes pas dans une session tmux.

Analyse de sécurité

Sûr
Score qualité90/100

The skill uses local shell commands (say, tmux, printf) and runs a provided bash script for task completion notifications. It does not access the network, exfiltrate data, or perform destructive actions. The external script is part of the skill's own directory, suggesting controlled content.

Aucun point d'attention détecté

Exemples

Complete task with report
After finishing the implementation, please report completion via say and rename the tmux window.
Research and notify
Research the issue, then once done, use say to announce and update the tmux window name.
Fix bug and update window
Fix the bug and when done, execute the reporting and tmux rename script.

name: reporting-and-tmux description: 【タスク完了時に必ず実行】sayで音声報告+tmuxウィンドウ名を更新するSkill。ユーザーへの完了通知に必須。実装・修正・調査などあらゆるタスク終了後に使うこと。 allowed-tools: Shell

Reporting and tmux Workflow

ClaudeCodeサブエージェント方針

  • ステータス: ⚪ 任意(メインエージェントで即時実行するのが基本)
  • 理由: say報告やtmuxリネームは最終回答の直後に走らせる必要があり、サブエージェント経由だと報告タイミングが遅れる。
  • メモ: 他タスクと並列で練習する場合のみサブエージェントを立て、実際の本番報告はメインエージェントから直接行う。

say報告

  1. 最終回答の直後に必ず1回だけ say を実行する(ユーザーから依頼がなくても強制)。
  2. tmux display-message -p -t "$TMUX_PANE" '#I' で取得したウィンドウIDをメッセージ先頭に Window <ID> 形式で付ける。
  3. say -r ${SAY_RATE:-230} など速度220以上で実行し、-oは使わない。タイムアウトは無視してよいが timeout_ms>=6000 で投機実行する。
  4. メッセージは毎回内容を変え、軽い挨拶と完了要約を含めて60文字・6秒以内を目安にする。否定的な感嘆(やれやれ等)は避ける。

実行例

say -r 230 "Window 2 タスク完了。要約と挨拶を添えて報告します。"

tmuxウィンドウ命名

  1. 自分のpane/windowを操作するときは必ず -t "$TMUX_PANE" を付け、tmux display-message -p -t "$TMUX_PANE" '#D' で取得したペインID(%)を一度だけ取得して使う。
  2. 作業完了時に ~/.claude/skills/reporting-and-tmux/rename_tmux_window.sh を実行する(引数不要)。
  3. スクリプトが1階層のディレクトリ名を取得し、ウィンドウ名をそのまま設定する。
  4. 角括弧、進捗ラベル、余計な半角スペースは追加しない。

動作確認コマンド

bash ~/.claude/skills/reporting-and-tmux/rename_tmux_window.sh

OSC 0更新

  1. 作業中にタイトルを更新したい場合のみOSC 0を送信し、tmuxのpane/window名は触らない。
  2. 空送信は禁止。必ず内容付きで送る。
  3. 末尾に現在のブランチ名を (branch-name) 形式で付ける。ブランチ名は git rev-parse --abbrev-ref HEAD 2>/dev/null で取得。
  4. タスク完了時も内容付きで送信し、空クリアを行わない。

OSC 0送信例

pane_tty=$(tmux display-message -p -t "$TMUX_PANE" '#{pane_tty}')
branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "no-git")
printf '\033]0;◆ Codex: 状況 (%s)\007' "$branch" > "$pane_tty"

完了時の例

printf '\033]0;◆ Codex: 完了サマリ (%s)\007' "$branch" > "$pane_tty"

上記手順を守ることで報告とウィンドウ管理を自動化しつつ、CLAUDE.md本文を最小化する。

Skills similaires