🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub✦ BytesAgain

Stopwatch

by @ckchzh

Run stopwatch, timer, and lap tracking with precision in terminal. Use when timing tasks, checking durations, running countdowns, analyzing splits.

Versionv2.0.0
Downloads378
Installs2
TERMINAL
clawhub install stopwatch

πŸ“– About This Skill


name: Stopwatch description: "Run stopwatch, timer, and lap tracking with precision in terminal. Use when timing tasks, checking durations, running countdowns, analyzing splits." version: "2.0.0" author: "BytesAgain" homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills tags: ["timer","stopwatch","countdown","time","lap"] categories: ["Developer Tools", "Utility"]

Stopwatch

Stopwatch v2.0.0 β€” a versatile utility toolkit for logging, tracking, and managing time-related entries from the command line. Each command logs timestamped entries to individual log files, provides history viewing, summary statistics, data export, and full-text search across all records.

Commands

Run stopwatch [args] to use.

| Command | Description | |---------|-------------| | run | Log a run entry (or view recent run entries if no input given) | | check | Log a check entry (or view recent check entries if no input given) | | convert | Log a convert entry (or view recent convert entries if no input given) | | analyze | Log an analyze entry (or view recent analyze entries if no input given) | | generate | Log a generate entry (or view recent generate entries if no input given) | | preview | Log a preview entry (or view recent preview entries if no input given) | | batch | Log a batch entry (or view recent batch entries if no input given) | | compare | Log a compare entry (or view recent compare entries if no input given) | | export | Log an export entry (or view recent export entries if no input given) | | config | Log a config entry (or view recent config entries if no input given) | | status | Log a status entry (or view recent status entries if no input given) | | report | Log a report entry (or view recent report entries if no input given) | | stats | Show summary statistics across all log files (entry counts, data size) | | export | Export all data in json, csv, or txt format | | search | Full-text search across all log entries (case-insensitive) | | recent | Show the 20 most recent entries from history.log | | help | Show usage help | | version | Show version (v2.0.0) |

How It Works

Every command (run, check, convert, analyze, etc.) works the same way:

  • With arguments: Saves a timestamped entry (YYYY-MM-DD HH:MM|input) to .log and writes to history.log.
  • Without arguments: Displays the 20 most recent entries from that command's log file.
  • This gives you a lightweight, file-based logging system for any kind of time-tracking workflow.

    Data Storage

    All data is stored locally in ~/.local/share/stopwatch/:

    ~/.local/share/stopwatch/
    β”œβ”€β”€ run.log          # Run entries (timestamp|value)
    β”œβ”€β”€ check.log        # Check entries
    β”œβ”€β”€ convert.log      # Convert entries
    β”œβ”€β”€ analyze.log      # Analyze entries
    β”œβ”€β”€ generate.log     # Generate entries
    β”œβ”€β”€ preview.log      # Preview entries
    β”œβ”€β”€ batch.log        # Batch entries
    β”œβ”€β”€ compare.log      # Compare entries
    β”œβ”€β”€ export.log       # Export entries
    β”œβ”€β”€ config.log       # Config entries
    β”œβ”€β”€ status.log       # Status entries
    β”œβ”€β”€ report.log       # Report entries
    β”œβ”€β”€ history.log      # Master activity log
    └── export.     # Exported data files
    

    Override the data directory by setting STOPWATCH_DIR (if supported) or editing the DATA_DIR variable in the script.

    Requirements

  • Bash (4.0+)
  • Standard POSIX utilities: date, wc, du, tail, grep, sed, cat
  • No external dependencies β€” works on any Linux or macOS system out of the box
  • When to Use

    1. Tracking timed activities β€” Log start/stop times for tasks, pomodoro sessions, or work intervals throughout the day. 2. Comparing performance across runs β€” Use compare and analyze to log different attempts, then search or stats to review trends. 3. Batch processing records β€” Use batch to log bulk operations, then export json to feed results into other tools. 4. Quick status checks in automation β€” Integrate stopwatch status or stopwatch stats into cron jobs or CI pipelines for operational dashboards. 5. Generating reports from logged data β€” Use report to log milestones, then export csv to create spreadsheets or feed into reporting tools.

    Examples

    # Log a run entry
    stopwatch run "Morning sprint: 25 minutes"

    Check recent activity

    stopwatch recent

    View all run entries

    stopwatch run

    Search for a specific term across all logs

    stopwatch search "sprint"

    Get summary statistics

    stopwatch stats

    Export everything to JSON

    stopwatch export json

    Export to CSV for spreadsheet import

    stopwatch export csv

    Output

    All commands output to stdout. Redirect to a file if needed:

    stopwatch stats > report.txt
    stopwatch export json  # writes to ~/.local/share/stopwatch/export.json
    


    Powered by BytesAgain | bytesagain.com | hello@bytesagain.com

    ⚑ When to Use

    TriggerAction
    2. **Comparing performance across runs** β€” Use `compare` and `analyze` to log different attempts, then `search` or `stats` to review trends.
    3. **Batch processing records** β€” Use `batch` to log bulk operations, then `export json` to feed results into other tools.
    4. **Quick status checks in automation** β€” Integrate `stopwatch status` or `stopwatch stats` into cron jobs or CI pipelines for operational dashboards.
    5. **Generating reports from logged data** β€” Use `report` to log milestones, then `export csv` to create spreadsheets or feed into reporting tools.

    πŸ’‘ Examples

    # Log a run entry
    stopwatch run "Morning sprint: 25 minutes"

    Check recent activity

    stopwatch recent

    View all run entries

    stopwatch run

    Search for a specific term across all logs

    stopwatch search "sprint"

    Get summary statistics

    stopwatch stats

    Export everything to JSON

    stopwatch export json

    Export to CSV for spreadsheet import

    stopwatch export csv