k-fencore

Falkicon's avatarfrom Falkicon

Context for FenCore - the pure logic library for WoW addons. Covers utility functions, math helpers, table operations, and environment detection. Load this when working with FenCore or needing utility functions. Triggers: fencore, utility, math, table, logic, pure functions.

⭐6stars🔀0forks📁View on GitHub🕐Updated Jan 7, 2026

When & Why to Use This Skill

FenCore is a specialized pure logic library context for World of Warcraft (WoW) addon development, designed to streamline Lua coding by providing a robust suite of utility functions. This skill equips Claude with the technical documentation and tool access needed to handle complex math, table manipulations, string processing, and environment detection without UI dependencies. It is an essential resource for developers aiming to write testable, efficient, and cross-version compatible WoW addon code.

Use Cases

  • Mathematical Operations: Implementing precise calculations such as clamping values, linear interpolation (Lerp), and range checking for addon logic.
  • Data Manipulation: Performing deep table copies, merging configuration tables, and applying functional programming patterns like Map and Filter to Lua data structures.
  • Cross-Version Compatibility: Utilizing environment detection tools to identify if the user is on Retail, Classic, or specific expansions to execute version-specific logic.
  • String and Time Formatting: Standardizing duration displays and string parsing for backend addon systems independent of the WoW UI layer.
  • Code Optimization: Searching the FenCore catalog to reuse existing, optimized pure functions instead of reinventing common utility logic.
namek-fencore
description>
Triggersfencore, utility, math, table, logic, pure functions.

FenCore Library

FenCore is a pure logic library for WoW addons - no UI dependencies, just utility functions.

Design Philosophy

  • Pure Functions: No side effects, predictable outputs
  • No UI Dependencies: Works in any layer of your addon
  • Testable: All functions can be unit tested without WoW
  • Documented: Every function has clear input/output contracts

MCP Tools

Task MCP Tool
List All Functions fencore.catalog()
Search Functions fencore.search(query="clamp")
Get Function Details fencore.info(domain="Math", function="Clamp")

Domains

FenCore organizes functions by domain:

Domain Purpose Examples
Math Numeric operations Clamp, Round, Lerp, InRange
Table Table manipulation Copy, Merge, Filter, Map
String String utilities Split, Trim, StartsWith, Format
Color Color manipulation HexToRGB, RGBToHex, Lighten, Darken
Time Time formatting FormatDuration, FormatTime, ParseDuration
Environment WoW detection IsRetail, IsClassic, GetExpansion

Usage Pattern

local FenCore = LibStub("FenCore")

-- Access by domain
local Math = FenCore.Math
local result = Math.Clamp(value, 0, 100)

-- Or direct access
local clamped = FenCore.Math.Clamp(value, 0, 100)

Common Functions

Math

FenCore.Math.Clamp(value, min, max)     -- Constrain value to range
FenCore.Math.Round(value, decimals)      -- Round to decimal places
FenCore.Math.Lerp(a, b, t)              -- Linear interpolation
FenCore.Math.InRange(value, min, max)   -- Check if value in range

Table

FenCore.Table.Copy(tbl)                 -- Shallow copy
FenCore.Table.DeepCopy(tbl)             -- Deep copy
FenCore.Table.Merge(base, override)     -- Merge tables
FenCore.Table.Filter(tbl, predicate)    -- Filter by function
FenCore.Table.Map(tbl, transform)       -- Transform values

Environment

FenCore.Environment.IsRetail()          -- true if retail client
FenCore.Environment.IsClassic()         -- true if classic client
FenCore.Environment.GetExpansion()      -- "TWW", "Classic", etc.
FenCore.Environment.GetBuildInfo()      -- version, build, date

Best Practices

  1. Use for Core layer - FenCore belongs in your addon's pure logic layer
  2. Don't wrap unnecessarily - Call FenCore directly, don't create wrappers
  3. Check domain first - Use fencore.search to find existing functions before writing your own
  4. Prefer pure functions - If you need state, that belongs in Bridge layer