Token导航 LogoToken导航

Agent Skill · 开发

wow-api-lua-environment(WOW API LUA environment 文档)

用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。它适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则;涉及生成接口文档时,应避免凭空补字段,最好从现有代码、schema 或接口样例中提取事实。

wow-api-lua-environment 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 21,366。

总安装 190周安装 8GitHub Stars 22下载 67核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:wow-api-lua-environment(WOW API LUA environment 文档)
来源仓库:https://github.com/jburlison/wowaddonapiagents
仓库路径:skills/wow-api-lua-environment
安装命令:
npx skills add https://github.com/jburlison/wowaddonapiagents --skill wow-api-lua-environment
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/jburlison/wowaddonapiagents --skill wow-api-lua-environment

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

wow-api-lua-environment 用于辅助 API 设计、接口文档和错误码整理,适合生成 OpenAPI 草稿或联调支持。适用于前后端协作场景,如梳理 endpoint 或验证字段命名。通过 npx skills add 命令从指定 GitHub 仓库安装并使用。

使用时需确认业务语义和鉴权规则,避免凭空补字段。建议结合现有代码或接口样例提取事实信息。

来源仓库内路径:skills/wow-api-lua-environment

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/jburlison/wowaddonapiagents --skill wow-api-lu…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

wow-api-lua-environment 怎么安装?

在终端执行 npx skills add https://github.com/jburlison/wowaddonapiagents --skill wow-api-lua-environm…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

wow-api-lua-environment 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

wow-api-lua-environment 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/jburlison/wowaddonapiagents --skill wow-api-lua-environment 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

wow-api-lua-environment 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

wow-api-lua-environment 用的人多吗?

公开数据是累计安装 190 次,近一周安装 8 次,下载 67 次,GitHub 22 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

wow-api-lua-environment 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
wow-api-lua-environment

WOW API LUA environment 文档 · 本页

19022执行命令未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Lua Environment & Security (Retail — Patch 12.0.0)

Comprehensive reference for the WoW Lua sandbox, security model, taint system, secure execution, timers, hooks, logging, and restricted actions.

Source: https://warcraft.wiki.gg/wiki/World_of_Warcraft_API Secure Execution: https://warcraft.wiki.gg/wiki/Secure_Execution_and_Tainting Lua Functions: https://warcraft.wiki.gg/wiki/Lua_functions Current as of: Patch 12.0.0 (Build 65655) — January 28, 2026 Scope: Retail only.

Scope

This skill covers:

  • Lua Sandbox — WoW's Lua 5.1 environment, restricted standard library, blocked functions
  • Taint System — How addon code becomes tainted and what tainted code cannot do
  • Secure Execution — Protected functions, secure frames, secure handlers
  • Combat Lockdown — What addons can and cannot do during combat
  • C_Timer — Timer functions (After, NewTicker, NewTimer)
  • Hooks — hooksecurefunc, securecallfunction, securecallmethod
  • C_RestrictedActions — Addon restriction state queries
  • C_Log — Logging utilities
  • FrameScript — Frame script environment, secret values, scrubbing
  • Debugging — Error handling, stack traces, debugging utilities

When to Use This Skill

Use this skill when you need to:

  • Understand what Lua functions are available vs blocked in WoW
  • Work with or debug taint issues
  • Write code that interacts with secure/protected frames
  • Use timers, delayed execution, or ticker patterns
  • Hook existing functions safely
  • Understand combat lockdown restrictions
  • Handle addon restriction states (12.0.0 instance restrictions)
  • Log messages for debugging
  • Work with secret values and the FrameScript sandbox

WoW Lua 5.1 Sandbox

WoW runs Lua 5.1.4 with significant modifications. The following standard library functions are blocked or removed:

Blocked Standard Functions

BlockedReason
loadfile()No filesystem access
dofile()No filesystem access
io.*No filesystem access
os.execute()No shell access
os.exit()Cannot close client
os.remove()No filesystem
os.rename()No filesystem
os.tmpname()No filesystem
os.getenv()No environment access
package.*No package system
require()No module loading
module()No module system
newproxy()Removed
getfenv()Limited — returns read-only
setfenv()Very restricted
collectgarbage()Limited modes

Available Standard Functions

Most core Lua functions work normally:

  • All string.*, table.*, math.* functions
  • type(), tostring(), tonumber(), rawget(), rawset(), rawequal(), rawlen()
  • pairs(), ipairs(), next(), select(), unpack()
  • pcall(), xpcall(), error(), assert()
  • setmetatable(), getmetatable()
  • coroutine.* (full coroutine support)
  • os.time(), os.date(), os.clock(), os.difftime()
  • print() — outputs to default chat frame

WoW-Added Global Functions

FunctionDescription
strsplit(delimiter, str [, pieces])Split string by delimiter
strsplittable(delimiter, str [, pieces])Split to table
strjoin(delimiter,...)Join strings
strtrim(str [, chars])Trim whitespace
tContains(table, value)Table contains value?
tInsert(table, value)Insert into table (alias)
tDeleteItem(table, value)Remove first occurrence of value
tInvert(table)Invert key/value pairs
wipe(table)Clear table (preserving reference)
CopyTable(table [, shallow])Deep or shallow copy
MergeTable(dest, source)Merge source into dest
Mixin(object,...)Copy mixin methods to object
CreateFromMixins(...)Create new object from mixins
CreateAndInitFromMixin(mixin,...)Create + call Init
format(formatString,...)Alias for string.format
tostringall(...)Convert all args to strings
DevTools_Dump(value, startKey)Dump value for debugging

Taint System

All addon code runs as "tainted" (insecure). Blizzard UI code runs as "secure" (untainted). The taint system prevents addons from calling protected functions or modifying secure frames.

How Taint Works

  1. Any variable set by addon code becomes tainted
  2. Tainted values propagate — if tainted data flows into Blizzard code, it taints that path
  3. Protected functions check taint before executing — they fail if execution path is tainted
  4. Secure frames inherit security from their creation context

Checking Taint

-- Check if a global variable is tainted
local isTainted, source = issecurevariable("SomeGlobalVar")
-- isTainted: false = secure, true = tainted
-- source: string name of the addon that tainted it (or nil if secure)

-- Check table field
local isTainted, source = issecurevariable(someTable, "someKey")

Common Taint Pitfalls

-- WRONG — This taints the Blizzard settings table
Settings.RegisterAddOnCategory = myFunc  -- TAINT!

-- WRONG — Modifying secure frame in insecure context
local btn = PlayerFrame  -- This is a secure Blizzard frame
btn:SetAttribute("type", "spell")  -- TAINT — can cause action blocked errors

-- RIGHT — Use hooksecurefunc for observation without tainting
hooksecurefunc("SomeBlizzardFunction", function(...)
    -- Your code runs AFTER the original — doesn't taint
end)

Secure Execution & Protected Functions

Protected Function Restrictions

Functions marked #protected can only be called from:

  • Secure (Blizzard) code
  • Secure click handlers triggered by hardware events
  • Inside SecureActionButtonTemplate handlers

Protected functions include:

  • All combat-related casting: CastSpellByName(), CastSpellByID(), UseAction()
  • Item use: UseItemByName(), UseContainerItem() (in combat)
  • Target changes: TargetUnit(), AssistUnit(), FocusUnit()
  • Movement: MoveForwardStart(), JumpOrAscendStart()
  • UI state: SetAttribute() on secure frames (in combat)

Combat Lockdown

-- Check if in combat lockdown
if InCombatLockdown() then
    -- Cannot: create/destroy secure frames, change secure attributes
    -- Cannot: set points on secure frames, change parent/visibility of secure frames
    -- Can: read attributes, modify non-secure frames, queue changes for later
    return
end

-- Queue changes for after combat
local frame = CreateFrame("Frame")
frame:RegisterEvent("PLAYER_REGEN_ENABLED")
frame:SetScript("OnEvent", function()
    -- Combat ended — safe to modify secure frames now
    DoSecureFrameChanges()
end)

Secure Handlers & Templates

-- SecureActionButtonTemplate — allows protected actions via user clicks
local btn = CreateFrame("Button", "MySecureBtn", UIParent, "SecureActionButtonTemplate")
btn:SetAttribute("type", "spell")
btn:SetAttribute("spell", "Fireball")
-- When clicked by hardware event, this will cast Fireball

-- SecureHandlerBaseTemplate — run secure snippets
local frame = CreateFrame("Frame", nil, UIParent, "SecureHandlerBaseTemplate")
frame:SetAttribute("_onstate-combat", [[
    -- This snippet runs in the secure environment
    if newstate == "combat" then
        self:Hide()
    else
        self:Show()
    end
]])
RegisterStateDriver(frame, "combat", "[combat] combat; nocombat")

State Drivers

-- Register a state driver for automatic secure attribute updates
RegisterStateDriver(frame, "stateName", "conditionalString")
-- e.g., RegisterStateDriver(frame, "visibility", "[combat] hide; show")

UnregisterStateDriver(frame, "stateName")

C_Timer — Timer API

Wiki: https://warcraft.wiki.gg/wiki/API_C_Timer.After

Timer Functions

FunctionReturnsDescription
C_Timer.After(seconds, callback)—One-shot timer
C_Timer.NewTimer(seconds, callback)timerCancellable one-shot timer
C_Timer.NewTicker(seconds, callback [, iterations])tickerRepeating timer

Timer Object Methods

local timer = C_Timer.NewTimer(5, function()
    print("5 seconds elapsed")
end)
timer:Cancel()  -- Cancel before it fires

local ticker = C_Timer.NewTicker(1, function()
    print("Every second")
end, 10)  -- Stop after 10 iterations
ticker:Cancel()  -- Or cancel early

-- Simple delay (non-cancellable)
C_Timer.After(2, function()
    print("2 seconds later")
end)

Hooks — Function Hooking

hooksecurefunc

The primary safe hooking mechanism. Your hook runs after the original function, without tainting it.

-- Hook a global function
hooksecurefunc("UseAction", function(slot, checkCursor, onSelf)
    print("Action used:", slot)
end)

-- Hook a method on an object
hooksecurefunc(GameTooltip, "SetUnitAura", function(self, ...)
    -- Runs after GameTooltip:SetUnitAura
end)

-- IMPORTANT: You CANNOT prevent the original from executing
-- IMPORTANT: You CANNOT modify the return values
-- IMPORTANT: Your hook does NOT taint the original function

securecallfunction / securecallmethod

-- Call a function in secure context (if possible)
securecallfunction(func, arg1, arg2)

-- Call a method in secure context
securecallmethod(object, "MethodName", arg1, arg2)

C_RestrictedActions — Addon Restriction State

New in 12.0.0. Tracks when addon restrictions are active (e.g., inside instances).

FunctionReturnsDescription
C_RestrictedActions.GetAddOnRestrictionState(type)stateCurrent restriction state
C_RestrictedActions.IsAddOnRestrictionActive(type)activeIs restriction currently active?
C_RestrictedActions.CheckAllowProtectedFunctions(object [, silent])protectedFunctionsAllowedCan object call protected funcs?
InCombatLockdown()inCombatLockdownCombat lockdown active?

Restriction Events

EventDescription
ADDON_RESTRICTION_STATE_CHANGEDRestriction state changed (entering/leaving instance)
PLAYER_REGEN_DISABLEDEntering combat
PLAYER_REGEN_ENABLEDLeaving combat

C_Log — Logging

FunctionDescription
C_Log.LogMessage(message)Log info message
C_Log.LogWarningMessage(message)Log warning
C_Log.LogErrorMessage(message)Log error
C_Log.LogMessageWithPriority(priority, message)Log with specific priority
Note: ConsolePrint() was removed in 12.0.0. Use C_Log.LogMessage() instead.

FrameScript Functions

WoW provides special FrameScript functions for working with the secure/secret value system:

FunctionReturnsDescription
issecurevariable([table,] name)isSecure, taintSourceCheck taint status
issecretvalue(value)isSecretIs value a secret?
issecrettable(table)isSecretOrContentsSecretIs table or contents secret?
canaccessvalue(value)isAccessibleCan addon access this value?
hasanysecretvalues(values)isAnyValueSecretAny arg secret?
scrubsecretvalues(values)scrubbedReplace secrets with nil
secretwrap(values)wrappedWrap values as secrets
mapvalues(func, values)mappedMap function over values (secret-safe)
securecallfunction(func,...)resultsCall in secure context
securecallmethod(obj, method,...)resultsCall method in secure context
forceinsecure()—Force insecure execution
seterrorhandler(handler)—Set global error handler
geterrorhandler()handlerGet current error handler

Debugging Utilities

Error Handling

-- Set a custom error handler
seterrorhandler(function(msg)
    -- msg is the error string
    print("ERROR:", msg)
end)

-- Protected call with error handling
local success, err = pcall(function()
    -- Code that might error
end)
if not success then
    print("Error:", err)
end

-- xpcall with message handler
local success, err = xpcall(function()
    error("something broke")
end, function(msg)
    return msg .. "\n" .. debugstack(2)
end)

Debug Stack & Info

-- Get a stack trace
local stack = debugstack([thread,] [start [, count1 [, count2]]])

-- Get debug info
local info = debuglocals([thread,] [level])

-- Profile timing
debugprofilestart()
-- ... code to measure ...
local elapsed = debugprofilestop()  -- microseconds

Slash Commands for Debugging

-- /dump expression — evaluates and prints
-- /run code — executes Lua code
-- /script code — same as /run
-- /console cvarName [value] — get/set console variables

Common Patterns

Deferred Initialization (Wait for Login)

local frame = CreateFrame("Frame")
frame:RegisterEvent("PLAYER_LOGIN")
frame:SetScript("OnEvent", function(self, event)
    -- Safe to initialize — player is logged in
    self:UnregisterEvent(event)
    InitializeAddon()
end)

Safe OnUpdate Throttle

local elapsed = 0
local THROTTLE = 0.1  -- 100ms
frame:SetScript("OnUpdate", function(self, dt)
    elapsed = elapsed + dt
    if elapsed < THROTTLE then return end
    elapsed = 0
    -- Do periodic work
end)

Post-Combat Action Queue

local pendingActions = {}

local function QueueAction(action)
    if InCombatLockdown() then
        tinsert(pendingActions, action)
    else
        action()
    end
end

local frame = CreateFrame("Frame")
frame:RegisterEvent("PLAYER_REGEN_ENABLED")
frame:SetScript("OnEvent", function()
    for _, action in ipairs(pendingActions) do
        action()
    end
    wipe(pendingActions)
end)

Graceful Secret Value Handling (12.0.0)

-- When values might be secret, pass them directly to widgets
local name = UnitName(unit)  -- may be secret
myFontString:SetText(name)   -- widgets accept secrets

-- Check if a value is secret before trying operations
if not issecretvalue(someValue) then
    -- Safe to compare, do arithmetic, etc.
    if someValue == "expected" then ... end
else
    -- Cannot inspect — pass to UI widget directly
    myWidget:SetText(someValue)
end

Gotchas & Restrictions

  1. No require() — WoW has no module system. Use the TOC file to control load order. Libraries are embedded directly.
  2. setfenv() / getfenv() — Severely restricted. Do not rely on environment manipulation.
  3. collectgarbage() — Only "count" mode works. Cannot force GC collection.
  4. Taint is sticky — Once a variable is tainted, it stays tainted. Even if you set it back to the original value, the taint remains.
  5. print() goes to chat — Unlike standard Lua, print() outputs to the default chat frame, not stdout.
  6. String library additions — WoW adds strsplit, strjoin, strtrim, and strmatch as globals (in addition to string.match).
  7. No os.exit() — Cannot terminate the client programmatically.
  8. Coroutines work — Full coroutine support is available and commonly used for async patterns.
  9. Secret values (12.0.0) — Some API returns are now opaque "secret" values that cannot be inspected, compared, or used in arithmetic. See the wow-api-important instructions for full details.
  10. Instance restrictions (12.0.0) — SendAddonMessage() is blocked in instances. Design addons to work without inter-player communication during instanced content.

平台分布

Codex

34.07%
按下载量换算23

Claude

29.24%
按下载量换算20

Cursor

20.68%
按下载量换算14

Gemini CLI

9.76%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/jburlison/wowaddonapiagents --skill wow-api-lua-environment 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills