cesiumjs-3d-tiles
CesiumJS 3D Tiles - Cesium3DTileset, compressed and CAD-style glTF content, MVTDataProvider, UrlTemplate3DTilesDataProvider,…
CesiumJS core utilities and networking - Resource, Color, Event, Request, RequestScheduler, error handling, helper functions, feature detection. Use when fetching remote data, managing HTTP requests, working with colors, handling events, debugging errors, or using utility
Claude Code
$ npx -y skills add CesiumGS/cesiumjs-skills --skill cesiumjs-core-utilities --agent claude-code
Codex
$ npx skills add CesiumGS/cesiumjs-skills --skill cesiumjs-core-utilities -a codex -y
Cursor
$ npx skills add CesiumGS/cesiumjs-skills --skill cesiumjs-core-utilities -a cursor -y
Gemini CLI
$ npx skills add CesiumGS/cesiumjs-skills --skill cesiumjs-core-utilities -a gemini-cli -y
GitHub Copilot
$ npx skills add CesiumGS/cesiumjs-skills --skill cesiumjs-core-utilities -a github-copilot -y
OpenCode
$ npx skills add CesiumGS/cesiumjs-skills --skill cesiumjs-core-utilities -a opencode -y
Windsurf
$ npx skills add CesiumGS/cesiumjs-skills --skill cesiumjs-core-utilities -a windsurf -y
name: cesiumjs-core-utilities description: "CesiumJS core utilities and networking - Resource, Color, Event, Request, RequestScheduler, error handling, helper functions, feature detection. Use when fetching remote data, managing HTTP requests, working with colors, handling events, debugging errors, or using utility functions like defined, clone, or buildModuleUrl."
Version baseline: CesiumJS v1.144+ (ES module imports, `defaultValue` removed in v1.134)
// WRONG (removed in v1.134)
const name = defaultValue(options.name, "default");
const opts = defaultValue(options, defaultValue.EMPTY_OBJECT);
// CORRECT (v1.134+)
import { Frozen } from "cesium";
const name = options.name ?? "default";
const opts = options ?? Frozen.EMPTY_OBJECT;`Frozen.EMPTY_OBJECT` is `Object.freeze({})` and `Frozen.EMPTY_ARRAY` is `Object.freeze([])`. Use them as safe defaults for options objects and array parameters.
`Resource` is the unified class for all HTTP operations. It wraps URL construction, query parameters, headers, proxying, and retry logic.
import { Resource } from "cesium";
// Static shorthand: accepts a URL string or options object
const jsonData = await Resource.fetchJson({ url: "https://api.example.com/data.json" });
// data: URIs work with Resource.fetchJson -- useful for inline GeoJSON or test fixtures
const dataUrl = "data:application/json," + encodeURIComponent(JSON.stringify(geojson));
const parsed = await Resource.fetchJson({ url: dataUrl });
// Instance-based: construct once, reuse for multiple fetches
const resource = new Resource({
url: "https://api.example.com/features",
queryParameters: { format: "json", limit: "100" },
headers: { "Authorization": "Bearer my-token" },
});
const features = await resource.fetchJson();
const text = await resource.fetchText(); // string
const buffer = await resource.fetchArrayBuffer(); // ArrayBuffer
const blob = await resource.fetchBlob(); // Blob
const image = await resource.fetchImage(); // HTMLImageElement or ImageBitmapimport { Resource } from "cesium";
const api = new Resource({
url: "https://tiles.example.com/{version}/tiles/{z}/{x}/{y}.png",
templateValues: { version: "v2" },
headers: { "X-Api-Key": "abc123" },
});
// getDerivedResource inherits headers, proxy, and retry settings
const tile = api.getDerivedResource({
templateValues: { z: "10", x: "512", y: "384" },
});
const tileImage = await tile.fetchImage();
// Modify query parameters on an existing resource
resource.setQueryParameters({ access_token: "<access-token>" });
resource.appendQueryParameters({ extra: "param" });import { Resource, DefaultProxy } from "cesium";
// Retry on specific HTTP status codes
const resource = new Resource({
url: "https://api.example.com/unstable",
retryAttempts: 3,
retryCallback: (resource, error) => {
if (error.statusCode === 429) {
return new Promise((resolve) => setTimeout(() => resolve(true), 2000));
}
return false;
},
});
// DefaultProxy appends the target URL as a query parameter
const proxied = new Resource({
url: "https://external-server.com/data.json",
proxy: new DefaultProxy("/proxy/"),
});
// Request goes to: /proxy/?https%3A%2F%2Fexternal-server.com%2Fdata.jsonimport { Resource } from "cesium";
const resource = new Resource({ url: "https://api.example.com/upload" });
const result = await resource.post(JSON.stringify({ name: "test" }), {
headers: { "Content-Type": "application/json" },
});
// resource.put() works the same wayRGBA components as floats [0.0, 1.0]. Over 140 named constants as frozen static properties covering standard CSS color names in PascalCase (e.g., `Color.RED`, `Color.ORANGE`, `Color.YELLOW`, `Color.GREEN`, `Color.BLUE`, `Color.CORNFLOWERBLUE`, `Color.ROYALBLUE`, `Color.FORESTGREEN`, `Color.CRIMSON`, `Color.TRANSPARENT`).
When using `PinBuilder` for a visual eval, the pins must be unambiguously visible in the screenshot. Use 56-72 px pins for city-scale reviews, set `VerticalOrigin.BOTTOM`, and frame with a `Rectangle.fromDegrees(...)` or an altitude that leaves all pins comfortably inside the viewport. If one pin sits on an edge, zoom out or recenter; two visible pins out of three is a visual failure even if all entities exist.
import { Color } from "cesium";
const red = Color.RED; // frozen constant
const orange = Color.ORANGE; // frozen constant
const royalBlue = Color.ROYALBLUE; // frozen constant
const forestGreen = Color.FORESTGREEN; // frozen constant
const crimson = Color.CRIMSON; // frozen constant
const custom = new Color(0.2, 0.6, 0.8, 1.0); // float constructor
const blue = Color.fromCssColorString("#3498db"); // hex string
const semiRed = Color.fromCssColorString("rgba(255,0,0,0.5)"); // CSS rgba()
const coral = Color.fromBytes(255, 127, 80, 255); // 0-255 bytes
const hsl = Color.fromHsl(0.58, 0.8, 0.5, 1.0); // hue/sat/light
const bright = Color.fromRandom({ // constrained random
minimumRed: 0.75, minimumGreen: 0.75, minimumBlue: 0.75, alpha: 1.0,
});import { Color } from "cesium";
const base = Color.fromCssColorString("#3498db");
const translucent = base.withAlpha(0.5); // new Color with alpha
const lighter = base.brighten(0.3, new Color()); // requires result param
const darker = base.darken(0.3, new Color());
const css = base.toCssColorString(); // "rgCurated agent skills for CesiumJS development — 14 domain skills covering ~551 public symbols across the CesiumJS v1.143 API surface.
CesiumJS 3D Tiles - Cesium3DTileset, compressed and CAD-style glTF content, MVTDataProvider, UrlTemplate3DTilesDataProvider,…
CesiumJS camera control - Camera, flyTo, lookAt, setView, ScreenSpaceCameraController, composable Controller camera controllers…
CustomShader authoring — vertexShaderText and fragmentShaderText against VertexInput, FragmentInput, FeatureIds, Metadata,…
CesiumJS entities and data sources - Entity, EntityCollection, DataSource, GeoJsonDataSource, KmlDataSource, CzmlDataSource,…
CesiumJS imagery layers - ImageryProvider, ImageryLayer, ImageryLayerCollection, WMS, WMTS, Bing, OpenStreetMap, ArcGIS, Mapbox,…
CesiumJS interaction and picking - ScreenSpaceEventHandler, multi-key KeyboardEventModifier input actions, Scene.pick,…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.