bq-analytics-flags

A feature-flag system for projects using bq-analytics, with flags stored in Vercel Edge Config and exposure events tracked in an analytics event stream.

In plain words
What is it for?
Use it to add or operate feature flags, manage rollouts and allowlists, create user groups from BigQuery, and evaluate flag impact.
Why use it?
It lets teams turn features on or off, limit releases to a percentage or user list, and measure who saw each flag.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/johnkueh/bq-analytics/flags
Any agent
npx skills add johnkueh/bq-analytics --skill flags
Clone the repo
git clone --depth 1 https://github.com/johnkueh/bq-analytics

Made for: Claude Code, Codex.

Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,433 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00094 $0.02433
Opus 5 $0.00047 $0.01216
Sonnet 5 $0.00019 $0.00487
Haiku 4.5 $0.00009 $0.00243

Measured 2d ago against content hash ba9f9bc68c89, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

bq-analytics-flags scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

claude-skills/flags/SKILL.md · 267 lines

How it starts

The opening of the file, as written. The whole thing — 267 lines — stays where its author put it; the contents beside it link to each section on GitHub.

bq-analytics feature flags

Flags live in a single Vercel Edge Config item under the key flags. The SDK reads at runtime via edgeConfigSource(); you mutate via the bq-flags CLI shipped in the package. Propagation is sub-second.

{
  "new-checkout":   { "on": true, "rollout": 0.5 },
  "ai-suggestions": { "on": true, "users": ["u_john", "u_beta1"] },
  "kill-old-flow":  { "on": false }
}

Detect current state

Before doing anything, figure out which path you're on:

Signal What it means Where to start
bq-analytics in package.json deps and EDGE_CONFIG= in .env.local fully wired jump to Operate
bq-analytics in deps, no EDGE_CONFIG= events wired, flags not yet Step 1 below
neither greenfield run /bq-analytics-install first; it handles flags as Phase 3
grep -E '"bq-analytics"' package.json && echo "sdk present"
grep -E '^EDGE_CONFIG=' .env.local 2>/dev/null && echo "edge config provisioned"

Step 1 — Add the flag dependency

pnpm add bq-analytics @vercel/edge-config
# or: npm i / yarn add

@vercel/edge-config is an optional peer of bq-analytics. Only needed when using edgeConfigSource() server-side; browser/RN clients use httpSource() and don't need it.

Step 2 — Provision Edge Config

./node_modules/bq-analytics/scripts/setup-edge-config.sh

What it does (idempotent — safe to re-run):

  1. vercel link if not already linked
  2. Creates an Edge Config store named bq-analytics-flags (or reuses one with that slug)
  3. Initializes the flags key as {}
  4. Mints a read token, pushes EDGE_CONFIG env var to Vercel Production
  5. vercel env pull .env.local --environment production so local dev can read it

Note: only Production is set automatically (CLI quirk on preview/dev envs). For full env propagation, set VERCEL_TOKEN first, or replicate via the Vercel dashboard.

After this, bq-flags is available via pnpm exec bq-flags (or ./node_modules/.bin/bq-flags).

Read the full file on GitHub · 267 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 267 lines · 94 tokens per session scan A ba9f9bc68c89

Subscribe to this mod's changes

bq-analytics-flags is a skill published in the GitHub repository johnkueh/bq-analytics (5 stars, last pushed 2mo ago), licensed MIT. It adds 94 tokens to every session and 2,433 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

agent-eval

Executes high-performance agent evaluations, multi-turn UserSim simulations, and declarative metric grading aligned with google/agents-cli and the Quality Flywheel. Publishes benchmark artifacts to the GCS Evaluation Registry, executes automated head-to-head delta comparisons (--compare-to), and optimizes system…

GoogleCloudPlatform/professional-services · 136 tokens

composio

Route and complete Composio work across Composio For You and Composio Platform. Use when the user mentions Composio; wants an agent to use apps such as Gmail, Slack, GitHub, Notion, Calendar, or Linear; needs first-time setup, an SDK or MCP integration, CLI operation, migration guidance, current documentation, or help…

elie222/rakazo · 84 tokens

data-parity

Validate that two tables or query results are identical — or diagnose exactly how they differ. Discover schema, identify keys, profile cheaply, then diff. Use for migration validation, ETL regression, and query refactor verification.

AltimateAI/altimate-code · 48 tokens

dbt-analyze

Analyze downstream impact of dbt model changes using column-level lineage and the dependency graph. Use when evaluating the blast radius of a change before shipping. Powered by altimate-dbt.

AltimateAI/altimate-code · 41 tokens

dbt-docs

Document dbt models and columns in schema.yml with business context — model descriptions, column definitions, and doc blocks. Use when adding or improving documentation for discoverability. Powered by altimate-dbt.

AltimateAI/altimate-code · 45 tokens

dbt-pr-review

Cloudflare-style AI code review for dbt/SQL pull requests. Produces a signed APPROVE/COMMENT/REQUESTCHANGES verdict where every blocking finding is backed by a deterministic engine call — column-lineage blast radius, query equivalence, PII classification, and A–F grade. Use to review a dbt PR or the working-tree…

AltimateAI/altimate-code · 79 tokens