Skip to content

t1k:unity:sexygame:ads-remote-config

FieldValue
Modulesexygame
Version1.7.2
Effortmedium
Tools—

Keywords: ab test remote config, ad config, ad scenario, ads remote config, ads report, aoa, firebase remote config, interstitial interval, kịch bản ads, remote config, rewarded

/t1k:unity:sexygame:ads-remote-config
<game/project> <discord channel name> [--sa-vault <name> | --sa-file <path>]

Turn a Unity game’s live Firebase Remote Config into an accurate “when does this game show ads” report, without re-reading the ads code: the logic of every key is stored in references/. Read code only for keys or code versions the notes have not seen.

Scope: TheOne Unity games built on UITemplate + com.gdk.3rd (ads and monetization keys). Not for editing Remote Config values, not for ByteBrew/analytics (t1k:bytebrew, t1k:game-analytics).

IntentPath
“Lấy kịch bản ads / báo cáo lên kênh X”Full run: Workflow
“What does key K do?”references/key-registry.json (status, unit, note), then references/key-logic.md
Summarize live values only, no postWorkflow steps 1-3, answer in chat
Summary shows unknownKeys or code changedStep 3
Need a service accountAuth

Inputs (collect before running; ask once with AskUserQuestion if missing)

Section titled “Inputs (collect before running; ask once with AskUserQuestion if missing)”
  1. Project: the Unity project root (contains Assets/google-services.json, which gives the Firebase project id).
  2. Discord channel the user names. Never default to a channel. No named channel: answer in chat only.
  3. Auth: see Auth.

Run scripts from the Unity project root. <skill> = .claude/skills/t1k-unity-sexygame-ads-remote-config. Put outputs in the session scratchpad, never in the repo.

bun <skill>/scripts/fetch-remote-config.cjs --out <scratch>/rc.json [--sa-vault <name> | --sa-file <path>]

Prints one JSON line (ok, project, bytes, auth, groups, conditions); exit 1 with error on failure. It resolves the project id from google-services.json, prefers an installed firebase and falls back to npx firebase-tools, and forces IPv4 for the child (Node 20+ hangs ~90 s then fails on hosts with no IPv6 route). A timeout is not an auth error: retry once before changing auth.

bun <skill>/scripts/summarize-remote-config.cjs --rc <scratch>/rc.json --default-config Assets/Resources/GameConfigs/default_config.json

One JSON object (keys, experiments, drift, deadSet, unknownKeys, registryOnly, statusCounts, registryVerifiedAgainst). Large: write it to a file and read slices with jq; do not paste it into chat. drift = remote default differs from the in-app default, which is what a player sees when the fetch fails. A default-config that yields no keys is an error, never an empty drift.

The registry records the submodule SHAs and build defines it was verified against (registryVerifiedAgainst).

  1. unknownKeys non-empty: trace only those keys (recipes in key-logic.md § 9), add each to references/key-registry.json, and say so in the report.
  2. Compare git submodule status with registryVerifiedAgainst.submodules. If they differ, git diff <old>..<new> --stat inside each submodule for the files named in key-logic.md (AdServicesConfig.cs, UITemplateAdServiceWrapper.cs, PuzzleAdsHandler.cs, IAAEntryService.cs). No change to those: keep the notes. Changed: re-trace only the flows touched.
  3. Host-game checks that decide whether the notes apply at all (key-logic.md § 8): scripting defines (ADMOB, BRAVESTARS, X_COLLAPSIBLE_*), IsUsingAlternativeLoseFlow, which Register* calls its GameLifetimeScope makes. A different game can differ here even on identical SHAs.

Tracing is read-only fan-out: spawn Explore (leaf, one level), brief it with the key list plus key-logic.md, and require path:line evidence and UNVERIFIED marks. Spot-check its decisive claims with grep before trusting them: a routed cheap model reads fast and sometimes misstates a line. Never trace what the notes already settle.

After any new trace: update key-registry.json (+ verifiedAgainst) and key-logic.md, then run /t1k:sync-back so the next game gets it.

Combine the notes with live values; this is the judgment the scripts do not make. Compute the concrete scenario for this game:

  • Interstitial: which placements, from which level, the interval, the extra count gate (IAAEntry), session gate, and what resets the timer.
  • Rewarded call sites and what gates each; AOA first-open and resume; banner screens.
  • Active A/B experiments: id, exposure, per-variant values, and the condition that limits them to a platform/version.
  • Keys set remotely that do nothing (deadSet), gated-off keys someone may expect to work, and unverified keys (say they are unverified).
  • Fetch-failure behavior from drift: which features are off for a player whose fetch fails.

Separate what was verified (notes with evidence) from what was not. Never present an unverified key’s meaning as fact.

The user’s request that names the channel authorizes the post. Do not post anywhere else, and do not post when no channel was named.

  1. Load t1k-human-writing (guide mode) before drafting; layout rules are in t1k-discord-message (title, Needs/No-action marker, status groups, no em-dashes, under the length cap).
  2. Write in the language the user writes in. Put thresholds and numbers in the text, not adjectives.
  3. Resolve the channel by name with the Discord MCP: list the bot’s guilds, list channels of each. The channel list is large and is saved to a file: filter it with jq on .channels[].name. Several matches or none: AskUserQuestion, never guess.
  4. Two messages usually fit: the scenario, then discrepancies/risks/unverified. Each carries its own marker. Never include tester emails, tokens, or the service account.
  5. Report back to the user: channel, message links, and anything unverified.

Order: (1) ambient firebase login that can read the project: firebase login:list, then just run step 1. (2) A service account: --sa-vault <name> (the value is written to a 0600 temp file for the one call and deleted) or --sa-file <path>. Find a vault entry with t1k vault list (see the t1k-vault skill); none matches: ask the user for the name or path. The account needs cloudconfig.configs.get and firebase.projects.get on the project. Never print, paste, or commit a key; never write it into the repo.

  • Read-only on Firebase: this skill never publishes a template.
  • A key not in the registry is UNKNOWN, not “probably X”. Trace it or say it is unverified.
  • Line numbers in the notes drift: re-find by symbol.
  • Executed by: inline in the main session (judgment + posting); tracing is delegated to Explore.

Fetching the live values and summarizing them is mechanical: scripts/fetch-remote-config.cjs and scripts/summarize-remote-config.cjs run and their JSON output is read with no judgment, so a cheap-tier agent runs them (routing SSOT: rules/orchestration-rules.md § “Task-Type → Agent Routing”). The mapping to code logic, the report wording and the channel decision stay in the main session.

  • references/key-registry.json: per-key status (live, gated-off, dead, unverified), unit, note, and the SHAs verified against.
  • references/key-logic.md: interstitial chain, shared timer, call sites, AOA, banner, fetch fallback, re-verify recipes.
  • tests/summarize-remote-config.test.cjs: bun test ./.claude/skills/t1k-unity-sexygame-ads-remote-config/tests/summarize-remote-config.test.cjs (bun skips hidden dirs unless given the explicit file path).