/coherent-gameface:gamefacefrom coherent-gameface
Provides domain knowledge for Coherent Gameface (Cohtml), the HTML/CSS/JS game-UI middleware. Helps debug UI that behaves differently in-game vs. browser, check feature support per engine version, and work with data-bind attributes or the engine JS API.
Ships in coherent-gameface. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Gameface renders game UI from HTML/CSS/JS. It is powered by Cohtml (the HTML engine) and Renoir (the rendering engine), proprietary technology that is not WebKit, Chromium, or Gecko, and not a WebView. JavaScript runs on V8. Gameface implements a deliberate subset of HTML5/CSS3 chosen for game-UI performance: an unsupported HTML element is not an error, it lays out as a generic unstyled flex box with no semantics, and unsupported CSS is silently ignored. (The older Coherent UI product was Chromium-based; search results about it do not describe Gameface.) This skill is written against docs v3.0.3.1, with Cities: Skylines II (CS2) as the reference target and worked example throughout.
Verified against Cohtml 2.2.11.3.
A VOLATILE: marker labels a claim the engine version moves, naming what moves and where to re-check it: the claim held on the reference target at the version above.
The docs are the map; the running game is the territory. Three rules keep them straight:
game_status reports the engine version (the CDP endpoint answers Browser: "Cohtml/x.y.z"), and game_eval settles support questions in one probe: typeof ResizeObserver for APIs, a style round-trip for CSS (el.style.setProperty('display', 'grid') then read it back; the parser rejects unsupported values, so they read back empty).
CSS.supports does not exist (the CSS global is only unit factories like CSS.px).
Page JS has no version global, but navigator.userAgent carries the engine version; sniff it for the version, feature-detect everything else.A support claim is settled only once it is version-gated, and probed when a game is connected.
Probing produces hard-won facts the docs lack: an undocumented quirk, a version boundary, a per-game flag setting. Store engine facts you discovered yourself in your auto memory, tagged with the game and Cohtml version they were verified on; they outlive the session and are expensive to rediscover.
Layout and styling:
display: flex (column direction) with box-sizing: border-box.
block and inline are simulated with flex.
flex-shrink defaults to 0.
<p> and <span> default to flex row.min-width/min-height: auto means 0.
Percentages on absolutely-positioned elements resolve against the direct parent, not the first positioned ancestor.
<html> is 100vw by 100vh.position: sticky, and display: inline/inline-block/contents have never existed in any version.<select>, radio, checkbox, range, <form>, and <ul>/<ol> rendering come from official polyfills; tables, lists, <details>/<summary>, <progress>/<meter>, and <hr> lay out as plain boxes.
Overflow scrolls but draws no scrollbar; scrollbars are built or polyfilled.>, +, ~, descendant space) only match when the game enables complex-selector styling (the per-game EnableComplexCSSSelectorsStyling flag): probe before relying on them.
:not(), ::placeholder, and :nth-of-type() are unsupported; ::before/::after exist since 1.19.
(VOLATILE: whether a stylesheet still drops each of the three — one sheet per construct against the running target, each holding a known-kept control rule beside the construct's, compared by rule count.)user-select defaults to none; text selection is opt-in.@keyframes and, before 3.2.1, as var() fallback values.
calc() cannot mix % with other units.
currentcolor does not exist.
Variables inside color functions are the root cause of most Tailwind utility failures.screen is implied); write feature-only queries: @media (min-width: 1280px).Timing (the game loop is the UI clock):
View::Advance call.
Effective rAF rate equals the game frame rate; a game that stops advancing the view freezes page JS entirely.getComputedStyle settles 2-3 frames after a change.
Idiom: wrap reads in requestAnimationFrame, nested twice for computed styles.mouseenter/over/leave/out only update when the game forwards mouse-move or scroll input.JS and DOM:
engine (defined by cohtml.js; gate startup on engine.whenReady) is the only JS-to-game bridge: engine.call(name, ...) returns a Promise from the single C++ handler, engine.trigger/engine.on are N-handler events, and models flow through engine.createJSModel / engine.updateWholeModel / engine.synchronizeModels plus data-bind-* attributes.fetch(), IntersectionObserver, Web Workers, iframes, <audio>, <dialog>, and contenteditable have never existed.
XHR and localStorage exist (sessionStorage is absent), served by the game's resource layer (coui:// scheme) rather than a network stack.
(VOLATILE: whether sessionStorage is still absent — a game_eval presence probe against the running target.)
WebSocket exists only when the game wired a socket transport.
V8 is 9.4 (ES2021) since Cohtml 1.26, with no later bump recorded.event.target/currentTarget are null once the dispatch call stack unwinds.
DOMContentLoaded exists only since 1.27; load fires after fonts load.document.evaluate (XPath), createTreeWalker, and innerText do not exist, and document.title is undefined (verified on the reference target).
(VOLATILE: whether each of the four is still absent — a game_eval presence probe of each member against the running target.)
Find elements by scanning querySelectorAll results and filtering on textContent.HTMLElement.click() does not exist, and PointerEvent/InputEvent constructors are missing.
(VOLATILE: whether each of the three is still missing — a game_eval presence probe of each against the running target.)
Simulate input by dispatching bubbling MouseEvent, KeyboardEvent, and Event('input') events.CSS.escape does not exist: select by a class name through the attribute form [class~='<name>'].
(VOLATILE: whether CSS.escape is still missing — a game_eval presence probe against the running target.)Docs base: https://docs.coherent-labs.com/cpp-gameface/.
Summarizing fetch tools (WebFetch and similar) fail on this site: every page front-loads hundreds of KB of minified navigation, so summarizers never reach the content.
Fetch pages with the shipped extractor instead (paths relative to this skill's directory):
node scripts/fetch-doc.mjs <url> # page content as markdown, tables intact
node scripts/fetch-doc.mjs sitemap # list every page URL of the docs site
Fallback without node: curl -s <url>, then read the HTML between <main and </main>.
Key pages (paths under the base):
| Page | Path |
|---|---|
| Differences to traditional browsers (prose, the quirks) | what_is_gfp/htmlfeaturesupport/ |
| Supported-features hub | content_development/supported_features_tables/ |
| HTML / CSS properties / CSS selectors / JS events / canvas / SVG tables | content_development/supported_features_tables/ + htmlelements/, cssproperties/, cssselectors/, jsevents/, canvassupport/, svgsupport/ |
| Feature changelog (all versions, one page) | changelog/feature/ |
| LTS changelog (post-branch fixes and backports) | changelog/lts/ |
| Content development (guides, tooling) | content_development/ |
| UI scripting (engine API, data binding) | integration/ui_scripting/ |
Reading the support tables:
load under DOM Level 3 is YES; load under XHR is not).* needs the complex-selectors flag, ** warns about structural pseudo-class performance.engine API surface, data-bind-* vocabulary, model lifecycle, mock game data, simulating input, DOM/JS quirks: references/scripting-data-binding.md.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
2 skills in this plugin
npx claudepluginhub citiesskylinesmodding/agents-plugins --plugin coherent-gamefaceOther plugins' skills for the same job