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 js-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/js-data-structures)<a href="https://agentmods.dev/skills/metarhia/metaskills/js-data-structures"><img src="https://agentmods.dev/badge/skills/metarhia/metaskills/js-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/js-data-structures"><img src="https://agentmods.dev/badge/skills/metarhia/metaskills/js-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.00077 | $0.02224 |
| Opus 5.5 | $0.00031 | $0.00890 |
| Sonnet 5.5 | $0.00015 | $0.00445 |
| Haiku 4.5 | $0.00008 | $0.00222 |
Grade A, and why
js-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 — 210 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Native Data Structures (JavaScript)
Choosing a native collection
- Fixed schema / DTO / JSON: use
Object(avoidMap, noJSON.stringify) - Dynamic string-to-value dict: use
MaporObject.create(null)(avoid plain{}if keys are user input) - Non-string keys, insertion order,
.size: useMap(avoidObject) - Ordered list, index access, transform: use
Array(avoidSet, no indexes) - Unique values, fast membership: use
Set(avoidArray.includeson large/dynamic sets) - Attach data to objects without retaining them: use
WeakMap(avoidMap, leaks) - Track object presence without retaining: use
WeakSet(avoidSet, leaks) - Numeric / binary data, I/O, crypto: use TypedArray /
ArrayBuffer(avoidnumber[]for hot binary work) - Hot queue / deque / stack ends: do not rely on
Array.shift/unshift— use a custom ring or linked structure
Complexity and code characteristics
Choose a structure for the property you need to control — not only for speed.
Big-O (typical average case; n = collection size):
Objectfield access: O(1) for fixed shapes; dynamic/delete-heavy objects degrade toward dictionary modeArrayindex get/set,push/pop: O(1);includes/indexOf/splice/shift/unshift: O(n)Mapget/set/has/delete,Setadd/has/delete: amortized O(1); iteration: O(n)WeakMap/WeakSetget/set/has/delete: amortized O(1); no iteration- TypedArray index get/set: O(1); grow/copy: O(n)
- Prefer the structure whose hot operation is O(1); measure before optimizing rare paths
Readability and semantics:
- Let the type state the intent:
Set= unique membership;Map= keyed registry;Array= ordered sequence; plainObject= record/DTO - Prefer a named collection over encoding the same idea in ad-hoc flags, parallel arrays, or stringly keys
- Use array methods (
.map,.filter,.reduce) when they match the transform; use explicit loops when control flow or performance matters - Avoid over-abstracting: a small static
Arrayallowlist is clearer than aSetused once
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 First seen · 210 lines · 77 tokens per session scan A aec3cd8159d1
js-data-structures is a skill published in the GitHub repository metarhia/metaskills (59 stars, last pushed 2mo ago), licensed MIT. It adds 77 tokens to every session and 2,224 once invoked, about $0.0003 per session on Opus 5.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.
Other skills, from other repositories
post-processing
Extract, analyze, and summarize simulation output data — pull spatial fields at specific timesteps, compute time-series trends and detect steady state, extract line profiles through the domain, generate statistical summaries and distributions, calculate derived quantities (gradients, fluxes, volume fractions…
nonlinear-solvers
Select and configure nonlinear solvers for root-finding f(x)=0, optimization min F(x), and least-squares problems — choose among Newton, Newton-Krylov, quasi-Newton (BFGS, L-BFGS), Broyden, Anderson acceleration, and Levenberg-Marquardt methods, configure line search or trust-region globalization, diagnose convergence…
ontology-explorer
Parse, navigate, and query materials science ontology structures — browse class hierarchies, inspect individual classes and their properties, look up object and data property definitions with domain/range, search for ontology terms by keyword, and parse or summarize raw OWL/XML files. Currently supports CMSO and ASMO…
simulation-orchestrator
Orchestrate multi-simulation campaigns — generate parameter sweep configurations (grid, linspace, or Latin Hypercube sampling), initialize and track batch job campaigns, monitor job completion status, and aggregate results with summary statistics across all runs. Use when running a parameter study across dt, kappa, or…
simulation-validator
Validate simulations across three stages — run pre-flight checks on configuration files (parameter ranges, required fields, disk space), monitor runtime logs for residual growth, NaN/Inf, and adaptive dt collapse, and perform post-flight validation of results (physical bounds, mass/energy conservation, convergence).…
convergence-study
Perform spatial and temporal convergence analysis for solution verification — compute observed convergence orders from grid or timestep refinement studies, apply Richardson extrapolation to estimate discretization error, and calculate the Grid Convergence Index (GCI) per ASME V&V 20 standards. Use when verifying that…