/coding-productivity:extract [date range, e.g. "February 2026", "2025-06 to 2025-12", or repo slug "owner/repo"]from coding-productivity
Extracts commits, diffs, and pull/merge requests from GitHub or GitLab repositories into local storage. Run after setup to populate the database or re-run to fetch new data.
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.
This skill runs the extraction pipeline to pull commits, diffs, and merge/pull requests from the configured repositories into storage.
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.
Use the Read tool to attempt reading .coding-productivity.env in the project root.
If the file does not exist or is empty:
No configuration found. Run
/coding-productivity:setupfirst to configure the plugin.
Stop here. Do not proceed.
Read the STORAGE_MODE value from .coding-productivity.env.
If STORAGE_MODE=readonly:
Error: Cannot extract into a read-only dataset. Run
/coding-productivity:setupto configure a writable backend.
Stop here. Do not proceed.
Check if scripts/.venv exists. If it does not, run via Bash:
python3.14 scripts/setup_env.py
Report the output. If it fails, show the error and suggest troubleshooting steps.
Read the PLATFORM value from .coding-productivity.env. It will be either github or gitlab.
Extraction is incremental by default — the scripts start each repo from its own latest stored commit (a repo whose last run was interrupted resumes that run's window) and only fetch newer data. A configured repo with no stored commits starts from the latest commit in storage; extract it alone with --full for its history. On first run (empty database), all history is fetched.
If the user explicitly provides a date range (e.g., /coding-productivity:extract February 2026), parse it and pass --since/--until. If the user asks for a full re-extraction, add --full.
Based on the platform, run the appropriate extraction script via Bash.
GitHub:
scripts/.venv/bin/python3.14 scripts/extract_github.py --config .coding-productivity.env [--since YYYY-MM-DD] [--until YYYY-MM-DD] [--full]
GitLab:
scripts/.venv/bin/python3.14 scripts/extract_gitlab.py --config .coding-productivity.env [--since YYYY-MM-DD] [--until YYYY-MM-DD] [--full]
The scripts print progress to stdout. Display this output to the user as it runs. If the script exits with a non-zero code, display the error and stop.
After extraction completes, run bot detection on all developers found in storage. Run via Bash:
scripts/.venv/bin/python3.14 -c "
from scripts.lib.config import Config
from scripts.lib.storage import get_storage
from scripts.lib.bots import detect_bots, load_overrides
cfg = Config()
load_overrides(cfg.BOT_OVERRIDES)
storage = get_storage(cfg)
# Get all unique developers
rows = storage.query('SELECT DISTINCT author_name, author_email FROM commits')
developers = [{'name': r['author_name'], 'email': r['author_email']} for r in rows]
# Detect bots
bots = detect_bots(developers)
# Check which are already excluded
excluded = set(cfg.EXCLUDED_DEVELOPERS)
new_bots = [b for b in bots if b['email'] not in excluded and b['name'] not in excluded]
if new_bots:
print('NEW_BOTS_FOUND')
for b in new_bots:
print(f\" {b['name']} <{b['email']}>\")
else:
print('NO_NEW_BOTS')
storage.close()
"
Present the detected bots and ask:
The following accounts were detected as bots:
- dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- github-actions[bot] [email protected] ...
Would you like to exclude them from analysis?
- Yes, exclude all listed bots
- Let me select which ones to exclude
- No, do not exclude any
If "Yes" or selective exclusion: update EXCLUDED_DEVELOPERS in .coding-productivity.env by appending the selected bot names/emails (comma-separated) to the existing value. Preserve any entries already present.
After updating, set permissions via Bash:
chmod 600 .coding-productivity.env
Display:
No new bot accounts detected.
Run via Bash to gather summary statistics:
scripts/.venv/bin/python3.14 -c "
from scripts.lib.config import Config
from scripts.lib.storage import get_storage
cfg = Config()
storage = get_storage(cfg)
commit_count = storage.count('commits')
rows = storage.query('SELECT MIN(committed_date) AS earliest, MAX(committed_date) AS latest FROM commits')
r = rows[0] if rows else {}
print(f'Repos extracted: {len(cfg.REPOS)}')
print(f'Total commits: {commit_count}')
print(f'Date range: {r.get(\"earliest\", \"N/A\")} to {r.get(\"latest\", \"N/A\")}')
storage.close()
"
Display:
=== Extraction Complete ===
Repos extracted: 5
Total commits: 8,432
Date range: 2023-06-01 to 2025-03-25
===============================
Check the SCORING_ENABLED value from .coding-productivity.env.
If SCORING_ENABLED=true:
What would you like to do next?
- Run /coding-productivity:score to add AI-powered analysis
- Run /coding-productivity:dedupe to detect duplicate work (recommended after every extraction, before analyze)
- Run /coding-productivity:analyze to view productivity metrics
- Nothing for now
If SCORING_ENABLED is false or not set:
What would you like to do next?
- Run /coding-productivity:dedupe to detect duplicate work (recommended after every extraction, before analyze)
- Run /coding-productivity:analyze to view productivity metrics
- Nothing for now
If the user chooses an option, tell them to run the corresponding command.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
git-extraction, repository-data, commit-history, github, gitlab
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