/coding-productivity:rebase [--no-activate] [--restart]from coding-productivity
Rescores all commits with a configured scoring model into a new versioned series using the Message Batches API, then switches the active series. Use after calibration indicates a rebase is required or when the scoring model or prompt changes.
Ships in coding-productivity. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Switching the scoring model means rescoring everything, never splicing two models into one series. This skill rescores all commits with the model in SCORING_MODEL into new tables commit_scores_v{N} and file_scores_v{N} (N is the next free version), using the Message Batches API at 50% of standard prices. The previous tables are never modified. The active series switches only after the rebase completes and the per-month scored counts are reported. /coding-productivity:analyze and /coding-productivity:score then read and write the new series.
Batches can take up to 24 hours. The script is a resumable state machine: each run advances as far as it can and exits, and state is kept in .coding-productivity/rebase_state.json.
Important: Use AskUserQuestion for every interactive prompt. Never assume answers or skip steps.
The project root is the directory containing .coding-productivity.env. All paths below are relative to this root. If a .coding-productivity/.venv is missing, run python3 scripts/setup_env.py first.
Read .coding-productivity.env. Require SCORING_ENABLED=true, ANTHROPIC_API_KEY and SCORING_MODEL. If any is missing, tell the user to run /coding-productivity:setup and stop.
If .coding-productivity/rebase_state.json exists and its status is not activated, a rebase is already in progress: skip to Step 4 to resume it.
Show the user the model that will score everything (SCORING_MODEL, SCORING_EFFORT, SCORING_MAX_TOKENS) and the active series (see the check in the calibrate skill). If they want a different model, ask them to confirm editing SCORING_MODEL in .coding-productivity.env; that edit is the intended way to start a new series, and the rebase is what makes it safe. Recommend running /coding-productivity:calibrate first if they have not.
If a calibration JSON for this model exists in .coding-productivity/, read its rebase_estimate (batch_usd, eligible_commits) and show it. Otherwise say the cost is unknown until measured, and suggest calibrating first (a rebase of N commits costs roughly N times the per-commit tokens of a sample, at 50% of standard prices).
Show the data classification notice from the score skill (Step 3) if .coding-productivity/.scoring_consent does not exist.
Ask via AskUserQuestion:
This will rescore all {N} commits with {model} through the Batch API{, estimated cost ~${X}}. Existing score tables stay untouched; the active series switches only after the per-month counts are reported and every commit is scored. Proceed?
- Yes, start the rebase
- Yes, but build the new series without activating it (
--no-activate)- No, cancel
cd <project_root> && python3.14 scripts/rebase.py --config .coding-productivity.env [--no-activate] [--wait 540]
--wait 540 keeps polling for up to 9 minutes before exiting, which fits a single tool call. Exit codes:
/loop or by asking again). Do not describe it as monitored unless a re-check is actually scheduled.--no-activate was used.--restart to abandon that rebase (its tables stay in storage).Failed, errored, expired, refused and truncated batch results are retried automatically through the synchronous scorer.
Show the per-month table (eligible commits, previous series, new series, not scored). If commits remain unscored, ask whether to re-run to retry them, or to accept the gap:
cd <project_root> && python3.14 scripts/rebase.py --config .coding-productivity.env --activate-version <N> --force
Only use --force after the user explicitly accepts the gap.
To activate a series built with --no-activate:
cd <project_root> && python3.14 scripts/rebase.py --config .coding-productivity.env --activate-version <N>
Tell the user the active series version, model and prompt version, and that old tables (commit_scores, file_scores, or earlier _v{N} tables) are untouched and can be dropped later if no longer needed. Suggest /coding-productivity:analyze.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub facens/coding-productivity --plugin coding-productivity12 skills in this plugin
/analyzecoding-productivity:analyzeRun interactive productivity analysis on extracted data. Use after extraction to view monthly trends, before/after comparisons, per-author metrics, merge velocity, and category breakdowns./calibratecoding-productivity:calibrateCompare a candidate scoring model with the current one before switching. Rescores a deterministic sample of already-scored commits with both, reports ratios and correlations per quarter, and says COMPARABLE or REBASE REQUIRED. Use when a newer Claude model is available or before changing SCORING_MODEL. Writes nothing to the score tables./Other plugins' skills for the same job