agentleFS
psyducklerpsyduckler/aeo-skills/aeo-prompt-frequency-analyzer/SKILL.md

aeo-prompt-frequency-analyzer

Skill13 starsChanged 6 months agoMITView on GitHub

Analyze what search queries Gemini uses when answering a prompt, by running it multiple times with Google Search grounding and reporting frequency distribution. Use when investigating AEO query patterns, understanding how AI models search the web for a topic, or studying the probabilistic nature of AI-triggered search queries.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run a prompt N times against Gemini with Google Search grounding enabled.

    line 8
  2. Very specific:

    Run from the skill directory.

    line 20
  3. Distinctive:

    Every search query is automatically classified by intent:

    line 40
  4. Distinctive:

    Use intent data to understand what kind of content enters the recurring retrieval set.

    line 59
  5. Distinctive:

    If 60% of queries are commercial, the model is searching for comparison content — and that's the content type you need to create to enter …

    line 65
  6. Very specific:

    Use --output json for programmatic consumption

    line 76

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Prompt Frequency Analyzer

Run a prompt N times against Gemini with Google Search grounding enabled. Collect and report the frequency of search queries Gemini generates across all runs.

Why Gemini 3 Flash? This is the model that powers Google Search AI Mode and AI Overviews — the most important answer engine for AEO. Running prompts through Gemini 3 Flash with grounding simulates what Google's AI actually does when users ask questions. 20 samples provides reliable frequency distribution for directional insights.

The Retrieval Framework: Influence happens at retrieval, not inside the model. You can't edit a model's training data — but you can enter the "candidate set" the model selects from when it searches the web. Gemini is search-first: it fires real Google Search queries before nearly every answer, making it more influenceable than GPT. This tool reveals the recurring retrieval set — the queries, sources, and themes Gemini consistently draws from. Understanding query frequency is the first step to entering that set.

Usage

GEMINI_API_KEY="$GEMINI_API_KEY" python3 scripts/analyze.py "your prompt here" [--runs 20] [--model gemini-3-flash-preview] [--concurrency 5] [--output text|json]

Run from the skill directory. Resolve scripts/analyze.py relative to this SKILL.md.

Options

  • --runs N — Number of times to run the prompt (default: 20; 20 samples gives good directional signal)
  • --model NAME — Gemini model to use (default: gemini-3-flash-preview — the model powering Google AI Overviews)
  • --concurrency N — Max parallel API calls (default: 5; keep ≤5 to avoid rate limits)
  • --output text|json — Output format (default: text)

Output

Reports for each unique search query:

  • Frequency percentage (how many runs used that query)
  • Raw count
  • Intent classification — each query is classified as informational, commercial, navigational, or transactional
  • Intent distribution summary — breakdown of query intents across all unique queries
  • Top web sources referenced

Intent Classification

Every search query is automatically classified by intent:

  • informational — knowledge-seeking queries ("what is X", "how does X work", "X explained")
  • commercial — evaluation/comparison queries ("best X", "X vs Y", "top X for", "X review")
  • navigational — brand/site-specific queries (contains domain names, "X login", "X website")
  • transactional — purchase/action queries ("buy X", "X discount", "X free trial", "download X")

Example output:

Search Query Frequency:
  85% (17/20) [commercial] — best seo tools 2026
  60% (12/20) [informational] — how seo tools work
  40% (8/20) [navigational] — semrush.com features
  20% (4/20) [transactional] — seo tools free trial

Intent Distribution:
  45% informational, 30% commercial, 15% navigational, 10% transactional

Use intent data to understand what kind of content enters the recurring retrieval set. Each intent type maps to a content format the model searches for:

  • informational → explanatory/educational content (guides, explainers)
  • commercial → comparison/review content (vs pages, best-of lists)
  • navigational → brand/product pages (homepages, feature pages)
  • transactional → conversion pages (pricing, free trial, download)

If 60% of queries are commercial, the model is searching for comparison content — and that's the content type you need to create to enter the candidate set.

Further Reading

Notes

  • Gemini API key must be in GEMINI_API_KEY env var (stored in macOS Keychain under google-api-key)
  • Each run is independent — Gemini may use different search queries each time
  • Retries failed requests up to 3 times with exponential backoff
  • Use --output json for programmatic consumption

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.