--- name: geogebra-construct description: Generate editable GeoGebra HTML and open it in the Codex browser panel, with no MCP server or separate Chrome installation. --- Understand mathematical definitions, free inputs and dependent objects. Prefer GeoGebra relations over frozen coordinates. Generate commands in dependency order. ## Default workflow 1. Write a construction JSON in the user's project with `commands`, `filename` (a new `.html` path relative to the project), and optionally `visibleLabels`, `captionOverrides`, `showAxes`. For Cartesian diagrams use `showAxes: true`. 2. Resolve the installed plugin root from this skill's location (`../..`). Run: `node /dist/cli.js generate --input --workspace `. Quote every path. The generator needs Node >=22.12, no node_modules, MCP, or Chrome. Do not use an unversioned npx command to run unpublished local changes. 3. Open the returned HTML in the Codex right-side **browser panel**, not just the source editor. Use the available in-app browser/open-panel tools. If local file navigation is unsupported, serve the project on loopback, e.g. `python3 -m http.server 8765 --bind 127.0.0.1 --directory ` and open `http://127.0.0.1:8765/` with proper URL encoding. Reuse a running server or select another port if occupied. Do not expose it publicly. 4. Wait for `window.geogebraStudio.status === 'ready'` or `'error'` using the available browser inspection tools. `window.ggbReady` and `window.ggbError` remain compatibility flags. A failed command reports its index and text; fix the JSON, generate a new filename (existing files are not overwritten), and reload the correct URL. Never claim engine validation from generation alone. 5. Inspect the rendered page for tangency, incidence, branch selection, equal-axis scale, clipping and labels. Verify dragging a free point and the object sidebar. Keep the live viewer visible as the main deliverable. No background screenshot is required. If browser inspection is unavailable, report that verification remains pending. The viewer uses the official GeoGebra applet and needs internet access for engine assets. Do not replace it with a custom-drawn approximation. Read [visual standards](../../docs/VISUAL-STANDARD.md) for presentation and [the tangent regression](../../docs/TANGENT-REGRESSION.md) for intersection branches. ## Edits and exports Dragging/editing changes the current applet, not the original JSON or disk file. Use Download → current HTML or GGB to preserve changes before closing or refreshing. Reopened downloaded HTML loads packed GGB instead of replaying the original commands. For inspection, `await window.geogebraStudio.snapshot()` returns current `ggbBase64`, `constructionXml` and checks; this is a page-local API, not a tool connection. Do not regenerate from old commands when the user wants to keep manual edits. Read geometry-export for current-state downloads and source export limitations. ## Optional automation Only use `generate ... --verify` when background browser verification is requested or necessary for batch/CI work. It opts into Chrome, packed-GGB round-trip checks and a preview PNG. Prepare that runtime with `browser install` only when needed. The legacy `mcp` command and tools remain available for explicit integrations; normal construction does not require starting or registering them.