# Skill: Generate Token-Optimized XML Sitemaps

> **Standard:** Sitemaps XML Protocol
> **Category:** DISCOVERABILITY
> **Classification:** SPECIFICATION_AND_GUIDE
> **Author:** TinyCTO Architecture Guild (https://tinycto.tv)

## Overview
Produce dynamic, XXE-safe XML sitemaps advertising canonical multilingual routes, last-modified timestamps, and change frequencies.

## Learning Objectives
1. Expose all public indexable URLs with canonical HTTPS domains.
2. Include alternate hreflang tags for multilingual parity (EN/TR).
3. Chunk large catalogs into sitemap index files when exceeding 50,000 URLs or 50MB.

## Prerequisites
- Route inventory and database model access

## Implementation & Execution Guide

### Step 1: Serve XML with Appropriate Headers
Return 'application/xml; charset=utf-8' with valid schema namespaces.

```http
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
  <url>
    <loc>https://tinycto.tv/en/guides</loc>
    <lastmod>2026-09-02</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
    <xhtml:link rel="alternate" hreflang="tr" href="https://tinycto.tv/tr/guides" />
  </url>
</urlset>
```

## Architectural Takeaway
Structured sitemaps guide AI crawler scheduling and guarantee deep topic discovery across episodic architectures.
