aitask-stats
Calculate and display statistics of AI task completions (daily, global, per-label).
SKILL.md.claude/skills/aitask-stats/SKILL.md
GitHubUsage
Run the statistics script:
./.aitask-scripts/aitask_stats.sh [OPTIONS]
Options
-d, --days N- Show daily breakdown for last N days (default: 7)-w, --week-start DAY- First day of week: mon, sun, tue, etc. (default: Monday)-v, --verbose- Show individual task IDs in daily breakdown--csv [FILE]- Export raw data to CSV (default: aitask_stats.csv)--backlog-weeks N- Weeks of backlog history to render (default: 8, max: 99)--csv-backlog [FILE]- Export the weekly backlog series to CSV (default: aitask_backlog.csv)-h, --help- Show usage information
Examples
Basic statistics (last 7 days):
./.aitask-scripts/aitask_stats.sh
Extended daily view (14 days):
./.aitask-scripts/aitask_stats.sh --days 14
Verbose output with task names:
./.aitask-scripts/aitask_stats.sh -v
Export to CSV for graphing in LibreOffice:
./.aitask-scripts/aitask_stats.sh --csv
Statistics Provided
- Summary - Total completions, 7-day and 30-day counts
- Backlog Level - Weekly count of open tasks per category, with follow-up / genuine subtotals,
TOTAL OPEN, and a parent/child split - Backlog Net Flow - Weekly arrivals minus departures per category, with ARRIVALS / DEPARTURES / NET rows
- Daily Breakdown - Completions per day with optional task IDs
- Day of Week Stats - Current week counts + 30d/all-time averages per weekday
- Pipeline Timing - Average time in the implement and review/merge phases, for gated tasks
- Label Weekly Trends - Per-label completions for last 4 weeks (W-3, W-2, W-1, This Week)
- Label Day-of-Week Breakdown - Per-label averages by day of week
- Task Type Weekly Trends - Parent/child and feature/bug trends for last 4 weeks
- Features/Bugs by Label Trends - Combined label + issue type weekly trends
- Code Agent Weekly Trends - Weekly completions split by code agent
- LLM Model Weekly Trends - Weekly completions split by normalized LLM model
- Verified Model Rankings - Model scores per skill, aggregated across providers
The backlog sections cover the last 8 weeks by default (--backlog-weeks changes
the horizon). Their columns run chronologically with the current week last; in the
net-flow table that final column is a partial week, marked Now*.
Export Format
CSV Export (--csv): one row per completed task, with columns:
- date, day_of_week, week_offset, task_id, labels, issue_type, task_type, implemented_with, codeagent, llm_model, created_at, category
Backlog Export (--csv-backlog): the weekly backlog series, with columns:
- week_ending, category, open, arrived, departed, net
One row per category per week, oldest week first, zero cells included. category
holds raw namespaced keys (type:feature, kind:manual_verification) and only real
categories -- no subtotal or TOTAL OPEN rows for a pivot to double-count. Open
tasks are not rows in the --csv table, so the backlog level is not reproducible
from it.
Open in LibreOffice Calc to create custom charts and pivot tables for trend analysis.
Importing CSV in LibreOffice Calc
- Open LibreOffice Calc
- File -> Open -> Select the CSV file
- In the import dialog:
- Character set: UTF-8
- Separator: Comma
- Check "Quoted field as text"
- Click OK
Creating Charts
- Select the data range
- Insert -> Chart
- Choose chart type (Line, Bar, or XY Scatter for trends)
- Follow the wizard to customize
Pivot Tables for Analysis
- Select all data
- Insert -> Pivot Table
- Drag fields:
- Row:
week_offsetorday_of_week - Column:
labelsorissue_type - Data: Count of
task_id
- Row:
- Creates summary table for trends