-
Notifications
You must be signed in to change notification settings - Fork 10
docs(cesium-context7): improve skill description, restructure content, and add evals #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
MKartaviciute
wants to merge
3
commits into
main
Choose a base branch
from
maka/update-cesium-context7-with-eval
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" }) | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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.", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is |
||
| "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" | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?