---
name: wow-addon-structure
description: Verbose guide for WoW Retail AddOn structure, .toc metadata, loading order, SavedVariables, and C_AddOns metadata and load APIs. Use when planning addon folder layout, file order, or SavedVariables wiring.
---

# WoW AddOn Structure (Retail)

## Scope
- Retail only, current as of Patch 12.0.0.
- Focuses on folder layout, .toc metadata, loading order, and SavedVariables.
- Avoid deprecated or removed APIs and call out restricted directives.

## When to use this skill
Use this skill when you need to:
- Design or review an AddOn folder layout.
- Author or audit a .toc file.
- Reason about file load order and login events.
- Wire SavedVariables or troubleshoot persistence.
- Query or load AddOns via `C_AddOns` APIs.

## How to use this skill
1. Start with layout and naming rules in references/ADDON_STRUCTURE.md.
2. Build the .toc file using references/TOC_FORMAT.md.
3. Plan initialization order with references/LOADING_LIFECYCLE.md.
4. Wire persistence with references/SAVED_VARIABLES.md.
5. Use `C_AddOns` metadata APIs from references/C_ADDONS_API.md.
6. Cross-check patterns in Blizzard UI source from references/VIEWING_BLIZZARD_UI.md.

## Reference files
- references/ADDON_STRUCTURE.md - Folder layout rules, naming, and common patterns.
- references/TOC_FORMAT.md - .toc syntax, directives, and file order rules.
- references/LOADING_LIFECYCLE.md - Load order, events, and login timeline.
- references/SAVED_VARIABLES.md - Persistence rules and file locations.
- references/C_ADDONS_API.md - Key `C_AddOns` metadata and load APIs.
- references/VIEWING_BLIZZARD_UI.md - How to inspect Blizzard UI source.

## Key rules and reminders
- The AddOn folder name and .toc filename must match.
- The .toc file is required and defines file load order.
- Files load top to bottom in the .toc list.
- SavedVariables are available after `ADDON_LOADED` unless `LoadSavedVariablesFirst` is used.
- Use `LoadOnDemand` and `C_AddOns.LoadAddOn` for heavy modules.
- Some .toc directives are restricted to Blizzard AddOns and are not available to third-party AddOns.

## Sources
- https://warcraft.wiki.gg/wiki/TOC_format
- https://warcraft.wiki.gg/wiki/AddOn
- https://warcraft.wiki.gg/wiki/AddOn_loading_process
- https://warcraft.wiki.gg/wiki/SavedVariables
- https://warcraft.wiki.gg/wiki/Viewing_Blizzard%27s_interface_code
- https://warcraft.wiki.gg/wiki/World_of_Warcraft_API
- https://github.com/Gethe/wow-ui-source/tree/live/Interface/AddOns/Blizzard_APIDocumentationGenerated


---
Source attribution: JBurlison
Original project: https://github.com/JBurlison/WoWAddonAPIAgents
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2026 Gabriel Moreira

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: JBurlison
Original project: https://github.com/JBurlison/WoWAddonAPIAgents
Attribution basis: Upstream repository explicitly recorded in package mirror path

Fields of work: Development & Engineering
Roles: Frontend Developer, Game Developer
Specialties: Backend
Tools: World Of Warcraft
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 8491fc1bdc27aed8d6a1416b4470a81302279a9a3b9a160f0b40255bd5ef7fee
