ai-answer-trace

ai-answer-trace is a skill for Claude Code from XPOZpublic/xpoz-agent-skills. It costs 101 tokens per session (5,416 once invoked), scanned A, original, MIT.

A tool for asking Claude, ChatGPT, and Gemini the same question and recording how each AI system reached its answer. It captures searches, retrieved pages, and cited sources where available.

In plain words
What is it for?
Use it to trace AI answers, inspect cited sources, compare search behavior across engines, or check which sources support a brand-related answer.
Why use it?
It shows not only what an AI answer says, but also which searches and sources may have influenced it. This helps investigate and compare AI citations.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the xpoz plugin — 14 skills shipped together

Good fit Use it to trace AI answers, inspect cited sources, compare search behavior across engines, or check which sources support a brand-related answer.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xpozpublic/xpoz-agent-skills/ai-answer-trace
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.

Any agent
npx skills add XPOZpublic/xpoz-agent-skills --skill ai-answer-trace
Clone the repo
git clone --depth 1 https://github.com/XPOZpublic/xpoz-agent-skills

Made for: Claude Code.

Or install xpoz, the plugin that ships this one along with the rest of its 14 skills.

Wrote 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.

agentmods badge for ai-answer-trace

README.md
[![agentmods](https://agentmods.dev/badge/skills/xpozpublic/xpoz-agent-skills/ai-answer-trace/github.svg)](https://agentmods.dev/skills/xpozpublic/xpoz-agent-skills/ai-answer-trace)
Your own site
<a href="https://agentmods.dev/skills/xpozpublic/xpoz-agent-skills/ai-answer-trace"><img src="https://agentmods.dev/badge/skills/xpozpublic/xpoz-agent-skills/ai-answer-trace/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ai-answer-trace

Your own site · 80×15
<a href="https://agentmods.dev/skills/xpozpublic/xpoz-agent-skills/ai-answer-trace"><img src="https://agentmods.dev/badge/skills/xpozpublic/xpoz-agent-skills/ai-answer-trace.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,416 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00101 $0.05416
Opus 5 $0.00051 $0.02708
Sonnet 5 $0.00020 $0.01083
Haiku 4.5 $0.00010 $0.00542

Measured 2d ago against content hash 1cb6265e99a2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

ai-answer-trace scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

import urllib.error
skills/ai-answer-trace/SKILL.md · 553 lines

How it starts

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

AI Answer Trace

Overview

Ask the major AI engines a question exactly the way a real user would, with their live web search on, and capture the complete evidence trail behind each answer, not just the answer text. Every trace records three layers: the answer, the search queries the engine silently ran with the pages each search retrieved, and the URLs the answer actually cited (with the character spans they support, where the API provides them). This is the raw material of GEO: knowing not only what the engines say, but which sources made them say it.

When to Use

Activate when the user asks:

  • "What does ChatGPT/Claude/Gemini say about [TOPIC], and what sources does it use?"
  • "Trace the answer to [QUESTION] across AI engines"
  • "Which sites do AI engines cite for [PROMPT]?"
  • "Why do AI assistants recommend [COMPETITOR] instead of us?"
  • "Check my brand's AI citations for [QUESTION]"
  • Any GEO measurement where you need the cited sources behind AI answers

Setup

The core of this skill needs AI engine API keys, not an xpoz account. Set whichever of these you have; each engine's script runs independently, so one key is enough to start:

  • ANTHROPIC_API_KEY for Claude
  • OPENAI_API_KEY for ChatGPT
  • GEMINI_API_KEY for Gemini (or Vertex AI credentials: GOOGLE_APPLICATION_CREDENTIALS + VERTEX_PROJECT_ID)

The scripts below are self-contained single files with inline dependency metadata (PEP 723). The easiest way to run them is uv, which resolves dependencies automatically:

uv run trace-claude.py "your question" > claude-1.json

Without uv, install the dependencies once and run with plain Python:

pip install anthropic openai google-genai google-auth
python trace-claude.py "your question" > claude-1.json

If you cannot run Python at all, skip to "If You Can't Run the Scripts" below.

How to Read a Trace

Each script prints one JSON object with three layers. Understanding the difference between them is the whole point:

Read the full file on GitHub · 553 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 Changed scan B → A 1cb6265e99a2
  2. 12d ago First seen · 553 lines · 101 tokens per session scan B 9baaaf96e29f

Subscribe to this mod's changes

ai-answer-trace is a skill published in the GitHub repository XPOZpublic/xpoz-agent-skills (15 stars, last pushed 3d ago), licensed MIT. It adds 101 tokens to every session and 5,416 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

architecture-design

Use only when creating new registrable ML components that require Factory or Registry patterns.

Galaxy-Dawn/claude-scholar · 19 tokens

kaggle-learner

This skill should be used when the user asks to "learn from Kaggle", "study Kaggle solutions", "analyze Kaggle competitions", or mentions Kaggle competition URLs. Provides access to extracted knowledge from winning Kaggle solutions across NLP, CV, time series, tabular, and multimodal domains.

Galaxy-Dawn/claude-scholar · 69 tokens

graph-retrieval

Exposes graph-based retrieval as a tool capability via querygraph. Reads normalized graph store files, builds a query-relevant subgraph, and returns LLM-friendly semantic triples with replayable evidence metadata.

study8677/repobrain · 46 tokens

knowledge-layer

High-level deployment wrapper over RepoBrain core with graph-first knowledge injection and all-file support. Exposes refreshfilesystem and askfilesystem for building and querying the knowledge graph.

study8677/repobrain · 42 tokens

prompt-engineering

Universal prompt engineering techniques for any LLM. Use when crafting, optimizing, or reviewing prompts for AI models. Triggers on requests like "improve this prompt", "write a system prompt", "optimize my instructions", "help me prompt engineer", "audit this prompt", "review my prompt", or when building agentic…

CodeAlive-AI/ai-driven-development · 76 tokens

neo4j-vector-index-skill

Create and manage Neo4j vector indexes, run vector similarity search (ANN/kNN), store embeddings on nodes or relationships, use SEARCH clause (Neo4j 2026.01+, preferred) or db.index.vector.queryNodes() procedure (deprecated 2026.04, still works on 2025.x), configure HNSW and quantization options, pick similarity…

neo4j-contrib/neo4j-skills · 210 tokens