Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 0 additions & 73 deletions .github/skills/cesium-context7/SKILL.md

This file was deleted.

99 changes: 53 additions & 46 deletions skills/cesium-context7/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,73 +1,80 @@
---
name: cesium-context7
description: "Fetches up-to-date documentation for Cesium, CesiumJS, Cesium Viewer, 3D Tiles, Unreal Engine integration, Unity integration, cesium-unreal, cesium-unity, ACesium3DTileset, ACesiumGeoreference, Globe Anchor, Cesium plugin, georeferencing, and Cesium-related APIs using Context7 MCP tools. Useful for CesiumJS classes (Viewer, Entity, Camera, Scene, Cartesian3, etc.), Unreal Engine Cesium components, Unity Cesium components, 3D Tiles specification, and Cesium integrations. Use query-docs with library IDs: /cesiumgs/cesium (CesiumJS), /cesiumgs/cesium-unreal (Unreal), /cesiumgs/cesium-unity (Unity), /websites/ogc_cs_22-025r4 (3D Tiles spec)."
description: "Fetches up-to-date documentation for Cesium, CesiumJS, CesiumJS Viewer, 3D Tiles, Unreal Engine integration, Unity integration, cesium-unreal, cesium-unity, ACesium3DTileset, ACesiumGeoreference, Globe Anchor, Cesium plugin, georeferencing, and Cesium-related APIs using Context7 MCP tools. Use this skill whenever the user asks about CesiumJS classes (Viewer, Entity, Camera, Scene, Cartesian3, ImageryLayer, DataSource, etc.), Unreal Engine Cesium components (ACesium3DTileset, ACesiumGeoreference, Globe Anchor), Unity Cesium components (Cesium3DTileset, CesiumCameraController), the 3D Tiles specification, or any Cesium integration or API question — even if they don't explicitly ask for docs. Always fetch docs before writing or reviewing Cesium code. Use query-docs with library IDs: /cesiumgs/cesium (CesiumJS), /cesiumgs/cesium-unreal (Unreal), /cesiumgs/cesium-unity (Unity), /websites/ogc_cs_22-025r4 (3D Tiles spec)."
---

# Context7 for Cesium Development

This skill provides access to up-to-date Cesium documentation for CesiumJS, Unreal Engine integration, and Unity integration.
Fetch current Cesium documentation via Context7 before answering questions or generating code. Cesium APIs evolve quickly; fetching up-to-date docs prevents hallucinated method signatures and stale examples.

When working with Cesium-related code, use Context7 MCP Server tools to fetch current documentation before providing answers or generating code.
## When to use this skill

## Available Tools

### 1. `resolve-library-id`

Search for libraries and retrieve their Context7 library IDs.

**⚠️ Only use this tool when it's unclear which library to use. For Cesium projects, use the Known Library IDs listed below.**

**Parameters**:

- `libraryName` (string, required): Name of the library to search
- `query` (string, optional): Additional search context
Use this skill for **any** of these:

**Example use case**: Find the correct library ID for an unfamiliar library or when the library ID is unknown.
- CesiumJS code: Viewer, Entity, Camera, Scene, Cartesian3, Primitive, DataSource, ImageryProvider, TerrainProvider, etc.
- Cesium for Unreal: ACesium3DTileset, ACesiumGeoreference, globe anchors, Blueprint integration
- Cesium for Unity: Cesium3DTileset component, CesiumCameraController, C# scripting
- 3D Tiles specification: tileset.json format, refinement strategies (ADD vs REPLACE), metadata schemas, implicit tiling
- General Cesium integration questions, even if the user doesn't say "look up docs"

### 2. `query-docs`
## Workflow

Retrieve documentation for a specific library and query.

**Parameters**:

- `libraryId` (string, required): Context7 library ID
- `query` (string, required): Documentation query or topic
- `version` (string, optional): Specific library version

**Example use case**: Get documentation for Cesium Viewer initialization using library `/cesiumgs/cesium`.
1. **Identify the library** from the Known Library IDs below (almost always no need to call `resolve-library-id`).
2. **Call `query-docs`** with a focused query — fetch docs *before* writing or reviewing code.
3. **If the question spans multiple areas** (e.g., CesiumJS API + 3D Tiles spec, or Unreal + CesiumJS concepts), make separate `query-docs` calls and synthesize the results.
4. **Answer or generate code** using fetched documentation; cite specific classes/methods you used.

## Known Library IDs

### CesiumJS API Documentation
| Library | ID | Use for |
|---|---|---|
| CesiumJS | `/cesiumgs/cesium` | Viewer, Entity, Camera, Scene, Cartesian3, Primitive, ImageryLayer, DataSource, … |
| Cesium for Unreal | `/cesiumgs/cesium-unreal` | ACesium3DTileset, ACesiumGeoreference, Globe Anchor, Blueprint |
| Cesium for Unity | `/cesiumgs/cesium-unity` | Cesium3DTileset, CesiumCameraController, C# scripting |
| 3D Tiles Spec | `/websites/ogc_cs_22-025r4` | tileset.json, refinement, metadata schemas, implicit tiling |

For class constructors, methods, and properties (e.g., Viewer, Entity, Cartesian3, Camera methods, Scene properties):
## Available Tools

- Library ID: `/cesiumgs/cesium`
### `query-docs`

### Cesium for Unreal Engine
Retrieve documentation for a library.

For Unreal Engine integration (e.g., ACesium3DTileset, ACesiumGeoreference, Blueprint integration):
**Parameters**:
- `libraryId` (string, required): ID from the table above
- `query` (string, required): Specific topic or class/method name
- `version` (string, optional): Pin to a specific library version

- Library ID: `/cesiumgs/cesium-unreal`
### `resolve-library-id`

### Cesium for Unity
Search for an unknown library's Context7 ID.
**Only call this when the library is not listed above.**

For Unity integration (e.g., Cesium3DTileset component, CesiumCameraController, C# scripting):
## Query Tips

- Library ID: `/cesiumgs/cesium-unity`
Write focused, specific queries — you'll get better results:

### 3D Tiles Specification
| Instead of… | Try… |
|---|---|
| `"cesium camera"` | `"Camera.flyTo options and duration"` |
| `"entities"` | `"Entity billboard and label properties"` |
| `"3d tiles"` | `"3D Tiles ADD vs REPLACE refinement"` |
| `"unreal setup"` | `"ACesiumGeoreference SetOriginLongitudeLatitudeHeight"` |

For tile formats and schema details (e.g., tileset JSON structure, refinement strategies, metadata schemas):
## Examples

- Library ID: `/websites/ogc_cs_22-025r4`
**Single-library query:**
```
query-docs({ libraryId: "/cesiumgs/cesium", query: "Viewer constructor options terrain provider" })
```

## Usage Guidelines
**Multi-library query (CesiumJS + 3D Tiles spec):**
```
query-docs({ libraryId: "/cesiumgs/cesium", query: "Cesium3DTileset load tileset.json" })
query-docs({ libraryId: "/websites/ogc_cs_22-025r4", query: "tileset.json root tile schema" })
```

- Use the Known Library IDs listed above for Cesium-related queries
- When a question requires information from multiple sources (e.g., CesiumJS API + 3D Tiles spec, or Unreal integration + CesiumJS concepts), make separate `query-docs` calls with different library IDs to gather comprehensive documentation
- Use `resolve-library-id` when the library is unknown, not listed in Known Library IDs, or when it's unclear which library best fits the question
- Use `query-docs` to fetch documentation before generating code to ensure accuracy
- Specify the `version` parameter when working with a specific version
- Provide clear, specific queries to get the most relevant documentation
- Avoid hallucinations by using current, version-specific documentation
**Cesium for Unreal + CesiumJS concepts:**
```
query-docs({ libraryId: "/cesiumgs/cesium-unreal", query: "ACesium3DTileset metadata filtering" })
query-docs({ libraryId: "/websites/ogc_cs_22-025r4", query: "3D Tiles metadata schema EXT_mesh_features" })
```
65 changes: 65 additions & 0 deletions skills/cesium-context7/evals/evals.json
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there supposed to be a harness for this file? How are you running this?

Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"skill_name": "cesium-context7",
"evals": [
{
"id": 1,
"prompt": "I'm building a CesiumJS app and want to place a 3D model (glTF) at a specific latitude/longitude on the globe. I want it to sit flat on the terrain. How do I do this with the Entity API? Show me the code.",
"expected_output": "Code using CesiumJS Entity API with a model property, Cartesian3.fromDegrees for positioning, and HeadingPitchRoll or a model matrix to orient it on the terrain. Should be based on fetched docs from /cesiumgs/cesium.",
"files": [],
"expectations": [
"The skill calls query-docs with libraryId /cesiumgs/cesium before generating code",
"The response includes a code sample using viewer.entities.add() or a similar Entity API call",
"The code uses Cartesian3.fromDegrees or equivalent for lat/lon positioning",
"The skill does not hallucinate method signatures — all APIs match actual CesiumJS docs"
]
},
{
"id": 2,
"prompt": "What's the difference between ADD and REPLACE refinement in 3D Tiles? I'm loading a large city model and the tiles pop in really suddenly at close range. Should I switch refinement strategies and how does the tileset.json change?",
"expected_output": "Explanation of ADD vs REPLACE refinement based on the 3D Tiles spec, with practical guidance on which to use for city models and what the tileset.json refine property looks like.",
"files": [],
"expectations": [
"The skill calls query-docs with libraryId /websites/ogc_cs_22-025r4 to fetch 3D Tiles spec docs",
"The response correctly explains ADD (parent+child tiles shown together) vs REPLACE (parent hidden when child loads)",
"The response mentions the 'refine' property in tileset.json",
"The response gives practical advice for the city model LOD popping issue"
]
},
{
"id": 3,
"prompt": "I'm using Cesium for Unreal Engine 5. I have a Blueprint actor that I want to always stay at a fixed lat/lon on the globe, even as the player moves around. I tried setting the actor's world position but it drifts. What's the correct way to do this?",
"expected_output": "Guidance on using ACesiumGlobeAnchor (Globe Anchor) component to lock a Blueprint actor to a geographic coordinate, based on fetched docs from /cesiumgs/cesium-unreal.",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is ACesiumGlobeAnchor a hallucinated class name? Where did this come from?

"files": [],
"expectations": [
"The skill calls query-docs with libraryId /cesiumgs/cesium-unreal before answering",
"The response correctly identifies the Globe Anchor (UCesiumGlobeAnchorComponent or ACesiumGlobeAnchor) as the solution",
"The response explains why raw world position drifts (floating origin / world origin rebasing)",
"The response includes steps or a Blueprint workflow for attaching the Globe Anchor"
]
},
{
"id": 4,
"prompt": "How do I animate the CesiumJS camera to smoothly fly to Sydney, Australia and then pitch down to look at the Opera House? I want the flight to take about 3 seconds.",
"expected_output": "Code using Camera.flyTo() with destination (Cartesian3.fromDegrees for Sydney), orientation (HeadingPitchRoll or heading/pitch/roll), and a duration option. Based on fetched /cesiumgs/cesium docs.",
"files": [],
"expectations": [
"The skill calls query-docs with libraryId /cesiumgs/cesium and a query related to Camera flyTo",
"The code uses viewer.camera.flyTo() or viewer.scene.camera.flyTo()",
"The code includes a duration option set to approximately 3",
"The code uses correct destination and orientation parameters (not made up)"
]
},
{
"id": 5,
"prompt": "I'm loading a 3D Tileset in CesiumJS with Cesium.Cesium3DTileset and I want to apply a style that colors buildings red if their height property is above 50 meters. The tileset has a per-feature 'Height' property. How do I write the Cesium3DTileStyle?",
"expected_output": "Code showing a Cesium3DTileStyle with a color expression that reads the Height feature property and applies conditional coloring. Based on fetched /cesiumgs/cesium docs.",
"files": [],
"expectations": [
"The skill calls query-docs with libraryId /cesiumgs/cesium and a query related to Cesium3DTileStyle or feature styling",
"The response includes a Cesium3DTileStyle with a color property using a conditional expression",
"The expression uses the correct syntax for reading a feature property (e.g., ${Height})",
"The style is assigned to tileset.style"
]
}
]
}
Loading