whendone-plus

Automatically notifies the user when long-running terminal commands (e.g., npm test, docker build, git push) complete. The agent sends a desktop notification if a command runs longer than a threshold (default 10 seconds); not intended for interactive, typically short, or streaming commands.

Last repository push
GitHub Stars
112
Forks
17
Issues / PRs
2

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "whendone-plus" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-8c4af2f76b845de5128f3375741e91876d5077916f795add162a5c9604bdf125. Verify the upstream source and version against https://github.com/EliasOulkadi/shokunin before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Automatically notifies the user when long-running terminal commands (e.g., npm test, docker build, git push) complete. The agent sends a desktop notification if a command runs longer than a threshold (default 10 seconds); not intended for interactive, typically short, or streaming commands.

0 Downloads

Introduction source: third_party · EliasOulkadi · 3.0.0 Reference

SkillPi interpretation

Tasks
Automatically notify the user when long-running terminal commands finish (npm test, docker build, git push, etc.). The agent monitors command execution and sends a desktop notification on completion if the command ran longer than threshold (default 10s). Use when user asks to "notify me when done", "desktop notification when command finishes", "alert when done", or "tell me when this completes". Do NOT use for interactive commands (vim, nano, less, htop), commands that always complete in <5s, or streaming commands (tail -f).
Audience
Not specified in the source documentation.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: whendone-plus
description: Automatically notify the user when long-running terminal commands finish (npm test, docker build, git push, etc.). The agent monitors command execution and sends a desktop notification on completion if the command ran longer than threshold (default 10s). Use when user asks to "notify me when done", "desktop notification when command finishes", "alert when done", or "tell me when this completes". Do NOT use for interactive commands (vim, nano, less, htop), commands that always complete in <5s, or streaming commands (tail -f).
triggers:
  - "notify me when done"
  - "desktop notification"
  - "alert when done"
  - "tell me when this completes"
  - "notify when finished"
  - "ping me when"
  - "remind me when"
  - "notification on completion"
  - "when done"
negatives:
  - "interactive commands"
  - "vim"
  - "nano"
  - "less"
  - "htop"
  - "streaming commands"
  - "tail -f"
  - "short commands"
license: MIT
compatibility: opencode
metadata:
  workflow: automation
  audience: developers
  version: "3.0.0"

WhenDone Plus

Automatically notify when long-running commands complete.

How It Works

  1. User runs a long command (e.g. npm test, docker build, git push)
  2. The agent monitors the command execution time
  3. If the command runs longer than the threshold (default 10s), the agent notifies the user on completion
  4. Exit code is passed through

Workflow

Step 1: Detect long-running command

Identify commands likely to exceed threshold:

  • npm test, npm run test, npx playwright test
  • docker build, docker compose up, docker compose down
  • git push, git pull, git clone
  • pip install, npm install, pnpm install, yarn install
  • cargo build, cargo test, go build, dotnet build
  • Custom scripts, database migrations, data processing pipelines
  • ffmpeg, rsync, scp, large file transfers

Step 2: Monitor execution

Start a background timer when the command begins. Track:

  • Elapsed wall-clock time
  • Peak memory usage (if available)
  • Child process tree (for pipeline awareness)

Step 3: Notify on completion

Basic notification format:

✅ "Command finished: npm test completed in 142s (exit 0)"
❌ "Command finished: docker build failed in 89s (exit 1)"

Include:

  • Command name (first word + key args)
  • Execution time (rounded to seconds)
  • Exit code (success/failure)
  • Optional: memory peak, output file path if redirected

Step 4: Handle edge cases

  • Commands completing under 10s: no notification (too fast to matter)
  • Interactive/TUI commands (vim, nano, htop): skip (user is watching)
  • Piped commands (e.g. npm test | grep error): monitor the pipeline, not the first process
  • Backgrounded commands (&): notify on background process completion
  • Chained commands (;): notify per-segment or in aggregate
  • Commands killed by signal: notify with signal name (e.g. "killed by SIGTERM")

Notification Mechanisms

Windows Toast Notification (PowerShell)

Add-Type -AssemblyName System.Windows.Forms
$balloon = New-Object System.Windows.Forms.NotifyIcon
$balloon.Icon = [System.Drawing.SystemIcons]::Information
$balloon.BalloonTipTitle = "Command Complete"
$balloon.BalloonTipText = "npm test finished in 142s (exit 0)"
$balloon.Visible = $true
$balloon.ShowBalloonTip(5000)
Start-Sleep -Seconds 5
$balloon.Dispose()

Terminal Bell (cross-platform)

echo -e "\a"                         # ASCII bell character
printf '\a'                          # POSIX

BurntToast Module (Windows 10/11)

Import-Module BurntToast
New-BurntToastNotification -Text "Command Complete", "npm test finished in 142s (exit 0)"

macOS Notification

osascript -e 'display notification "npm test finished in 142s" with title "Command Complete"'
terminal-notifier -title "Command Complete" -message "npm test finished in 142s"

Linux Notification (notify-send)

notify-send "Command Complete" "npm test finished in 142s"

Error Handling

Error Cause Fix
Notification never fires Command completed under threshold Expected. Threshold is 10s by default.
Wrong exit code reported Shell pipeline masking failures Use $PIPESTATUS in bash, $LASTEXITCODE in PowerShell
Notification module missing BurntToast/notify-send not installed Fallback to terminal bell or Write-Host
Silent failure on background job Job detached from monitor process Use Wait-Job in PowerShell, wait in bash
Double notification Parent and child process both fire Track PID tree, notify only on root process
Desktop notification blocked System focus assist or DnD mode Fallback to terminal output with colored exit code
Command output lost Notification intercepts stdout/stderr Always tee or capture output before monitoring

Anti-Patterns

Mistake Fix
Notify for every command Only if >10s threshold
Breaking pipes Ensure stdout/stderr passthrough
Breaking exit codes Pass through original exit code
Notifications for interactive commands Skip if TUI detected
Notify and then continue working Wait for notification confirmation or user acknowledgment
Assuming notification system is available Always have a text-only fallback (Write-Host)
Monitoring subprocess instead of pipeline Track the entire pipeline PID group

Customization

Setting Default Description
Threshold 10s Minimum command duration to trigger notification
Notification style Toast toast, bell, or both
Include exit code Yes Show pass/fail in notification
Show elapsed time Yes Include duration in notification text
Fallback on failure Bell What to do if toast notification fails

Checklist

  • [ ] Notification method matches platform (BurntToast on Windows, terminal-notifier on macOS, notify-send on Linux)
  • [ ] Threshold duration set appropriately (default 10s — not too short, not too long)
  • [ ] Not used for interactive commands (vim, nano, htop, less)
  • [ ] Custom message includes the command name and result (success/fail)
  • [ ] Fallback: terminal bell or Write-Host if notification fails

Sources

  • Windows Toast API (docs.microsoft.com/en-us/windows/apps/design/shell/tiles-and-notifications)
  • BurntToast PowerShell module (github.com/Windos/BurntToast)
  • notify-send (Linux Desktop Notifications Specification)
  • terminal-notifier (github.com/julienXX/terminal-notifier)
  • macOS osascript display notification (developer.apple.com)
  • POSIX terminal bell (ASCII 0x07)
  • Shell job control (bash manual, PowerShell about_Jobs)

Version history

  1. v4.2.2 GitHub ↗
    Original release notes

    Skills: 41 Scripts: 20 Templates: 5 Rules: 4

Current listing version

3.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 解决开发者长时间运行命令后需手动等待的核心痛点,显著提升工作效率
  • 适用于 npm test、docker build、git push 等高频开发场景,受众广泛
Trigger Precision90/100

Highlights

  • 触发词覆盖多种自然语言变体(notify me when done, desktop notification, alert when done 等)
  • 负例明确排除交互式命令和短命令,边界清晰,误触风险低
Structure and Standards95/100

Highlights

  • Phase/步骤清晰(Detect → Monitor → Notify → Handle edge cases),逻辑完整
  • 包含端到端示例、错误处理表格、反模式清单,frontmatter 完整规范
Execution Reliability90/100

Highlights

  • 多平台通知机制明确(Windows Toast、macOS osascript、Linux notify-send)
  • 覆盖主要异常场景并有回退机制(terminal bell),确保执行鲁棒性
Evidence Verifiability (mean of the first four)90/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

  • Install or fetch external dependencies

    Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.

    Mentioned in main document · lines 48, 51

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.