xmake-graph-module

xmake-graph-module is a skill for Claude Code from xmake-io/xmake-skills. It costs 71 tokens per session (1,597 once invoked), scanned A, original, Apache-2.0.

A Lua module for representing relationships between items as a graph, including directed graphs where arrows show dependency order. It supports adding items and connections, checking cycles, and finding a valid topological order.

In plain words
What is it for?
Use it in xmake scripts to model dependencies or other relationships, detect circular dependencies, inspect connections, copy a graph, or reverse its directions.
Why use it?
It removes the need to build graph storage and dependency-ordering logic yourself in an xmake script. A topological order lists items only after the items they depend on.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the xmake-skills plugin — 58 skills shipped together

Good fit Use it in xmake scripts to model dependencies or other relationships, detect circular dependencies, inspect connections, copy a graph, or reverse its directions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xmake-io/xmake-skills/xmake-graph-module
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add xmake-io/xmake-skills --skill xmake-graph-module
Clone the repo
git clone --depth 1 https://github.com/xmake-io/xmake-skills

Made for: Claude Code.

Or install xmake-skills, the plugin that ships this one along with the rest of its 58 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for xmake-graph-module

README.md
[![agentmods](https://agentmods.dev/badge/skills/xmake-io/xmake-skills/xmake-graph-module.svg)](https://agentmods.dev/skills/xmake-io/xmake-skills/xmake-graph-module)
Your own site
<a href="https://agentmods.dev/skills/xmake-io/xmake-skills/xmake-graph-module"><img src="https://agentmods.dev/badge/skills/xmake-io/xmake-skills/xmake-graph-module.svg" alt="Measured on agentmods" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,597 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00071 $0.01597
Opus 5 $0.00036 $0.00798
Sonnet 5 $0.00014 $0.00319
Haiku 4.5 $0.00007 $0.00160

Measured 8d ago against content hash 423c4f6c2f82, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

xmake-graph-module scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/scripting/xmake-graph-module/SKILL.md · 218 lines

How it starts

The opening of the file, as written. The whole thing — 218 lines — stays where its author put it; the contents beside it link to each section on GitHub.

core.base.graph — Graph Data Structure

core.base.graph is xmake's general-purpose graph module. It implements both directed and undirected graphs with topological sort and cycle detection. Use it when you need to model dependencies / relationships in a custom script but don't want to run them as async jobs (for that, use async.jobgraph, which wraps this).

Must be imported:

import("core.base.graph")

1. Create a graph

local dag = graph.new(true)    -- directed (DAG)
local ug  = graph.new(false)   -- undirected

2. Vertices and edges

g:add_vertex("a")
g:add_vertex("b")
g:add_vertex("c")

g:add_edge("a", "b")           -- a → b  (directed)
g:add_edge("b", "c")

print(g:has_vertex("a"))       -- true
print(g:has_edge("a", "b"))    -- true
print(#g:vertices())           -- 3

Vertices can be any value (strings, numbers, tables — anything you can use as a table key).

Shorthand

add_edge auto-adds endpoints:

local g = graph.new(true)
g:add_edge("a", "b")           -- "a" and "b" added automatically
g:add_edge("b", "c")

Inspect

for _, v in ipairs(g:vertices()) do print(v) end
for _, e in ipairs(g:edges()) do
    print(e:from(), "->", e:to())
end
for _, e in ipairs(g:adjacent_edges("a")) do
    print(e:to())              -- outgoing edges from "a"
end

Remove

g:remove_vertex("a")           -- also removes incident edges
g:clear()                      -- reset
print(g:empty())               -- true

3. Topological sort (DAG only)

local g = graph.new(true)
g:add_edge("parse",     "analyze")
g:add_edge("analyze",   "optimize")
g:add_edge("optimize",  "emit")

local order, has_cycle = g:topo_sort()
if has_cycle then
    raise("cycle detected!")
end
for _, v in ipairs(order) do
    print(v)     -- parse, analyze, optimize, emit
end

topo_sort() returns (list, has_cycle). If there's a cycle, use find_cycle() to get the offending path:

local cycle = g:find_cycle()
if cycle then
    raise("cycle: %s", table.concat(cycle, " -> "))
end

Read the full file on GitHub · 218 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 218 lines · 71 tokens per session scan A 423c4f6c2f82

Subscribe to this mod's changes

xmake-graph-module is a skill published in the GitHub repository xmake-io/xmake-skills (23 stars, last pushed 15d ago), licensed Apache-2.0. It adds 71 tokens to every session and 1,597 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

matlab

Build, review, migrate, and safely plan MATLAB or GNU Octave numerical workflows, including arrays, tabular/time data, tests, projects, graphics, MAT files, and explicit Python interoperability.

K-Dense-AI/scientific-agent-skills · 42 tokens

ast-grep

Guide for writing ast-grep rules to perform structural code search and analysis. Use when users need to search codebases using Abstract Syntax Tree (AST) patterns, find specific code structures, or perform complex code queries that go beyond simple text search. This skill should be used when users ask to search for…

JanDeDobbeleer/oh-my-posh · 80 tokens

platform-detection

Identify a .NET project's test platform, framework, command mode, and SDK-style vs classic project system. Use only for "which test platform/framework?", "VSTest or MTP?", or "what runner does this project use?", including bridge settings, UseVSTest opt-outs, and incompatible or conflicting VSTest/MTP configuration.…

dotnet/skills · 146 tokens

unity-version-split

Split a C# file into Unity 6.5+ and pre-Unity 6.5 variants. Use when a file needs different implementations for different Unity versions due to API changes (e.g., EntityId vs int, GetEntityId vs GetInstanceID).

IvanMurzak/Unity-MCP · 59 tokens

omh-rust

This is a Hermes-native rust workflow skill.

rlaope/oh-my-hermes · 69 tokens

axiom-concurrency

Use when writing ANY async code, actors, threads, or seeing ANY concurrency error. Covers Swift 6 concurrency, @MainActor, Sendable, data races, async/await patterns.

CharlesWiltgen/Axiom · 43 tokens