Add game-creator-plus: skill + 3D template + proxy-aware scripts#21
Draft
rshtirmer wants to merge 6 commits into
Draft
Add game-creator-plus: skill + 3D template + proxy-aware scripts#21rshtirmer wants to merge 6 commits into
rshtirmer wants to merge 6 commits into
Conversation
Premium-tier consumer for AI-generated 3D worlds (Marble Labs splats)
and characters/props (Meshy AI). Routes through a hosted proxy at
gamecreator.dev that bills users via Stripe-funded credits. The
backend implementation lives in a separate private repo.
Three pieces in this PR:
1. Skill (skills/game-creator-plus/) — cathedral pattern, splat
techniques, perf playbook, credit flow, proxy protocol. 6 docs.
2. Template (templates/plus-template/) — Three.js + SparkJS 2 +
Rapier runtime. Kinematic capsule, fake-floor physics, lightness
bake, splat fog, spring-arm camera, GLB + VRM character support,
mobile controls. Ships with cathedral demo world out of box (94MB
assets total — full splat + 500k/100k variants + collider).
3. Scripts (scripts/plus-*.mjs) — proxy-aware CLIs:
- plus-auth.mjs (signup, balance, topup, dev-grant, rotate-token)
- plus-generate-world.mjs (cathedral-pattern prompt augmentation)
- meshy-generate.mjs and worldlabs-generate.mjs now route through
GCPLUS_TOKEN if set (or ~/.gcplus/token), else direct upstream
Pricing verified against docs.worldlabs.ai and docs.meshy.ai
(2026-04-29). Marble 1.1-Plus is variable-cost (preauth-max +
settle-actual on the backend); other models are flat. 17% markup
over our upstream cost.
Backend (NestJS proxy) lives in private OpusGameLabs/plus-backend
(TBD). 78 tests (40 unit + 38 e2e) cover credit ledger, reconciliation
poller, asset mirror, Stripe webhook (event idempotency, refund/
dispute claw-back), admin metrics. Test suite caught 2 production
bugs during development (Marble cost field path, top-spenders ORDER
BY string-sort).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
7 tasks
Resolves PR-21-AUDIT.md sections 1.1, 1.2, 1.3, 3.4, 3.6, 3.7, 3.9, 3.10. §1.2 — meshy-generate.mjs proxy mode silently 404'd every /v1/* endpoint. resolvePath stripped only ^/v2 so image-to-3d, rigging, animations, retexture, remesh all resolved to /v1/meshy/v1/<endpoint>. Switch strip pattern + Idempotency-Key predicate to /v[12]/. §1.3 — Add LFS rules for *.spz and *.vrm. Drop the 67MB cathedral.spz (full-res tier) from the demo — desktop default is 'low' (500k tier, 7.8MB) and mobile is 'mini' (100k tier, 1.3MB), so the demo still works. SplatLoader's 'full' branch now falls back to 500k with a warning if the file is missing, matching 'progressive' behavior. Users who want the full tier generate their own world via plus-generate-world.mjs. §1.1 — plus-bake-lightness.mjs script doesn't exist; was referenced 4× in skill docs + plus-generate-world.mjs:683. Replaced with ?bake=lightness URL flow which the in-browser BakeLightness.js already handles. §3.4 — plus-template render_game_to_text() now includes the CLAUDE.md rule 6 fields (mode, score, coordinate-system note, player velocity). §3.6 — Pricing table in SKILL.md was numerically wrong (claimed "150cr base + 30cr/cube" while credit-flow.md and the backend implement 148-288cr Plus / 14-22cr draft / 7-70cr Meshy). Aligned with credit-flow.md and the actual priceForMarbleRequest / priceForMeshyRequest in the backend. §3.7 — Soften "talk-to-Claude topup" framing. Claude can't charge a card; what it can do is print a one-click Stripe Checkout URL. §3.9 — Drop production-deployment checklist from CLAUDE.md (sk_live rotation, WAF rules, SDK upgrade procedures). Belongs in the private backend repo, not the public-facing plugin docs. §3.10 — Drop "(TBD)" wording on the OpusGameLabs/plus-backend reference; the repo exists. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…+ 3.2)
Resolves PR-21-AUDIT.md sections 2.3 (welcome_url), 3.1 (magic-link
login), 3.2 (account deletion).
The audit's recommendation for each was "implement OR strike from docs."
proxy-protocol.md and credit-flow.md described:
- welcome_url returning a /welcome HTML page with the topup button
- POST /v1/login for magic-link bearer-token recovery
- DELETE /v1/account for GDPR-compliant deletion + Stripe refund
None are implemented. Implementing them properly is its own scope —
magic-link needs email infrastructure; GDPR deletion needs Stripe
customer deletion + refund flow + asset purge cron.
Updated the docs to reflect what actually ships:
- signup response now shows welcome_url:null with a note that the
/welcome page is roadmap; first_topup_url is the actionable Stripe
Checkout URL the CLI surfaces (which IS implemented)
- removed the POST /v1/login section; the 409 conflict-on-existing-email
note now says token recovery is via support, not magic link
- DELETE /v1/account marked with `*(roadmap — not yet implemented)*`
and points users at support for refunds/deletion in the meantime
- first-time-signup walkthrough in credit-flow.md updated to match
the actual UX (CLI prints Stripe URL → /topup/success page)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Resolves PR-21-AUDIT.md §3.8. CLAUDE.md tech stack table promised three ^0.183.0 and vite ^7.3.1; the plus-template package.json shipped with three ^0.180.0 and vite ^5.4.0. Bumped both to match the documented versions. Verified the template still builds clean via `npm run build` (vite 7.3.2, 52 modules, 7.8MB output — same shape as before). SparkJS warns about the three peer-dep range (it pins ^0.180.0) but the API surface we use is stable across the bump; no runtime change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Resolves PR-21-AUDIT.md §3.5. CLAUDE.md rule 5 lists `audio/` as a canonical game directory but the plus-template shipped without it. Audit suggested either porting the flappy-bird audio system or "documenting the omission with a 'see add-audio skill' pointer." Going with the pointer — most games built on this template (souls battles, exploration, slow-paced 3D) want different audio characteristics than flappy-bird's tight SFX/BGM, and porting something they'll throw out is worse than scaffolding it on demand. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds game-creator-plus, a premium-tier consumer for AI-generated 3D worlds (Marble Labs Gaussian splats) and characters (Meshy AI). Users buy credits via Stripe and get production-quality 3D content baked into playable browser games.
The proxy backend that bills credits + holds upstream API keys lives in a separate private repo (TBD). This PR ships only the public-facing pieces.
What's in this PR
Skill (
skills/game-creator-plus/)SKILL.md— when/how to use, decision tree, checklistcathedral-pattern.md— empty-interior-with-image-reference prompting recipesplat-techniques.md— fake-floor, lightness bake, splat fogperf-playbook.md— frame budget, the 12.8mssetPixelRatio(1)win, etc.credit-flow.md— pricing, topup UX, ledger semanticsproxy-protocol.md— wire format spec for client scripts ↔ backendTemplate (
templates/plus-template/)A complete Three.js + SparkJS 2 + Rapier runtime for splat-based playable levels:
Game.jsis the gameplay surface; everything else is reusable infraScripts (
scripts/plus-*.mjs)plus-auth.mjs— signup, balance, topup, dev-grant, rotate-tokenplus-generate-world.mjs— Marble proxy with cathedral-pattern prompt augmentationplus-prompt-templates.mjs— 5 scene-type prompt buildersmeshy-generate.mjsandworldlabs-generate.mjsare now proxy-aware: route throughGCPLUS_TOKEN(or~/.gcplus/token) if present, else direct upstreamDocs
README.md— added "Premium Tier: game-creator-plus" sectionCLAUDE.md— added repo-structure entries + an Operations section pointing at the (private) backendWhat's NOT in this PR
OpusGameLabs/plus-backend, TBD). It implements the contract documented inproxy-protocol.mdand is hosted atgamecreator.dev.Pricing
Verified against
docs.worldlabs.ai/api/pricinganddocs.meshy.ai/en/api/pricingon 2026-04-29. 17% markup over our upstream cost. Per-operation table inskills/game-creator-plus/credit-flow.md.Test plan
cd templates/plus-template && npm install && npm run devboots and walks the cathedral?slug=cathedral(default) loads the splat + collider + fake floor; player walks without falling through?character=robot|soldier|xbot|vrmswaps the player model?cam=first|third|topdown|sideswaps the camera modenode scripts/plus-auth.mjs --helpworks (no crash on missing token)node scripts/plus-generate-world.mjs --helpworksmeshy-generate.mjsdirect mode (withMESHY_API_KEY) still works for users who BYO keyssite/plus-backendreferences anywhere in this branch (grep -r "site/plus-backend")Note on file sizes
cathedral.spzis 64MB — past GitHub's 50MB recommendation but well below the 100MB hard limit. Future PRs may move large splat assets to LFS or external storage; for now keeping the demo world inline so the template works out of box.🤖 Generated with Claude Code