cesiumjs-spatial-math

cesiumjs-spatial-math is a skill for Claude Code from CesiumGS/cesiumjs-skills. It costs 68 tokens per session (3,832 once invoked), scanned A, original, Apache-2.0.

A CesiumJS reference for calculating positions, directions, shapes, and coordinate changes on and around the Earth. CesiumJS is a JavaScript library for building 3D globes and maps.

In plain words
What is it for?
Use it to convert coordinates, calculate positions on an ellipsoid, transform reference frames, test spatial intersections, create model matrices, and work with bounding spheres or map projections.
Why use it?
It helps prevent mistakes when converting between longitude-and-latitude values, 3D Earth-centered coordinates, and other spatial systems.

Skill for Claude Code

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

Part of the cesiumjs-skills plugin — 15 skills, 1 hook, 1 MCP server shipped together

Good fit Use it to convert coordinates, calculate positions on an ellipsoid, transform reference frames, test spatial intersections, create model matrices, and work with bounding spheres or map projections.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cesiumgs/cesiumjs-skills/cesiumjs-spatial-math
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 CesiumGS/cesiumjs-skills --skill cesiumjs-spatial-math
Clone the repo
git clone --depth 1 https://github.com/CesiumGS/cesiumjs-skills

Made for: Claude Code.

Or install cesiumjs-skills, the plugin that ships this one along with the rest of its 15 skills, 1 hook, 1 MCP server.

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 cesiumjs-spatial-math

README.md
[![agentmods](https://agentmods.dev/badge/skills/cesiumgs/cesiumjs-skills/cesiumjs-spatial-math/github.svg)](https://agentmods.dev/skills/cesiumgs/cesiumjs-skills/cesiumjs-spatial-math)
Your own site
<a href="https://agentmods.dev/skills/cesiumgs/cesiumjs-skills/cesiumjs-spatial-math"><img src="https://agentmods.dev/badge/skills/cesiumgs/cesiumjs-skills/cesiumjs-spatial-math/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.

agentmods 80×15 button for cesiumjs-spatial-math

Your own site · 80×15
<a href="https://agentmods.dev/skills/cesiumgs/cesiumjs-skills/cesiumjs-spatial-math"><img src="https://agentmods.dev/badge/skills/cesiumgs/cesiumjs-skills/cesiumjs-spatial-math.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,832 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.00068 $0.03832
Opus 5 $0.00034 $0.01916
Sonnet 5 $0.00014 $0.00766
Haiku 4.5 $0.00007 $0.00383

Measured 10d ago against content hash 23ca9dbd4f2a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

cesiumjs-spatial-math 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 10d 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/cesiumjs-spatial-math/SKILL.md · 359 lines

How it starts

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

CesiumJS Spatial Math & Transforms

Version baseline: CesiumJS v1.143 (2026-07-01)

Mathematical foundation for every CesiumJS application: coordinate types, unit conversions, ellipsoid geometry, reference frame transforms, bounding volumes, intersection tests, and projections.

Core Concepts

CesiumJS uses a right-handed Earth-Centered Earth-Fixed (ECEF) coordinate system:

  • Cartesian3 -- ECEF (x, y, z) in meters. Internal representation for all 3D positions.
  • Cartographic -- (longitude, latitude, height). Angles are radians, height in meters above ellipsoid.

All angular values in core math are radians. Use Math.toRadians() / Math.toDegrees(). Math types use a static-method-with-result pattern: pass a result parameter to reuse allocations.

Cartesian3 -- Positions and Vectors

import { Cartesian3, Math as CesiumMath } from "cesium";

// From lon/lat degrees -- most common entry point
const pos = Cartesian3.fromDegrees(-105.0, 40.0);
const elevated = Cartesian3.fromDegrees(-105.0, 40.0, 1500.0); // with height

// Batch creation: [lon, lat, lon, lat, ...]
const ring = Cartesian3.fromDegreesArray([-105, 40, -100, 40, -100, 35]);

// With heights: [lon, lat, h, lon, lat, h, ...]
const wall = Cartesian3.fromDegreesArrayHeights([-105, 40, 500, -100, 40, 1000]);

// From raw ECEF or from radians
const raw = new Cartesian3(-1275096.0, -4797180.0, 4075270.0);
const fromRad = Cartesian3.fromRadians(-1.8326, 0.6981, 1500.0);

// Constants
Cartesian3.ZERO;   // (0,0,0)
Cartesian3.UNIT_X; // (1,0,0)
Cartesian3.UNIT_Y; // (0,1,0)
Cartesian3.UNIT_Z; // (0,0,1)

Breaking change (1.139, #8359): Cartesian2, Cartesian3, and Cartesian4 are now ES6 classes. Calling new on a static factory method now throws -- new Cartesian3.fromArray([...]) and new Cartesian3.fromDegrees(...) are errors. Drop new for factory methods (Cartesian3.fromArray([...])); keep it only for the real constructor (new Cartesian3(x, y, z)). More classes are migrating to ES6 classes, so apply this rule everywhere.

Read the full file on GitHub · 359 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. 10d ago First seen · 359 lines · 68 tokens per session scan A 23ca9dbd4f2a

Subscribe to this mod's changes

cesiumjs-spatial-math is a skill published in the GitHub repository CesiumGS/cesiumjs-skills (172 stars, last pushed 13d ago), licensed Apache-2.0. It adds 68 tokens to every session and 3,832 once invoked, about $0.0003 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

motherduck-create-dive

Create, edit, publish, share, or embed MotherDuck Dives using their React and SQL runtime.

motherduckdb/agent-skills · 27 tokens

create-mobile-app

Use when the user wants to start a new Power Apps mobile app (Expo / React Native / TypeScript, targeting iOS and Android) from scratch.

microsoft/power-platform-skills · 35 tokens

create-site

Creates a new Power Pages code site (SPA) using React, Angular, Vue, or Astro. Guides through the full process from initial concept to deployed site: requirements discovery, scaffolding, component planning, design, implementation, validation, and deployment. Use when the user wants to create, build, or scaffold a new…

microsoft/power-platform-skills · 73 tokens

app-builder

(Preview) Builds and edits a model-driven Power Apps app from a natural-language intent — tables, columns, relationships, adaptive forms with sub-grids, views, Choice-column charts, business rules, business process flows, generative page intents for overview/dashboard surfaces (page .tsx generated in generate-pages…

microsoft/power-platform-skills · 224 tokens

genpage

Creates, updates, and deploys Power Apps generative pages for model-driven apps using React v17, TypeScript, and Fluent UI V9. Orchestrates specialist agents for planning, entity creation, and code generation. Use it when user asks to build, retrieve, or update a page in an existing Microsoft Power Apps model-driven…

microsoft/power-platform-skills · 140 tokens

migrate-bootstrap

Migrates a traditional Power Pages site from Bootstrap 3 to Bootstrap 5. Downloads the site, runs the pac pages bootstrap-migrate engine, reviews the change report, applies AI-assisted fixes for the residual hierarchy/CSS changes the engine only flags, uploads the migrated site (which auto-enables the Bootstrap 5…

microsoft/power-platform-skills · 116 tokens