Agent skill

Xmath Usage

by selimanac in selimanac/defold-astar

Provides xmath API reference and in-place math optimization patterns for Defold.

No licenceAuto-check passedGame Development

Install Xmath Usage

skills CLI
$ npx skills add selimanac/defold-astar --skill xmath-usage -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install selimanac/defold-astar xmath-usage --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/selimanac/defold-astar.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/xmath-usage .claude/skills/xmath-usage && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
xmath-usage
GitHub stars
111
Token cost
~1.5k tokens
SKILL.md length
501 words
Files
1
Skills in repo
13
Repo updated
First seen
Licence
None found

At a glance

Provides xmath API reference and in-place math optimization patterns for Defold.

  • Works in 5 steps: Pre-allocate scratch variables at module… → The output variable is always the first… → Functions return nothing — you cannot… → …
  • Writing performance-critical math code
  • SKILL.md covers Prerequisite: Verify xmath…, Core Concept: In-Place…, Key Rules and Optimization Pattern, plus 1 more section
  • Reaches github.com

What it does

Xmath Usage is an agent skill from selimanac/defold-astar. Provides xmath API reference and in-place math optimization patterns for Defold. Use when writing performance-critical math code, optimizing vector/quaternion/matrix operations, or when the user mentions xmath, zero-allocation math, or reducing Lua GC pressure.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Game Development. It works with Lua. The repository describes itself as: Pathfinder and A solver (astar or a-star) native extension for Defold Engine build on MicroPather.

When your agent uses it

  • Writing performance-critical math code
  • Optimizing vector/quaternion/matrix operations
  • The user mentions xmath
  • Zero-allocation math

Example prompts

  • “Use the xmath-usage skill to provide xmath API reference and in-place math optimization patterns for Defold”
  • “/xmath-usage”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Pre-allocate scratch variables at module scope or in init() — never inside update() or on_message().
  2. The output variable is always the first argument — this is the fundamental calling convention difference from vmath.
  3. Functions return nothing — you cannot chain calls. Use a scratch variable at each step.
  4. Use vmath to create initial objects — vmath.vector3(), vmath.vector4(), vmath.quat(), vmath.matrix4() to allocate scratch buffers, then…
  5. Type polymorphism — functions like xmath.lerp work for vector3, vector4, and quaternion based on the output argument type.

What it can do on your machine

Read from SKILL.md and the folder at commit 1471c54. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are lua).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Xmath Usage loads about 1.5k tokens when it runs. Until then it costs about 68 tokens; SKILL.md has 501 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~68
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Without a licence we can't republish the file, so here is its outline and opening line. It has 501 words (~1,509 tokens).

“Before applying any guidance from this skill, you MUST confirm that the project uses xmath. Check the game.project file for a dependency URL containing thejustinwalsh/defold-xmath (e.g. dependencies#N = https://github.com/thejustinwalsh/defold-xmath/archive/...). Alternatively, check for the presence of xmath/ in the .deps/ directory.”

— opening of SKILL.md by selimanac
name
xmath-usage

Read the full SKILL.md on GitHub

Files

Just SKILL.md in .agents/skills/xmath-usage of selimanac/defold-astar.

Open the folder on GitHubat commit 1471c54

Compare with similar skills

Xmath Usage next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Xmath Usage compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Xmath Usage this skillselimanac/defold-astar111—~1.5kAutomated safety check: PassNone
Sync Simplegraphicatty303/pob-web103—~1.4kAutomated safety check: PassMIT
Dota2 Game LogicXavierCHN/x-template216—~2.7kAutomated safety check: PassMIT
Love2d Coregamedev-skills/awesome-gamedev-agent-skills1.3k—~1.6kAutomated safety check: PassApache-2.0
Cpp Compiler FlagsSerial-Studio/Serial-Studio7.2k—~2.1kAutomated safety check: PassCustom licence
Lua Ecozhaojh329/lua-eco103—~1.7kAutomated safety check: PassMIT

Similar skills

  • Sync Simplegraphic

    atty303/pob-web

    Synchronize pob-web with PathOfBuilding-SimpleGraphic only when the user explicitly invokes $sync-simplegraphic.

    103 GitHub stars~1.4k tokensUpdated 2 days ago
    Game DevelopmentAuto-check passed
  • Dota2 Game Logic

    XavierCHN/x-template

    DOTA2 自定义游戏服务端逻辑开发指南。触发词:游戏逻辑、服务端、server、game mode、游戏模式、GameRules、modifier、timer、lua、TSTL。Use when user asks to create or modify DOTA2 custom game server-side logic, game mode configuration…

    216 GitHub stars~2.7k tokensUpdated 4 mo ago
    Game DevelopmentAuto-check passed
  • Love2d Core

    gamedev-skills/awesome-gamedev-agent-skills

    Structure and debug a LÖVE (Love2D) game in Lua: the love.load/update/draw loop, delta-time movement, input, and screen states.

    1.3k GitHub stars~1.6k tokensUpdated 10 days ago
    Game DevelopmentAuto-check passed
  • Cpp Compiler Flags

    Serial-Studio/Serial-Studio

    C++ compiler/linker flag guidance for Serial Studio's build (GCC, Clang, AppleClang, MSVC cl.exe, clang-cl, MinGW, IntelLLVM).

    7.2k GitHub stars~2.1k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Lua Eco

    zhaojh329/lua-eco

    International lua-eco public API skill for writing, reviewing, explaining, and fixing Lua 5.4 code that runs on the eco runtime.

    103 GitHub stars~1.7k tokensUpdated 7 days ago
    Backend & APIsAuto-check passed
  • Audit Docs

    chrisguidry/docket

    As you edit pydocket — change a function body, modify a signature, alter a Lua script, refactor a public method, rewrite a docs section — verify that the docstrings and narrative docs touching that…

    148 GitHub stars~2.1k tokensUpdated today
    DevelopmentAuto-check passed

More from selimanac/defold-astar

All 13 skills in this repo
  • Defold Proto File Editing

    selimanac/defold-astar

    Creates and edits Defold resource and component files that use Protobuf Text Format (.collection, .go, .atlas, .sprite, .gui, .collisionobject, .convexshape, .label, .font, .material, .model, .mesh…

    111 GitHub stars~2.7k tokensUpdated 5 mo ago
    Auto-check passed
  • Defold Project Setup

    selimanac/defold-astar

    Downloads Defold project dependencies into .deps/ folder. An agent skill from selimanac/defold-astar.

    111 GitHub stars~900 tokensUpdated 5 mo ago
    Auto-check passed
  • Defold Skill Maintain

    selimanac/defold-astar

    Maintains Defold agent skills. An agent skill from selimanac/defold-astar.

    111 GitHub stars~657 tokensUpdated 5 mo ago
    Auto-check passed
  • Defold Scripts Editing

    selimanac/defold-astar

    Creates and edits Defold Lua script files (.script, .guiscript, .renderscript, .editorscript) and plain Lua modules (.lua).

    111 GitHub stars~1.8k tokensUpdated 5 mo ago
    Auto-check passed
  • Defold Assets Search

    selimanac/defold-astar

    Searches the Defold Asset Store for community libraries and extensions.

    111 GitHub stars~1.3k tokensUpdated 5 mo ago
    Auto-check passed
  • Defold Examples Fetch

    selimanac/defold-astar

    Fetches Defold code examples by topic. An agent skill from selimanac/defold-astar.

    111 GitHub stars~2.4k tokensUpdated 5 mo ago
    Auto-check passed

Works with

Questions about Xmath Usage

What does Xmath Usage do?

Provides xmath API reference and in-place math optimization patterns for Defold. Xmath Usage is an agent skill from selimanac/defold-astar. Provides xmath API reference and in-place math optimization patterns for Defold.

When should I use Xmath Usage?

Xmath Usage fits situations like: writing performance-critical math code; optimizing vector/quaternion/matrix operations; the user mentions xmath; zero-allocation math.

How do I install Xmath Usage in Claude Code?

Run `npx skills add selimanac/defold-astar --skill xmath-usage -a claude-code`. Or copy the skill folder (.agents/skills/xmath-usage in selimanac/defold-astar) into .claude/skills/xmath-usage in your project. Claude Code loads it when a task matches its description.

How do I install Xmath Usage in Codex?

Run `npx skills add selimanac/defold-astar --skill xmath-usage -a codex`. Or copy the skill folder (.agents/skills/xmath-usage in selimanac/defold-astar) into .agents/skills/xmath-usage in your project. Codex loads it when a task matches its description.

Can I use Xmath Usage in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add selimanac/defold-astar --skill xmath-usage -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/xmath-usage, .gemini/skills/xmath-usage, .github/skills/xmath-usage and .opencode/skills/xmath-usage in your project.

What does Xmath Usage need to run?

SKILL.md names no scripts, command-line tools or credentials: Xmath Usage is instructions for the agent only.

Does Xmath Usage access the network?

SKILL.md names 1 domain. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Xmath Usage safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Xmath Usage use?

No licence was found for Xmath Usage or its repository. Without one, default copyright applies: ask the author before reusing or redistributing it.

How many tokens does Xmath Usage use?

About 1.5k tokens (SKILL.md is roughly 6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Xmath Usage?

Skills that share tags, products or a category with Xmath Usage: Sync Simplegraphic (atty303/pob-web, 103 stars), Dota2 Game Logic (XavierCHN/x-template, 216 stars), Love2d Core (gamedev-skills/awesome-gamedev-agent-skills, 1.3k stars) and Cpp Compiler Flags (Serial-Studio/Serial-Studio, 7.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Xmath Usage?

selimanac (a GitHub user) maintains it in selimanac/defold-astar, which has 111 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on April 18, 2026.

Source: selimanac/defold-astar on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.