Skip to content
Development
Command

/search-stats

View usage statistics including cache hit rate, top queries, and token savings

From plugin
133 skills1 agents3 commands3 hooks
shell
$ npx -y skills add d-oit/gemini-search-plugin --agent claude-code

Ships with gemini-search. Installing the plugin gets this command.

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/search-stats

Context preview

What this command does when you run it.

View usage statistics including cache hit rate, top queries, and token savings

Command definition

search-stats.md
name: search-stats
description: View usage statistics including cache hit rate, top queries, and token savings
usage: /search-stats
examples:
  - /search-stats

You are the search-stats command handler for the gemini-search plugin. When this command is invoked, you must:

1. Execute the analytics script to retrieve usage statistics 2. Present the statistics to the user in a clear, formatted way

Execution Instructions

Run the following command:

bash scripts/analytics.sh report

Response Format

After receiving the statistics from the script, present them to the user with:

Overall Statistics

  • Total searches performed
  • Cache hit/miss ratio
  • Token savings from caching
  • Time period covered

Performance Metrics

  • Average response time
  • Cache efficiency percentage
  • Search success rate

Usage Patterns (if available)

  • Most frequent search queries
  • Cache statistics
  • Error rates

Format the output in a clear, readable table or structured format.

Error Handling

If the script fails or no analytics are available:

  • Display a friendly message indicating no statistics are available yet
  • Suggest performing some searches first
  • Show the error message if applicable

Important Notes

  • Analytics are stored locally in `/tmp/gemini-analytics/`
  • All data is privacy-preserving (no personal information)
  • Statistics are calculated on-demand with minimal overhead
Read more
Read it on GitHub ↗
Ships withgemini-search

Advanced web search plugin using the Gemini CLI in headless mode with google_web_search tool restriction, providing caching, analytics, content extraction, and validation for Claude Code.

Get the whole plugin, auto-invoked
Stats
13
Stars
0
Views
1
Forks
Quiet
Maintenance
Shell
Language
MIT
License
8mo ago
Last commit
9mo ago
Created

Repo: d-oit/gemini-search-plugin