notify
Send a native OS-level terminal notification to alert the user about long-running task completion or important events.
- License 许可
- MIT
- 所属仓库
- kfet/fir
- 最近更新
- 2026-11-15
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- notify
- builtin
- true
- override
- true
- description
- Send a native OS-level terminal notification to alert the user about long-running task completion or important events.
02 资源文件 4
- 许可证LICENSE1.0 KB
- 脚本scripts/notify.sh666 B
- 参考文档SOURCE.md331 B
- 参考文档TRUST.auto.yaml2.2 KB
03 SKILL.md 正文
Notify Skill
Send native OS-level terminal notifications to the user. Notifications appear even when the terminal window is not focused, making them ideal for alerting on long-running tasks.
How to send a notification
Use the script in this skill's scripts/ directory:
bash "$SKILL_DIR/scripts/notify.sh" "TITLE" "BODY"
Or use the bash tool to write escape sequences directly to /dev/tty. You must write to /dev/tty (not stdout or stderr) because the bash tool runs without a TTY attached.
Always check $TMUX and $KITTY_WINDOW_ID first — tmux requires DCS passthrough wrapping or the notification will be silently swallowed. Kitty handles notifications natively.
Manual example
if [ -n "$KITTY_WINDOW_ID" ]; then
printf '\e]99;i=1:d=0;%s\e\\' 'TITLE' > /dev/tty
printf '\e]99;i=1:p=body;%s\e\\' 'BODY' > /dev/tty
elif [ -n "$TMUX" ]; then
printf '\ePtmux;\e\e]777;notify;%s;%s\e\e\\\e\\' 'TITLE' 'BODY' > /dev/tty
else
printf '\e]777;notify;%s;%s\e\\' 'TITLE' 'BODY' > /dev/tty
fi
Terminal support
- Ghostty, iTerm2, WezTerm, rxvt-unicode — OSC 777
- Kitty — OSC 99
- tmux — DCS passthrough wrapping (handled by the snippets above)
Notes
- Keep titles short (1–3 words)
- The body should summarize what happened and any key metrics
- Don't send notifications for trivial operations — only for things the user would want to be alerted about
04 同仓库更多 Skills
wt
Spawn a fresh fir agent in its own tmux session on its own git worktree. Use whenever the user wants the work — or the conversation about the work — to happen over there, not here. If the user points at this skill, or has directly loaded it in the context, that alone is the cue — spawn, don't inline.
wrap-up
Wrap up work on a project branch — review, fix, and simplify in a loop until clean, then ff-merge to main.
tmux-observer
Attach a tmux window to an already-running fir session — observe its transcript and drive its input via tmux send-keys. Use when you need to watch or steer another fir agent.
tmux-driver
Drive interactive CLIs (python, gdb, etc.) via named tmux sessions with multi-window support. Falls back to fir's built-in PTY driver when tmux is unavailable.
telegram-bot-setup
Set up a new Telegram bot channel for a fir project — install the telegram MCP, create a per-project state dir, drop in the bot token, wire .fir/mcp.json with TELEGRAM_STATE_DIR, pair the user, and verify. Use when the user asks to add, configure, or onboard a Telegram bot for a fir worktree/project.
sync
Sync with an upstream source repo — detect changed files, apply equivalent downstream edits, update the baseline, and report any new features or non-trivial changes picked up.