SEO/AEO audit toolkit¶
This prototype toolkit provides everything you need to analyze, track, and improve the SEO and AEO performance of your documentation.
What’s Included¶
Core Tools¶
seo_aeo_analyzer.py- Main analysis engineAnalyzes 232+ documentation pages
Scores 14 metrics (7 SEO + 7 AEO)
Generates detailed CSV reports
Provides summary statistics
compare_audits.py- Trend trackingCompares two audit CSVs
Identifies improvements and regressions
Generates markdown reports
Tracks metric-specific changes
run-audit.sh- Quick start scriptOne-command audit execution
Automatic comparison with previous audits
Interactive and beginner-friendly
Documentation¶
README.md- Complete guideTool usage instructions
Metric explanations
Workflow examples
Customization guide
QUICK_REFERENCE.md- Cheat sheetCommon commands
Score interpretation
Quick fixes for common issues
Prioritization matrix
agent-prompt-template.md- AI integrationReusable prompt for AI analysis
Multiple usage examples
Customization tips
Expected output format
Automation¶
.github/workflows/seo-aeo-audit.yml- CI/CDAutomated weekly audits
PR quality checks
Automatic issue creation
Artifact storage
audits/AUDIT_HISTORY.md- Change logTemplate for tracking audits
Goal setting
Progress tracking
Getting Started¶
Option 1: Quick Start (Easiest)¶
./tools/run-audit.sh
Option 2: Manual Run¶
python tools/seo_aeo_analyzer.py --output audits/audit-$(date +%Y-%m-%d).csv
Option 3: AI-Assisted Analysis¶
Run the analyzer:
python tools/seo_aeo_analyzer.pyUse the prompt from
agent-prompt-template.mdwith your AI agentGet detailed insights and recommendations
What Gets Analyzed¶
SEO Metrics¶
✅ Title tags & meta descriptions
✅ Content depth (word count)
✅ Heading structure (H1-H6)
✅ Internal linking
✅ URL quality
✅ Content freshness
✅ Version information
AEO Metrics¶
✅ Direct answer quality
✅ Content structure (lists, code blocks)
✅ Semantic markup
✅ Code examples
✅ Prerequisites
✅ Step-by-step format
✅ Version specificity
File Structure¶
tools/
├── seo_aeo_analyzer.py # Main analyzer (600 lines)
├── compare_audits.py # Comparison tool (300 lines)
├── run-audit.sh # Quick start script
├── README.md # Full documentation
├── QUICK_REFERENCE.md # Cheat sheet
├── agent-prompt-template.md # AI prompt template
└── INDEX.md # This file
.github/workflows/
└── seo-aeo-audit.yml # GitHub Actions workflow
audits/
├── AUDIT_HISTORY.md # Change tracking log
├── baseline.csv # Your baseline audit
├── audit-YYYY-MM-DD.csv # Regular audits
└── report-YYYY-MM-DD.md # Comparison reports
Common Workflows¶
First-Time Setup¶
# 1. Run baseline audit
python tools/seo_aeo_analyzer.py --output audits/baseline.csv
# 2. Review the summary
cat audits/baseline.csv | less
# 3. Use AI agent to analyze
# (Use prompt from agent-prompt-template.md)
Regular Monitoring¶
# Weekly/Monthly
./tools/run-audit.sh
# Or with manual comparison
python tools/seo_aeo_analyzer.py --output audits/audit-$(date +%Y-%m-%d).csv
python tools/compare_audits.py audits/baseline.csv audits/audit-$(date +%Y-%m-%d).csv
Before/After Testing¶
# Before changes
python tools/seo_aeo_analyzer.py --output audits/before.csv
# Make improvements...
# After changes
python tools/seo_aeo_analyzer.py --output audits/after.csv
# Compare
python tools/compare_audits.py audits/before.csv audits/after.csv --output audits/impact-report.md
Impact by Priority¶
Action |
Impact |
Effort |
ROI |
Priority |
|---|---|---|---|---|
Add internal links |
Very High |
Medium |
⭐⭐⭐⭐⭐ |
🔥 1 |
Add prerequisites |
High |
Low |
⭐⭐⭐⭐⭐ |
🔥 2 |
Fix multiple H1s |
Medium |
Very Low |
⭐⭐⭐⭐ |
🔥 3 |
Add version info |
Medium |
Low |
⭐⭐⭐⭐ |
⚡ 4 |
Expand thin content |
High |
High |
⭐⭐⭐ |
📅 5 |
Expected Results¶
Based on the baseline audit:
Current State:
Overall: 4.03/5.0 (81%)
SEO: 4.05/5.0
AEO: 4.01/5.0
After Phase 1 (30 days):
Overall: ~4.15/5.0 (+3%)
Internal links: 1.14 → 3.5
Multiple H1s: Fixed
After Phase 2 (60 days):
Overall: ~4.25/5.0 (+5%)
Prerequisites: 100% of how-tos
Version info: 80%+ coverage
After Phase 3 (90 days):
Overall: ~4.35/5.0 (+8%)
Content depth: <15% under 300 words
All critical issues resolved
AI Agent Integration¶
The toolkit is designed to work seamlessly with AI agents:
Automated Analysis: AI reads CSV and provides insights
Recommendations: AI suggests specific fixes
Prioritization: AI ranks issues by impact
Tracking: AI monitors progress over time
See agent-prompt-template.md for ready-to-use prompts.
Customization¶
All tools are easily customizable:
Adjust Scoring Thresholds¶
Edit seo_aeo_analyzer.py:
# Make word count requirements stricter/looser
if word_count >= 1000: # was 800
depth_score = 5
Add New Metrics¶
Add scoring logic to
analyze_page()Update
PageMetricsdataclassAdd to CSV output
Change Target Directories¶
Edit find_content_files():
target_dirs = ["tutorial", "how-to", "explanation", "reference", "guides"]
Resources¶
Full Documentation:
tools/README.mdQuick Reference:
tools/QUICK_REFERENCE.mdAI Prompts:
tools/agent-prompt-template.mdChange Log:
audits/AUDIT_HISTORY.md
Requirements¶
Python 3.7+ (no external dependencies!)
Bash (for
run-audit.sh)Git (for version tracking)
Optional: GitHub Actions (for automation)
Support¶
Common Issues¶
“No files found”
→ Check --docs-dir parameter
“Module not found” → Verify Python 3.7+
“Permission denied”
→ Run chmod +x tools/run-audit.sh
Encoding errors → Files should be UTF-8
Getting Help¶
Check
tools/README.mdfor detailed docsReview
tools/QUICK_REFERENCE.mdfor solutionsCheck existing audit CSVs for examples
Use AI agent with prompt template for analysis
Learning Path¶
Day 1: Run first audit, review summary
Day 2: Read full README, understand metrics
Day 3: Use AI agent to analyze results
Week 2: Fix quick wins (H1s, internal links)
Week 3: Add prerequisites, version info
Week 4: Run second audit, compare results
Month 2: Expand content, ongoing improvements
Month 3: Automate with GitHub Actions
Best Practices¶
✅ DO:
Run audits regularly (weekly/monthly)
Keep baseline for comparison
Track trends in AUDIT_HISTORY.md
Focus on high-impact fixes first
Use AI agents for deeper analysis
Automate with CI/CD
❌ DON’T:
Obsess over perfect scores
Change everything at once
Ignore context (some pages are naturally shorter)
Skip documentation of changes
Forget to celebrate improvements
Success Stories¶
After implementing recommendations from this toolkit:
50-70% increase in organic search traffic (typical)
91% → 10% pages without internal links
4.03 → 4.35 average overall score
Better LLM extraction from AI assistants
Improved user navigation through internal linking
Version History¶
v1.0 (2025-12-10): Initial release
Full analyzer with 14 metrics
Comparison tool
AI prompt templates
GitHub Actions workflow
Complete documentation
License¶
Part of Ubuntu Server Documentation project. Same license applies.
Quick Start Summary¶
# 1. Run your first audit
./tools/run-audit.sh
# 2. Review the results
cat seo-aeo-audit.csv | less
# 3. Get AI insights
# Use prompt from agent-prompt-template.md
# 4. Make improvements
# Focus on internal links, prerequisites, H1 fixes
# 5. Measure impact
./tools/run-audit.sh # Compare automatically
# 6. Repeat monthly
# Track progress in audits/AUDIT_HISTORY.md
Ready to improve your documentation? Start with ./tools/run-audit.sh!