AI Citation Intelligence: 4-step methodology for auditing brand visibility across LLM platforms (Perplexity, ChatGPT, Gemini). Tracks trust nodes, citation quality, and competitive positioning.
Created by Adam Sandler | Viable Edge | @TheViableEdge | YouTube | LinkedIn
π Setup Guide | ποΈ Architecture | π Example Audit
The AI Citation Agent implements a comprehensive methodology for understanding how AI platforms (like Perplexity, ChatGPT, and Gemini) cite and rank brands. Based on the AI SEO Optimization Framework from aiclicks.io, this system provides actionable intelligence for improving brand visibility in AI-powered search.
New to this project? Start with the Setup Guide for complete installation instructions including:
- Environment configuration (
.env.local) - Airtable schema setup
- MCP server configuration
- Running your first audit
- Source & Citation Discovery - Map brand presence across 29 trust nodes (Wikipedia, G2, TechCrunch, etc.)
- Citation Quality Scoring - Evaluate citations on Authority, Data Structure, Brand Alignment, Freshness, and Cross-Links
- LLM Response Evaluation - Query AI platforms with structured taxonomy, track rankings, map citation influence
- Dashboard Synthesis - Transform scattered data into strategic priorities
/agents:audit-citationsYou'll be prompted for:
- Brand name (e.g., "Jasper", "Clio", "Salesforce")
- Category context (e.g., "AI marketing tools", "legal billing software")
- Content URLs (optional)
The audit takes ~8-10 minutes and generates a comprehensive report with strategic recommendations.
NEW: Automate competitive intelligence by queuing audits from an Airtable base:
# 1. Read competitors from source Airtable
node scripts/read-audit-queue.js
# 2. Run audit for each competitor
/agents:audit-citations # Use inputs from queue
# 3. Sync results back to source base
node scripts/sync-audit-results.jsWhat this enables:
- Queue multiple competitors in Airtable "1_Basic Info" table
- Run audits in batch mode
- Auto-sync scores to "4_Marketing Presence" table
- Track audit history, rankings, and next audit dates
- Compare competitors side-by-side
See docs/AIRTABLE_INTEGRATION.md for complete guide.
See jasper-citation-quality-scorecard.md for a complete example audit of Jasper AI in the "AI marketing tools" category.
Key Findings:
- Overall AI Visibility Score: 8.2/10
- Trust Node Coverage: 22/29 (76%)
- Citation Quality: 7.1/10
- AI Citation Rate: 100% (2/2 platforms tested)
- Rankings: #1 on Perplexity, #1 on ChatGPT
/agents:audit-citations- Main command that coordinates the full 4-step methodology for single brand audits/agents:batch-audit- Batch processing orchestrator for running multiple audits from Airtable queue
source-discovery- Audits presence across 29 trust nodes in 6 categoriescitation-quality-analyzer- Scores citations on 5 dimensions (0-10 scale)perplexity-citation-checker- Queries Perplexity API with structured taxonomychatgpt-citation-checker- Browser automation for ChatGPT citation trackinggemini-citation-checker- Browser automation for Gemini citation trackingairtable-writer- Persists audit data to Airtable across 5 related tablesprompt-generator- Generates 150-200 targeted test queries based on audit findings for ongoing AI visibility monitoring
Prevents and resolves the "endless browser tabs" issue that occurs with Playwright automation.
What it does:
- Detects zombie mcp-chrome processes
- Kills them safely with error handling
- Automatically invoked by browser agents before starting
- Can be manually triggered by user
Usage:
@playwright-cleanupToolkit for creating new skills following best practices.
Transforms audit markdown reports into interactive Next.js dashboards deployed to Vercel.
What it does:
- Parses audit reports into structured JSON
- Builds production-optimized Next.js dashboard
- Deploys to Vercel with one command
- Returns shareable dashboard URL
- Can also run locally for development
Features:
- Trust Node Radar Chart (6 categories)
- Citation Quality Scorecard (5 dimensions)
- LLM Rankings Table (3 platforms)
- Priority Timeline (strategic roadmap)
Usage: After completing an audit, the orchestrator automatically prompts you to deploy the dashboard. You can also access it via:
# From the manage menu
/agents:audit-citations
# Then type: manage
# Select option 1 or 5Requirements: Vercel account for deployment (free tier works)
ai-citation-agent/
βββ .claude/
β βββ agents/ # Specialized agents
β β βββ source-discovery.md
β β βββ citation-quality-analyzer.md
β β βββ perplexity-citation-checker.md
β β βββ chatgpt-citation-checker.md
β β βββ gemini-citation-checker.md
β β βββ airtable-writer.md # Data persistence agent
β βββ commands/
β β βββ agents/
β β βββ audit-citations.md # Main orchestrator
β β βββ setup-airtable.md # Airtable schema setup
β βββ skills/
β βββ playwright-cleanup/ # Browser process management
β β βββ SKILL.md
β β βββ scripts/cleanup_browser.sh
β βββ skill-creator/ # Skill development toolkit
βββ context/
β βββ frameworks/ # AI SEO framework documentation
β βββ queries/ # Query taxonomy
β βββ standards/ # Output quality standards
βββ scripts/
β βββ setup-airtable-schema.js # Create Airtable tables
β βββ test-airtable-connection.js # Validate Airtable credentials
β βββ delete-airtable-tables.js # Clean up Airtable (with confirmation)
βββ .env.local # Airtable credentials (gitignored)
- Claude Code - This project is designed to run in Claude Code environment
- Playwright MCP - For browser automation (ChatGPT, Gemini agents)
- Perplexity MCP - For Perplexity API access
- Airtable MCP - For data persistence and tracking
- Node.js - For Airtable schema setup scripts
- GitHub CLI (optional) - For repository management
Evaluates presence across 29 trust nodes in 6 categories:
| Category | Trust Nodes |
|---|---|
| Knowledge Graphs | Wikipedia, Wikidata, Google Knowledge Panel |
| Review Platforms | G2, Capterra, Trustpilot, Software Advice, GetApp |
| Directories | Crunchbase, Product Hunt, AngelList, BuiltWith |
| Company Profiles | LinkedIn, Bloomberg/Pitchbook |
| News & PR | TechCrunch, VentureBeat, Forbes, Inc, Fast Company, etc. |
| Seed Sites | 5 major tech/business publications |
Output: Trust node coverage map with critical gap analysis
Scores each citation on 5 dimensions (0-10 scale):
- Authority - Domain authority, publication reputation, editorial standards
- Data Structure - Schema.org markup, structured data, machine-readable format
- Brand Alignment - Accurate representation, positive sentiment, brand control
- Freshness - Publication date, last updated, content recency
- Cross-Link Signals - Citations to/from other trust nodes, reference depth
Output: Citation quality scorecard with dimension breakdown
Tests multiple query types across platforms:
- Evaluative: "What are the top [category] in 2025?"
- Comparative: "Best [category] for [use case]"
- Brand-Specific: "[Brand] reviews and credentials"
For each platform:
- Tracks if brand appears
- Records position/ranking
- Maps citation sources
- Notes competitors cited
Output: Cross-platform visibility analysis with competitive intelligence
Combines all data into:
- Overall AI Visibility Score
- Trust Node β Citation Quality β LLM Visibility chain analysis
- Immediate priorities (this month)
- Strategic initiatives (this quarter)
- Long-term vision (6-12 months)
Output: Actionable roadmap with specific metrics and timelines
After completing the 4-step audit, you can optionally generate a comprehensive prompt taxonomy for ongoing AI visibility monitoring.
What it does:
- Generates 150-200 targeted test queries based on audit findings
- Covers 6 query categories: Evaluative, Comparative, Use-Case, Brand-Specific, Feature-Specific, Long-Tail
- Tailors prompts to address gaps identified in audit
- Includes competitor comparisons and use-case scenarios
- Provides testing guidelines and prioritization (high/medium/low priority)
Query categories:
- Evaluative - "What are the top [category] in 2025?"
- Comparative - "[Brand] vs [Competitor] for [use case]"
- Use-Case Specific - "[Category] for [specific workflow/pain point]"
- Brand-Specific - "[Brand] reviews and ratings"
- Feature-Specific - "[Category] with [specific feature]"
- Long-Tail Variants - Hyper-specific scenarios with multiple constraints
Why use it:
- Monitor AI visibility improvements over time
- Test strategic recommendations from audit
- Track competitive positioning across platforms
- Identify new citation opportunities
- Measure progress on 60-day re-audit
Output: Markdown file with 150-200 testable queries, testing protocol, success metrics, and prioritization guidance
After each audit completes, you can export results to Airtable for:
- Persistence - Historical tracking of audits over time
- Trend Analysis - See how trust node coverage and citation quality evolve
- Dashboard Visualization - Build custom views for executives, marketing teams, SEO analysts
- Team Collaboration - Assign priorities, track status, add notes
The integration uses 5 related tables (70 fields total):
Main audit execution records with composite scores, platform rankings, and executive summary.
Key fields: brand_name, category, overall_score, trust_node_coverage, citation_quality, ai_citation_rate, perplexity_rank, chatgpt_rank, gemini_rank, top_priority_1, top_priority_2, top_priority_3
Individual trust node presence tracking across 29 nodes in 6 categories.
Key fields: category, node_name, present, quality_score, url, last_updated
Citation quality scores across 5 dimensions per source.
Key fields: source_url, source_domain, authority_score, data_structure_score, brand_alignment_score, freshness_score, cross_link_score, overall_quality, cited_by_perplexity, cited_by_chatgpt, cited_by_gemini
Platform query results with rankings and competitive intelligence.
Key fields: platform, query_type, query_text, brand_cited, brand_rank, citations_found, competitor_1, competitor_1_rank, competitor_2, competitor_2_rank
Action items with impact/effort assessment and status tracking.
Key fields: priority_level, title, description, impact, effort, timeline, status, assigned_to, due_date
Relationships: All tables link to Audit_Runs via audit field (many-to-one).
Create .env.local in the project root:
AIRTABLE_API_KEY=your_api_key_here
AIRTABLE_BASE_ID=appXXXXXXXXXXXXXXGet your credentials:
- API Key: https://airtable.com/create/tokens (grant schema and data scopes)
- Base ID: From your base URL (https://airtable.com/appXXX...)
Recommended: Use the agent (automatic credential checking)
/agents:setup-airtableThe agent will:
- β
Automatically check for credentials in
.env.local - β Only prompt you if credentials are missing
- β Create all 5 tables with proper field types and relationships
- β Provide detailed setup instructions if credentials aren't configured
Alternative: Run script manually
node scripts/setup-airtable-schema.jsTest your Airtable credentials:
node scripts/test-airtable-connection.jsAfter the audit completes (Step 4 synthesis), data is automatically exported to Airtable without requiring user confirmation.
Export process:
- Orchestrator collects structured JSON from all agent responses (Steps 1-4)
- Constructs complete payload with audit metadata and calculated metrics
- Automatically invokes
@airtable-writeragent - Writer creates records across all 5 tables atomically
- Displays summary with record counts and Airtable view URL
Why automatic?
- Ensures all audit data is persisted for historical tracking
- Enables trend analysis over time (comparing audits 60+ days apart)
- Provides data foundation for dashboard visualizations
- Allows team collaboration on priorities
What gets exported:
- 1 Audit Run record (overall metrics, scores, executive summary)
- Trust Nodes records (presence/absence across 29 nodes)
- Citations records (quality scores across 5 dimensions)
- LLM Responses records (rankings from 3 platforms)
- Priorities records (action items with impact/effort/timeline)
If you want to export an old audit report that wasn't exported during its original run:
@airtable-writerProvide the complete JSON payload from the audit session.
Audit Agents β JSON Output β Orchestrator Collection β User Approval β Airtable Writer β 5 Tables
Each specialized agent returns hybrid output:
- Markdown - Human-readable report for user review
- JSON - Structured data block for Airtable export
The orchestrator:
- Collects JSON from Steps 1-4
- Calculates composite metrics (overall_score, ai_citation_rate, etc.)
- Extracts top 3 priorities from recommendations
- Constructs complete payload matching Airtable schema
- Writes atomically (all tables or none)
If any audit step fails (e.g., ChatGPT timeout):
- Writer creates records with whatever data exists
- Sets
statusfield to "In Progress" - Flags missing sections in
notesfields - Example: "Partial audit - ChatGPT step timed out (browser lock). Re-run to complete."
scripts/setup-airtable-schema.js - Creates all 5 tables with 70 fields
scripts/test-airtable-connection.js - Validates API key and lists tables
scripts/delete-airtable-tables.js - Safely deletes all tables (requires "DELETE" confirmation)
Problem: Browser automation agents (ChatGPT, Gemini) sometimes create endless tab loops.
Root Cause: Zombie Playwright processes hold locks on browser profile.
Solution: The playwright-cleanup skill automatically runs before browser agents start. If you encounter issues:
@playwright-cleanupOr manually:
ps aux | grep -i "mcp-chrome" | grep -v grep
kill -9 [PID numbers]This project is actively developed. To contribute:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Areas for contribution:
- Additional LLM platform integrations
- Enhanced citation quality scoring
- Expanded trust node categories
- Performance optimizations
MIT License - see LICENSE file for details
Adam Sandler - Founder of Viable Edge
Viable Edge helps businesses optimize their presence in AI-powered search and LLM platforms. This tool was built to provide actionable intelligence for the AI SEO era.
Connect:
- π Website: viableedge.com
- π Twitter/X: @TheViableEdge
- πΊ YouTube: @ViableEdge
- πΌ LinkedIn: Adam Sandler
Based on the AI SEO Optimization Framework from aiclicks.io
TODO:
- Add installation instructions
- Create detailed agent usage guides
- Add more example audit reports
- Document query taxonomy in detail
- Add troubleshooting guide
- Create video walkthrough