t1k:unity:sexygame:ads-remote-config
| Field | Value |
|---|---|
| Module | sexygame |
| Version | 1.7.2 |
| Effort | medium |
| 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
How to invoke
Section titled “How to invoke”/t1k:unity:sexygame:ads-remote-config<game/project> <discord channel name> [--sa-vault <name> | --sa-file <path>]Ads Remote Config: Read, Explain, Report
Section titled “Ads Remote Config: Read, Explain, Report”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).
Decision Tree
Section titled “Decision Tree”| Intent | Path |
|---|---|
| “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 post | Workflow steps 1-3, answer in chat |
Summary shows unknownKeys or code changed | Step 3 |
| Need a service account | Auth |
Inputs (collect before running; ask once with AskUserQuestion if missing)
Section titled “Inputs (collect before running; ask once with AskUserQuestion if missing)”- Project: the Unity project root (contains
Assets/google-services.json, which gives the Firebase project id). - Discord channel the user names. Never default to a channel. No named channel: answer in chat only.
- Auth: see Auth.
Workflow
Section titled “Workflow”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.
1. Fetch
Section titled “1. Fetch”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.
2. Summarize
Section titled “2. Summarize”bun <skill>/scripts/summarize-remote-config.cjs --rc <scratch>/rc.json --default-config Assets/Resources/GameConfigs/default_config.jsonOne 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.
3. Check the notes are still true
Section titled “3. Check the notes are still true”The registry records the submodule SHAs and build defines it was verified against (registryVerifiedAgainst).
unknownKeysnon-empty: trace only those keys (recipes inkey-logic.md§ 9), add each toreferences/key-registry.json, and say so in the report.- Compare
git submodule statuswithregistryVerifiedAgainst.submodules. If they differ,git diff <old>..<new> --statinside each submodule for the files named inkey-logic.md(AdServicesConfig.cs,UITemplateAdServiceWrapper.cs,PuzzleAdsHandler.cs,IAAEntryService.cs). No change to those: keep the notes. Changed: re-trace only the flows touched. - Host-game checks that decide whether the notes apply at all (
key-logic.md§ 8): scripting defines (ADMOB,BRAVESTARS,X_COLLAPSIBLE_*),IsUsingAlternativeLoseFlow, whichRegister*calls itsGameLifetimeScopemakes. 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.
4. Reason
Section titled “4. Reason”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-offkeys someone may expect to work, andunverifiedkeys (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.
5. Report to the channel
Section titled “5. Report to the channel”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.
- Load
t1k-human-writing(guide mode) before drafting; layout rules are int1k-discord-message(title, Needs/No-action marker, status groups, no em-dashes, under the length cap). - Write in the language the user writes in. Put thresholds and numbers in the text, not adjectives.
- 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
jqon.channels[].name. Several matches or none: AskUserQuestion, never guess. - Two messages usually fit: the scenario, then discrepancies/risks/unverified. Each carries its own marker. Never include tester emails, tokens, or the service account.
- 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.
Hard rules
Section titled “Hard rules”- 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.
Executed by
Section titled “Executed by”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
Section titled “References”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).