Skip to content
cccskills
FreePublished on GitHub

critical-invariants

Kern engine critical invariants: coordinate system, UI Toolkit positioning, RenderTexture blit, LifetimeScope/scene structure, VolumeProfile editor API, camera pixel-grid alignment, performance analysis rules, profiler interpretation, and the no-fallback policy. Use when touching coordinates, WorldToScreen, UI element anchoring, RenderTexture, LifetimeScope, VolumeProfile, camera, FPS analysis, Profiler markers, or any code near an "invariant" comment. Triggers on: CoordinateUtils, MapManager.WorldHeight, RuntimePanelUtils, CameraTransformWorldToPanel, WorldToLocal, PositionWriteEpsilon, CameraPixelGridAligner, LifetimeScope, RegisterComponent, VolumeProfile, AssetDatabase.AddObjectToAsset, EditorLoop, VSync, fallback, paper white, FPS, frame time.

The English summary is being prepared. Showing the original description.

MinesReborn/Fodislop4 stars(GitHub 4 + cccskills 0)

Run score Not tested

See how to install

Files included (1)

  • SKILL.md4.3 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Critical engine invariants

Coordinates

  • Server coordinates have their origin at the top-left with Y pointing down.
  • Perform all transformations exclusively via CoordinateUtils with MapManager.WorldHeight.

UI Toolkit

  • Single style tree via KernTheme.tss; static structure lives in UXML.
  • Toggle visibility with the is-hidden class via UIState.
  • Screen coordinates via RuntimePanelUtils.ScreenToPanel.
  • An element anchored to a world point must be positioned exactly like WorldLabels.LateTick: RuntimePanelUtils.CameraTransformWorldToPanel for the point, then WorldToLocal of the container.
  • Rolling your own WorldToScreenPoint + ScreenToPanel is FORBIDDEN: left/top are relative to the parent, not the panel.
  • Position and size styles are written only when the change exceeds half a pixel (PositionWriteEpsilon). Writing unconditionally every frame shakes the element and keeps the panel style-dirty.

RenderTexture / blit

  • Blitting into a RenderTexture for a UI element must use Blend Off. With blending enabled, each frame accumulates on top of the previous contents — nobody clears the texture.

Scene / LifetimeScope

  • Every scene has exactly one root — its own LifetimeScope; all authored objects live beneath it.
  • Objects placed next to the scope are invisible to the container.
  • Guarded by ProductionSceneContractValidator.ValidateSingleRoot, fixable via Kern/Architecture/Move Scene Roots Under Composition Root.

VolumeProfile

  • VolumeProfile.Add<T>() creates the component in memory only; editor code must add it via AssetDatabase.AddObjectToAsset() before saving.

Camera

  • The camera moves with smoothing and snaps to the pixel grid (CameraPixelGridAligner.SnapPosition).

Performance and diagnostics

  • Do not mask defects by clearing Unity cache, recompiling, applying FPS caps, frame skipping, or throttling.
  • Only change hot paths after reproducing the issue or strictly confirming the root cause.
  • If performance worsened or did not improve after the agent's own change, the agent MUST explain the reason from the change itself: exactly what it added per frame (dispatch count and threads, marching steps, texture reads/writes, sizes of new textures and buffers) and why there was no gain. Shifting root-cause analysis onto the user is FORBIDDEN.
  • Before changing a GPU hot path — calculate its per-frame cost and compare it with what it replaces.

Lighting (update rate)

  • Lighting is FORBIDDEN from being rate-limited (timer, Hz cap, solve-frequency setting) — for neither light sources nor geometry.
  • Dynamic lights (robot light sources) must not be tied to entering a new cell.
  • Light is recalculated every frame together with the robot's smooth movement. Expensive passes must be made cheaper, not skipped.

Profiler / measurements

  • VSync NEVER explains performance. Forbidden to mention as a cause of low FPS, a "ceiling", "waiting for display", a measurement caveat, a recommendation, a code comment, or a line in a report.
  • "Editor overhead" (EditorLoop, Scene view GPU, PlayerConnection socket) is NEVER an explanation for low in-game FPS. These are measurement artifacts of Play Mode inside the Editor — look for the cause in Scripts, Rendering, Physics, GarbageCollector.

Fallbacks

  • Fallbacks are FORBIDDEN everywhere, always: no fallback values, simplified paths, or silent substitutions when primary data is absent. No texel — black. No data — error or empty. Masking missing data with a fallback is a bug, not resilience.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Refactor bloated AGENTS.md, CLAUDE.md, or similar agent instruction files to follow progressive disclosure principles. Splits monolithic files into organized, linked documentation.

The English summary is being prepared. Showing the original description.

MinesReborn/Fodislop4Updated Oct 26, 2026

Build and operate a live game using Unity Services. Use when the user needs to implement, connect, or debug backend-driven features — battle passes, achievements, player progression, cloud saves, leaderboards, matchmaking, virtual economies, server-authoritative logic, anti-cheat, player accounts and authentication, remote configuration, feature flags, A/B testing, analytics, or cloud resource deployment. Triggers on live-ops, live service, backend, server authority, cloud code, cloud save, remote config, player data, retention, monetization loop, season pass, ranking, multiplayer sessions, lobbies, or any Unity Services integration.

The English summary is being prepared. Showing the original description.

MinesReborn/Fodislop4Updated Oct 26, 2026

Kern project C# conventions, namespace rules, DI/VContainer patterns, and assembly layer boundaries. Use when writing, editing, or reviewing any C# file — MonoBehaviours, ScriptableObjects, services, contracts, factories, or editor scripts. Triggers on: namespace, nullable, asmdef, VContainer, RegisterComponent, IObjectResolver, composition root, Kern.Contracts, primary constructor, record struct, SA1513, _camelCase, PascalCase, asmref, MonoScript.GetClass.

The English summary is being prepared. Showing the original description.

MinesReborn/Fodislop4Updated Oct 26, 2026

Synchronize and compile FMOD Studio banks into StreamingAssets

The English summary is being prepared. Showing the original description.

MinesReborn/Fodislop4Updated Oct 26, 2026

Kern HDR/color pipeline contract: scene-referred linear working space, paper white units, radiance format rules, URP output transform ownership, DisplayFinal perceptual/linear space, UI brightness, HDR calibration screen, safe-start HDR switch, and HDROutputController usage. Use when touching lighting shaders, glow, bloom, tonemapping, post-processing, color grading, LUT, display output, UI colors, calibration, or any code with DisplaySettings / HDROutput / PaperWhite / Tonemapping / CompositeFinal / DisplayFinal / VisualTuning. Triggers on: saturate on radiance, clamp color, sRGB in shader, UNorm light buffer, ARGBHalf, paper white, HDROutputReconciler, VisualTuning, BT2390, detectPaperWhite, HDRCalibrationScreen, HDRSwitchPending, HDROutputSettings.

The English summary is being prepared. Showing the original description.

MinesReborn/Fodislop4Updated Oct 26, 2026

Implement, configure, and debug Unity In-App Purchases (IAP) — store connection, product catalog, consumable/non-consumable/subscription purchases, two-step pending-confirm flow, receipt validation, entitlement checking, restore transactions, Apple extensions (promotional purchases, Ask-to-Buy, code redemption), and Google Play extensions (subscription upgrade/downgrade), D2C Capabilities(direct to customer), 3rd party payment provider (Stripe/Coda) via Unity IAP/Unity Cloud. Use when the user needs to add, modify, debug, or migrate from native Android/iOS billing, 3rd party packages(RevenueCat/Adapty/Essential Kit/Unipay supported) to IAP. Triggers on microtransactions (MTX), monetization, real-money purchases, store purchases, buying items, support D2C, purchase via Stripe/Coda, migrate from native billing(Google's BillingClient or Apple's StoreKit/SKPaymentQueue/SKProduct)/RevenueCat/Adapty/EssentialKit/Unipay.

The English summary is being prepared. Showing the original description.

MinesReborn/Fodislop4Updated Oct 26, 2026

See all skills by MinesReborn

Report a problem with this skill