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.
npx agentmods add commands/openshift-eng/ai-helpers/analyze-usagegit clone --depth 1 https://github.com/openshift-eng/ai-helpersWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/openshift-eng/ai-helpers/analyze-usage)<a href="https://agentmods.dev/commands/openshift-eng/ai-helpers/analyze-usage"><img src="https://agentmods.dev/badge/commands/openshift-eng/ai-helpers/analyze-usage.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00009 | $0.01839 |
| Opus 5 | $0.00005 | $0.00920 |
| Sonnet 5 | $0.00002 | $0.00368 |
| Haiku 4.5 | $0.00001 | $0.00184 |
Grade A, and why
analyze-usage 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 4d 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- analyze-usage — 95% identical, 8 lines differ
How it starts
The opening of the file, as written. The whole thing — 219 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Name
bigquery:analyze-usage
Synopsis
/bigquery:analyze-usage <project-id> <timeframe>
/bigquery:analyze-usage openshift-ci-data-analysis "24 hours"
/bigquery:analyze-usage my-project "7 days"
Description
The analyze-usage command provides comprehensive analysis of BigQuery usage patterns, costs, and query performance for a given project. It identifies expensive queries, heavy users, and provides actionable optimization recommendations.
This command helps answer questions like:
- Which users or service accounts are consuming the most data?
- What are the most expensive queries?
- Which query patterns are running most frequently?
- How can we reduce BigQuery costs?
- Are we over any usage thresholds?
The analysis includes:
- Total usage summary (queries, data scanned, estimated costs)
- Usage breakdown by user/service account
- Per-user deep dive analysis for top 2-3 users
- Top individual queries by cost
- Query pattern analysis to identify optimization opportunities
- Specific, actionable optimization recommendations
- Optional markdown report generation
Implementation
This command uses the bigquery:analyze-usage skill to perform the analysis.
Prerequisites
- Google Cloud SDK (
bqcommand-line tool) must be installed - User must have BigQuery read access to the project
- User must be authenticated (
gcloud auth login)
Steps
-
Parse and Validate Arguments:
- If project-id is missing: Use AskUserQuestion to prompt for it
- If timeframe is missing: Use AskUserQuestion to prompt for it (options: "1 hour", "6 hours", "24 hours", "7 days", "30 days")
- Parse timeframe into hours (e.g., "24 hours" → 24, "7 days" → 168)
-
Invoke the analyze-usage Skill:
Use the Skill tool to invoke "bigquery:analyze-usage"The skill will handle all the data collection and analysis.
-
Present Results: The skill returns a comprehensive report. Present it to the user in a clear, readable format with:
- Executive summary at the top
- Tables for user usage and top queries
- Per-user deep dive for top 2-3 users showing their specific query patterns
- Detailed query pattern analysis
- Prioritized optimization recommendations
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.
- 4d ago First seen · 219 lines · 9 tokens per session scan A 2f93d44be52e
analyze-usage is a command published in the GitHub repository openshift-eng/ai-helpers (114 stars, last pushed yesterday), licensed Apache-2.0. It adds 9 tokens to every session and 1,839 once invoked, about $0.0000 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-30.
Other commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.