/coding-productivity:connectfrom coding-productivity
Connects to a pre-populated BigQuery dataset in read-only mode for analysis without extraction. Walks through GCP project ID, dataset name, and service account key setup.
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 connects the plugin to a pre-populated BigQuery dataset in read-only mode, allowing analysis without extraction.
Important: Use AskUserQuestion for every interactive prompt. Never assume answers or skip steps.
The project root is the directory containing .coding-productivity.env (or the current working directory for fresh setups). All paths below are relative to this root.
Ask the user for the following, one at a time:
GCP Project ID
What is the GCP project ID? (e.g.,
my-project-123)
BigQuery Dataset Name
What is the BigQuery dataset name? (e.g.,
coding_productivity)
Service Account JSON Path
Provide the path to the service account JSON key file.
Validate the file exists using the Read tool. If it does not exist, show the error and ask again.
Check whether the Python venv exists. If scripts/.venv does not exist, run via Bash:
python3.14 scripts/setup_env.py
Then install the BigQuery client library in the venv if not already present:
scripts/.venv/bin/pip install google-cloud-bigquery
Run via Bash:
scripts/.venv/bin/python3.14 -c "
import os, sys
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = '<SERVICE_ACCOUNT_PATH>'
from google.cloud import bigquery
client = bigquery.Client(project='<GCP_PROJECT_ID>')
try:
rows = list(client.query('SELECT COUNT(*) AS cnt FROM \`<GCP_PROJECT_ID>.<BQ_DATASET>.commits\`').result())
print(f'COMMIT_COUNT={rows[0][\"cnt\"]}')
except Exception as e:
print(f'ERROR={e}', file=sys.stderr)
sys.exit(1)
"
Replace <SERVICE_ACCOUNT_PATH>, <GCP_PROJECT_ID>, and <BQ_DATASET> with the user's values.
Display the error clearly, then suggest:
BigQuery Data Viewer and BigQuery Job User roles on the project.Ask the user to correct the issue and try again. Do not proceed until validation succeeds.
On successful connection, fetch a summary. Run via Bash:
scripts/.venv/bin/python3.14 -c "
import os
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = '<SERVICE_ACCOUNT_PATH>'
from google.cloud import bigquery
client = bigquery.Client(project='<GCP_PROJECT_ID>')
ds = '<GCP_PROJECT_ID>.<BQ_DATASET>'
rows = list(client.query(f'SELECT COUNT(*) AS cnt, MIN(committed_date) AS earliest, MAX(committed_date) AS latest, COUNT(DISTINCT author_email) AS authors FROM \`{ds}.commits\`').result())
r = rows[0]
print(f'Commits: {r[\"cnt\"]}')
print(f'Date range: {r[\"earliest\"]} to {r[\"latest\"]}')
print(f'Unique authors: {r[\"authors\"]}')
"
Display the result:
=== BigQuery Dataset Connected (Read-Only) ===
Project: <GCP_PROJECT_ID>
Dataset: <BQ_DATASET>
Commits: 12,345
Date range: 2023-01-15 to 2025-03-20
Unique authors: 42
===================================================
Write (or update) .coding-productivity.env with these values:
STORAGE_BACKEND=bigquerySTORAGE_MODE=readonlyGCP_PROJECT_ID=<user value>BQ_DATASET=<user value>GOOGLE_APPLICATION_CREDENTIALS=<user value>If .coding-productivity.env already exists, preserve all other keys. Only overwrite the storage-related keys listed above.
After writing, set permissions via Bash:
chmod 600 .coding-productivity.env
Ask:
Connection established. Would you like to explore the data now?
- Yes, run /coding-productivity:analyze
- No, I will do it later
If "Yes", tell the user to run /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