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.
npx skills add metarhia/metaskills --skill data-structuresgit clone --depth 1 https://github.com/metarhia/metaskillsWrote 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.
[](https://agentmods.dev/skills/metarhia/metaskills/data-structures)<a href="https://agentmods.dev/skills/metarhia/metaskills/data-structures"><img src="https://agentmods.dev/badge/skills/metarhia/metaskills/data-structures/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/metarhia/metaskills/data-structures"><img src="https://agentmods.dev/badge/skills/metarhia/metaskills/data-structures.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.03513 |
| Opus 5.5 | $0.00000 | $0.01405 |
| Sonnet 5.5 | $0.00000 | $0.00703 |
| Haiku 4.5 | $0.00000 | $0.00351 |
Grade A, and why
data-structures 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 489 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Custom Data Structures (JavaScript)
Complexity and code characteristics
Choose a structure for the property you need to control — not only for speed.
Big-O (typical; n = size, k = key/word length):
- Singly-linked push/pop at head: O(1); search / index: O(n)
- Doubly-linked append/prepend / splice at known node: O(1); index: O(n) (nearer-end walk helps)
- Cons
prepend/uncons: O(1);reverse/map/ random access: O(n); tails share structure - CircularBuffer / Queue / Deque / Stack ends: amortized O(1); grow rare O(n); never hot
Array.shift - UnrolledList enqueue/dequeue: amortized O(1); better locality than per-item nodes; pool cuts allocs
- BST insert/search: O(log n) balanced, O(n) skewed; in-order: O(n)
- Binary heap push/pop: O(log n); peek: O(1)
- Trie insert/has: O(k); autocomplete: O(matches × k)
- Adjacency-list addEdge: O(1); BFS/DFS: O(V + E)
- LRU (Map) get/set/evict: O(1); G-Counter inc O(1), merge O(replicas); Pool capture O(1) amortized
- Prefer the structure whose hot operation is O(1) or O(log n); measure before optimizing rare paths
Readability and semantics:
- Name by role:
pending(Queue),frontier(Deque),undo(Stack) — notbuffer1 - Type states intent: ring/unrolled = throughput; cons = persistent; heap = priority; trie = prefix
- Small public API (
enqueue/dequeue) — do not expose nodes or buffers
Stability and contracts:
- Return copies or iterators; document live vs snapshot and iteration order
- Cap growth (capacity, pool size, LRU max); unbounded queues/caches are operability bugs
- Immutable Cons/Struct: updates are new values (
prepend,fork); mutable lists document aliasing
Testability:
- Assert on contents (
[...q],toArray(), size), not private fields; keepSymbol.iterator - Deterministic fixtures; inject clocks/timeouts for Pool waiters
Encapsulation and cost:
- Hide representation so callers survive swaps (array → ring → unrolled)
- Amortized grow and node pools trade memory for latency; clear slots on dequeue for GC
- Power-of-2 ring capacity; index with
& (len - 1)instead of%
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.
- 1mo ago Changed · -27 lines 03b663e35d0a
- 3mo ago First seen · 516 lines · 0 tokens per session scan A 27364c6c35e4
data-structures is a skill published in the GitHub repository metarhia/metaskills (61 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,513 tokens. 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.
data-structures compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| data-structuresmetarhia/metaskills | Skill | 61 | 1mo ago | MIT | A | 0 | Claude Code, Codex |
| zcfgAdamBien/airails | Skill | 76 | 2d ago | MIT | A | 75 | Claude Code |
| microprofile-serverAdamBien/airails | Skill | 76 | 2d ago | MIT | A | 87 | Claude Code, Codex |
| authoring-java-sdk-tasksastronomer/agents | Skill | 466 | yesterday | Apache-2.0 | A | 152 | Claude Code |
| python-backendyonatangross/orchestkit | Skill | 313 | today | MIT | A | 47 | Claude Code |
| rust-programming-expertroedyrustam/vibes-plug | Skill | 132 | today | MIT | A | 58 | Cursor |
| python-programming-expertroedyrustam/vibes-plug | Skill | 132 | today | MIT | A | 53 | Cursor |