Skip to content

t1k:marketing:store:create-firebase

FieldValue
Modulestore
Version0.14.9
Effortmedium
Tools—
/t1k:marketing:store:create-firebase

Create a Firebase project (console, headless)

Section titled “Create a Firebase project (console, headless)”

Studio Firebase projects live under the marketing@the1studio.org account, in the TheOneStudio parent folder. This skill creates a project there and manages its members — through the console, headless, without touching the user’s own Chrome.

Proven end-to-end on project mememix-sound-voice-party (2026-10-21).

Every step below is judgment-free except the two irreversible ones, and the skill is user-only for that reason:

StepAgent
launch, verify, search, staff, status, cleanupt1k-metrics-reporter — read-only against the console (a search, an account read, a process probe); cleanup deletes only the throwaway profile copy this skill made
create --dry-runt1k-metrics-reporter — stops before the Create click, so nothing exists afterwards
create without --dry-runreasoning tier only — a Firebase project id is permanent and cannot be renamed or merged away
add-memberreasoning tier only — grants a real person access to a studio project

Activate on: “create a firebase project”, “new firebase project for <game>”, “add <person> to firebase”, “firebase users and permissions”, “who has access to <project>”.

Do not use for: reading Firebase Analytics / GA4 metrics (→ t1k-marketing:analytics:firebase, a different skill that queries the GA Data API), for Google Play or App Store work (→ the other store skills), or for wiring a Firebase SDK into a game’s code (that is engine work, not store work).

The studio’s play-publisher service account has the Firebase Management and CRM APIs disabled, so there is no token path to project creation. The signed-in console session is the only surface. Do not spend time looking for a service-account route — it does not exist for this account.

  • Flatpak Google Chrome, with the marketing@the1studio.org profile signed in. The skill never logs in and never types a password: it copies an already-signed-in profile, so the user’s browser keeps running untouched.
  • bun add -g playwright && bunx playwright install chromium.
  • theonekit-core installed (this skill calls its chrome-profile.cjs to find the profile directory by email rather than guessing a Profile N).

bun scripts/firebase-console.cjs <command> — JSON on stdout, non-interactive flags, stable exit codes (0 ok · 1 error · 2 usage · 3 account mismatch, aborted · 4 no Chrome/profile · 5 CDP failed · 6 duplicate project · 7 create incomplete).

CommandDoes
launch [--profile-email <e>] [--port 9333]resolve the profile by email, copy it to ~/.var/app/com.google.Chrome/headless-mkt, start headless Chrome, wait for CDP
verifyassert the signed-in account is marketing@the1studio.org — the gate every other command runs first
search <query>search existing projects (the home grid shows only ~10 of ~226)
create --name <n> [--gemini on|off] [--ga on|off] [--ga-account "The One Studio"] [--dry-run]the full wizard, with the duplicate check ahead of the Create click
add-member --email <e> --role owner|editor|viewer [--project <id>]the IAM page: add member, pick role, submit
staffprint the editable team/member directory (references/staff.json)
cleanupkill the headless browser, delete the profile copy
statuswhat launch left behind, and whether it is still running
Terminal window
S=scripts/firebase-console.cjs
bun $S launch # copy profile + headless Chrome + CDP
bun $S verify # MUST print account=marketing@the1studio.org — else stop
bun $S search "mememix" # duplicate check BEFORE anything is created

Then ask the operator with AskUserQuestion before the irreversible step — Gemini on/off, Analytics on/off, and the GA account (defaults: both ON, account The One Studio). Read the name and the auto-generated project ID back in the same question if the wizard surfaced one: the ID is permanent.

Terminal window
bun $S create --name "My Game" --gemini on --ga on --ga-account "The One Studio"
bun $S cleanup # ALWAYS — the copy holds session cookies

Cleanup runs even on failure. If a run dies mid-way, status tells you what is still holding the port; cleanup is safe to run repeatedly.

Adding a member — the operator picks, never types

Section titled “Adding a member — the operator picks, never types”

Do not ask for an email address in free text. bun $S staff prints the directory (references/staff.json: teams and members), and the operator chooses from it with AskUserQuestion, multiSelect: true, offering:

  • each team as one option (adding a team adds its members one by one),
  • each member as one option,
  • an “Other” choice that means “type an address not listed here”.

Ask the role (Owner / Editor / Viewer) per pick in the same question — a team pick that should be Viewer-only must not silently inherit Owner.

Then, per address:

Terminal window
bun $S add-member --email <email> --role viewer

An external (gmail) address reports Invitation sent … Invited to <role>: the grant is pending until that person accepts. Say so when reporting — “added” is not the same as “has access yet”.

references/staff.json is the seed, and it is EDITABLE — replace the EXAMPLE rows with real studio people. It ships placeholders on purpose (no personal email is committed to this kit).

The studio identity service (t1k-users-mapping, https://users.the1studio.org) is the SSOT for one person’s cross-platform ids and can supply an email for an individual, but it has no team dimension and leaves email null on most rows — so it cannot produce this list. Use it to look a person up, never as the source of teams.

  • The account gate is absolute. verify/create/add-member abort with exit 3 unless the Google Account aria-label contains marketing@the1studio.org. Never work around it, and never sign a different account in “just for this run”: the project would land outside the studio folder and be invisible to the team.
  • A colon in the project name is rejected by the console — the script refuses it before typing anything.
  • The home page is not the project list. It shows ~10 of the account’s ~226 projects. Only the search box (input[type=search]) answers “does this already exist”, and the script’s duplicate check uses it before Create.
  • exact: true on every role-based button query. A loose match makes “Previous” hit the paginator’s “Previous page”, which silently does nothing.
  • Never touch ~/.config/t1k/play-browser-profile — it is not signed into Google. And the play-publisher service account cannot help (APIs disabled, above).
  • Dropdown options are not role=option. The Google Analytics account menu renders into .cdk-overlay-container; match by exact text inside the overlay.
  • Toggle ids renumber. Use button[role=switch] / aria-checked, not #mat-mdc-slide-toggle-N-button — N changes after every navigation.
  • --headless=new with a copied Local State. Without Local State Chrome starts signed OUT even though the profile directory is right.
  • The copy must live under ~/.var/app/com.google.Chrome/. A path in /tmp is invisible to the Flatpak sandbox, and Chrome starts with an empty profile.
  • Killing the browser needs the bracket trick. pgrep -f headless-mkt also matches the shell that ran it and takes the caller down (exit 144). The script brackets the last character (headless-mk[t]) and escalates to -9 after a grace period.
  • Always delete the copy on cleanup, not just the process: it contains the profile’s session cookies.

Reporting back (when the request came from Discord)

Section titled “Reporting back (when the request came from Discord)”

Two things, not one: a ✅ reaction on the request message and a reply tagging the requester. The reply must carry either a **🙋 Needs from you:** … line or a -# ✅ No action needed line under its title — discord-message-guard requires one of them. Include the project id, the console URL, and any invitation that is still pending.

  • The only account this skill acts as is marketing@the1studio.org. It never logs in, never reads or types a password, and never opens a Chrome profile that is already in use.
  • The profile copy is a credential (session cookies). It is created per run and deleted by cleanup; never copy it elsewhere, never commit it.
  • references/staff.json ships placeholders only — do not add a personal address to this kit.