Claude Code plugins that stream coding-agent sessions to BigQuery in the
BigQuery Agent Analytics
agent_events schema, so you can analyze coding-agent activity alongside your
ADK agents.
This repository is the plugin marketplace (bqaa-tracing) for those plugins:
their sources, their tests, and the built copies the marketplace serves.
| Plugin | What it is | Docs |
|---|---|---|
bigquery-agent-analytics-mod |
Early access. An in-process mod, written in TypeScript, for Claude Code CLI v2.1.296 or newer. It records sessions, turns, model requests and tool calls inside the CLI and writes them to BigQuery from the background, so no hook waits on BigQuery. | plugins/claude_code_mod: README, Quickstart |
bigquery-agent-analytics-tracing |
Claude Code hook traces. Hook scripts (bash) call a vendored copy of the SDK's Python tracing package, which spools each event and writes it to BigQuery. | plugins/claude_code: README |
Run one tracer per table. The two plugins write the same events, so with both on, every event is written twice.
Add the marketplace, then install a plugin from it. For the mod:
claude plugin marketplace add GoogleCloudPlatform/BigQuery-Agent-Analytics-Plugins
claude plugin install bigquery-agent-analytics-mod@bqaa-tracing \
--config project=my-gcp-project --config dataset=agent_analyticsInside an open claude session, run /reload-plugins (or start a new session)
after installing. The BigQuery dataset has to exist before the mod can write;
setup.sh creates it, and the
Quickstart walks through the whole
setup.
For the tracing plugin instead, run
claude plugin install bigquery-agent-analytics-tracing@bqaa-tracing, then
follow its README to set
the BigQuery destination and runtime dependencies.
Notes:
- Add the marketplace with the
<owner>/<repo>form, not with a URL tomarketplace.json: the catalog's pluginsourcepaths are relative, so they resolve only in a Git checkout. - To fetch only the catalog and the built plugin copies, add
--sparse .claude-plugin plugins/claude_code_distto theclaude plugin marketplace addcommand. - Organization-wide deployment of the mod is covered in
docs/managed-settings.md.
bigquery-agent-analytics-mod: Passing--config project=...(or settingprojectin/config) saves"project"in~/.claude/settings.json(pluginConfigs), which takes precedence overBQAA_PROJECT_IDandgcloud config set project. To switch toNEW_PROJECT, runBQAA_PROJECT_ID=NEW_PROJECT BQAA_DATASET=agent_analytics ./plugins/claude_code_mod/setup.sh, updateprojectvia/configorclaude plugin install bigquery-agent-analytics-mod@bqaa-tracing --config project=NEW_PROJECT --config dataset=agent_analytics(or set"project": ""in~/.claude/settings.jsonto fall back toBQAA_PROJECT_ID), and run/reload-plugins(see Changing the GCP project or dataset).bigquery-agent-analytics-tracing: Provision the dataset andagent_eventstable in the new project, updateBQAA_PROJECT_IDin~/.claude/settings.json("env"),.claude/settings.local.json, or your shell profile (~/.zshrc/~/.bashrc), start a new session, and verify with/bqaa-setup(see Switching Google Cloud projects).
.claude-plugin/marketplace.json the bqaa-tracing catalog
plugins/claude_code_mod/ mod source, tests, SQL, scripts and docs
plugins/claude_code/ tracing plugin source: manifest, hooks, command, docs
plugins/claude_code_dist/ built copies the catalog serves
bigquery-agent-analytics-mod/ built from plugins/claude_code_mod
bigquery-agent-analytics-tracing/ built from the SDK repository, per release
scripts/ checks that span the whole repository
.github/ workflows (Repo CI, Mod CI, Tracing CI, the mod release),
issue and pull request templates
plugins/claude_code_dist/README.md
explains how each built copy is produced and kept in step with its source.
The BigQuery Agent Analytics SDK
is the consumption layer for the same agent_events tables: trace
reconstruction, evaluation and observability dashboards. These plugins are the
producing side for Claude Code.
The SDK repository also holds the Python package behind the tracing plugin
(producers/). The tracing plugin's built copy in plugins/claude_code_dist/
comes from that package's tracing-vX.Y.Z releases there. The mod is
developed and released here (mod-vX.Y.Z).
The mod's offline checks are the ones Mod CI runs. They need a full clone with
tags (git fetch --unshallow --tags on a shallow one), Node 24 or newer, and
Python 3 with DuckDB:
cd plugins/claude_code_mod
bash build_dist.sh --check
bash tests/build_dist.test.sh
bash tests/setup.test.sh
bash tests/version.test.sh
node tests/reload.test.mjs
npm ci --ignore-scripts --prefix tests
./tests/node_modules/.bin/tsc -p tsconfig.ci.json --noEmit
node --import ./tests/shim/register.mjs --test --test-concurrency=1 tests/*.test.ts tests/state-contract/state.contract.ts
python3 -m venv .venv && .venv/bin/pip install duckdb==2.0.0
.venv/bin/python tests/views.test.py
.venv/bin/python tests/queries.test.py
python3 tests/scripts.test.pyRepository-wide checks need only Python 3.9 or newer, and ShellCheck for the
last command: repository hygiene (the marketplace catalog against each plugin
manifest, links and anchors in the Markdown, stale references, shell syntax,
working notes and license headers), the tests for the mod's scripts/, and
ShellCheck over every shell script. Run them from the repository root:
python3 scripts/check_repo_hygiene.py
python3 scripts/check_repo_hygiene.test.py
python3 plugins/claude_code_mod/tests/scripts.test.py
git ls-files -z '*.sh' | xargs -0 shellcheck -S warningRepo CI runs them on every pull request and
every push to main. The tracing plugin's offline parity, hook and drainer
tests run on Python 3.10 through 3.14 in
Tracing CI:
python3 plugins/claude_code/tests/tracing_plugin.test.pyThe served copy in plugins/claude_code_dist/bigquery-agent-analytics-mod is
updated by plugins/claude_code_mod/sync_dist.sh
on each tagged mod-vX.Y.Z release (see
Where a change goes). The mod's
README lists the remaining checks,
which need the host CLI or a Google Cloud project. The tracing plugin's Python
package lives in the SDK repository; offline parity and hook tests run here in
Tracing CI.
- Mod: push a
mod-vX.Y.Ztag whose version is the one inplugins/claude_code_mod/.claude-plugin/plugin.json. Therelease-mod.ymlworkflow verifies it and drafts a GitHub release (initially marked pre-release) holdingbigquery-agent-analytics-mod-X.Y.Z.tar.gzandSHA256SUMS. Once published (for examplemod-v0.1.0, published as Latest), the served copy is synced from that archive withplugins/claude_code_mod/sync_dist.shand the merge commit taggedmod-dist-vX.Y.Z, the ref for organizations that register this repository as their marketplace. - Tracing plugin: released from the SDK repository as
tracing-vX.Y.Z; its built copy is committed here after each release.
Contributions are welcome. See CONTRIBUTING.md for the Contributor License Agreement and the review process, and CODE_OF_CONDUCT.md for how we work together. To report a security issue, see SECURITY.md.
Apache License 2.0; see LICENSE.
These plugins write data to Google BigQuery. Use of Google Cloud services, including BigQuery, is subject to the Google Cloud Terms of Service. See also the Google Privacy Policy.
This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program.