/coding-productivity:dedupe [--dry-run]from coding-productivity
Detects duplicate commits (merges, squashes, cherry-picks, moved code) in extracted git data so analysis avoids double-counting. Run after extraction and scoring, and when new commits arrive.
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.
The same work is often in the commits table more than once: a merge commit repeats the commits it merged, a squash commit repeats its branch, a staging-to-main promotion repeats everything already on staging, a cherry-pick repeats its original, and code imported from another repo or moved to another path is counted again as new. Left in, it inflates totals, and the share grows over time, so it inflates trends too.
This skill finds it with five rules (see the README, "Duplicate work") and records the result. /coding-productivity:analyze then excludes the duplicate commits and discounts moved code. Nothing is deleted: commits, diffs and the score tables are untouched, and the result tables are rebuilt from scratch on every run.
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.
Run via Bash:
python3.14 -c "
import sys; sys.path.insert(0, 'scripts')
from lib.config import Config
from lib.storage import get_storage
cfg = Config()
st = get_storage(cfg)
print(f'COMMITS:{st.count(\"commits\")}')
st.close()
"
If COMMITS:0, tell the user: "No commit data found. Run /coding-productivity:extract first." and stop.
python3.14 scripts/dedupe.py --config .coding-productivity.env [--dry-run]
--dry-run computes and reports without writing. The run reads every commit, merge request and diff in storage, so the rules can compare each commit with all the others. It is not incremental; a run over a large dataset can take several minutes. Show the progress output as it prints.
The script prints the number of excluded commits per rule and the number of files with moved code. Show it to the user.
If it prints a note that merged MRs/PRs carry no merge/squash commit sha, the data was extracted before v0.14: the squash and promotion rules cannot see those MRs yet, and the merge, copy and moved-code rules are unaffected. Tell the user, and offer to re-extract the period so the shas are stored (merge requests are fetched again with extract --since <date> --until <date>, plus --full on GitHub), then run this skill again. Ask via AskUserQuestion:
- Re-extract now
- Continue with merge, copy and moved-code detection only
Tell the user:
Duplicate-work detection is recorded.
/coding-productivity:analyzenow excludes {N} duplicate commits and applies the moved-code discount, and prints anexcluded:line for the selected range. Run this skill again after every extraction:analyzewarns when the commits table changed since the last run.
What SKILL.md sets; muted values are Claude Code's defaults
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./connectcoding-productivity:connectConnect to an existing BigQuery dataset for read-only analysis. Use when you have access to a pre-populated dataset and want to explore results without running extraction./developerscoding-productivity:developersManage the developer roster — review detected bots, find and merge duplicate identities, exclude developers from analysis. Use after extraction to clean up identity data./extractcoding-productivity:extractExtract commits, diffs, and merge/pull requests from configured GitHub or GitLab repositories. Use after setup to populate the local database, or re-run to fetch new data./rebasecoding-productivity:rebaseRescore ALL commits with the configured SCORING_MODEL into a new versioned scoring series using the Message Batches API, then switch the active series. Use after calibrate says REBASE REQUIRED, or whenever the scoring model or prompt changes. Old tables stay untouched.Other plugins' skills for the same job