Skip to content

t1k:web:core:thirdparty-project

FieldValue
Modulecore
Version1.26.1
Effortmedium
Tools—

Keywords: ad units, admob app id, analytics requirements, applovin sdk key, archive project, bundle id, floor probing, mediation requirements, new project thirdparty, package name, register project, third party validator, thirdparty, thirdparty.the1studio.org, unarchive project

/t1k:web:core:thirdparty-project
[show|create|update|requirements|archive] [project-id]

Thirdparty Project: Maintain Projects from Chat

Section titled “Thirdparty Project: Maintain Projects from Chat”

Lets any studio member register and maintain a project on https://thirdparty.the1studio.org without the dashboard. Every write is a dry-run first. Nothing is saved until the person confirms the printed changes.

IntentPath
“What is the state of X”, “list projects”, “show the ad setup”Show
“Register a new project”Create
“Rename it”, “change bundle id, platform, repo, icon, Jenkins jobs”Update
“Set mediation, networks, ad unit ids, floor probing, analytics ids”Set requirements
“Archive it” / “bring it back”Archive
  • Writes default to a dry-run. Only --apply changes data, and you pass it only after the person confirms the printed changes with AskUserQuestion.
  • Never invent an id, bundle id, key or ad unit id. Ask for the missing value. The server’s answers are the only source of ids.
  • Never print, log or paste a GitHub token, a studio assertion or a full key. Keys appear only as ...last4. Relay that form and never reconstruct a value.
  • If the person must supply a key, have them write it into the JSON file themselves. Never ask them to type a key into the chat, and never echo one back.
  • The helper acts as the person, through their own GitHub login. It is for people only. Bots, CI and machine tokens are refused on these routes.
  • Do not commit, sync or push anything from this skill. It only calls the live service.
  • The helper needs Node 18 or newer (built-in fetch).
  • Auth: GITHUB_TOKEN if set, otherwise gh auth token. If neither works, stop and tell the person to run gh auth login.
  • The person must be in a GitHub team with push on The1Studio/ThirdPartyValidator. On not_in_team, stop and ask a studio-auth admin to add them. Do not work around it.

Run from the repository root:

bun .claude/skills/t1k-web-core-thirdparty-project/scripts/thirdparty-project.cjs <command> [args] [--file <path|->] [--apply]

Output is one JSON object on stdout: ok, mode (dry-run or applied), and on failure code, message, fix. The exit code is deterministic (see the error table). Run help to list the commands.

CommandWritesInput
contractnonone. Returns the live ad formats, networks, analytics providers and key-class paths
projects [--archived] [--limit N]nonone
project <id>nonone
requirements <id> <android|ios>nonone. Key values come back masked
create --file <path|->yes, with --applyproject JSON (see the field cheat-sheet)
update <id> --file <path|->yesa subset of the project fields
archive <id> / unarchive <id>yesnone
set-requirements <id> <android|ios> --file <path|->yes{ "ads": {...}, "analytics": {...} }, merged into the stored requirement
  1. Gather. Ask the person for every value you do not have. For an existing project, read the current state first (project or requirements).
  2. Write the JSON to a temporary file outside the repository, or pipe it with --file -. Keep it to the fields that change.
  3. Dry-run. Run the command without --apply. Read the changes array (or wouldSend for create).
  4. Confirm. Call AskUserQuestion with a plain summary of each change: field, from, to. Keys are already masked in the output, so show them as they are. Offer: Apply, Edit, Cancel.
  5. Apply only on “Apply”: rerun the same command with --apply. Report the result, including revisionBefore to revisionAfter for requirements.
  6. On a non-zero exit, read code and fix and act on them. Never retry a write blindly. A conflict (exit 5) means re-read and dry-run again.

Use projects to list (active by default; --archived for archived). Use project <id> for one project. Use requirements <id> android (or ios) for the ad and analytics setup. When state is not_set, say that nothing is saved yet for that platform. Do not treat it as an error.

  • Required: displayName, bundleId, platform (android, ios or both). Optional: gitRepoUrl, iconUrl, jenkinsJobs.
  • Ask for anything missing. Never derive a bundle id from the display name, and never guess one.
  • The dry-run sends nothing, not even the exchange. Only --apply contacts the server.
  • bundle_id_taken means the project already exists. Find its id with projects, then use update.
  • Send only the fields that change. An empty patch is refused.
  • A project_changed answer is retried once by the helper, which re-reads first. If it fails again, tell the person and stop.
  • Changing platform may affect requirements that are already saved. Say so in the summary.
  • Run contract before you map anything. Take format keys, network slugs and provider names from its output. Do not hardcode them.
  • The save is a merge. Omitted members are kept. requiredNetworks and adUnits are replaced as whole lists. An analytics provider object replaces that provider, and null removes it. The dry-run diff shows exactly what will be sent.
  • Key-class fields: ads.applovinSdkKey, ads.floorProbing.apiKey, analytics.appsflyer.devKey. The helper masks them everywhere.
  • The helper re-reads the revision and retries once on revision_conflict. A second conflict means someone else is editing. Stop and tell the person.
  • Field-by-field rules and examples: the field cheat-sheet in references/field-cheatsheet.md.
  • Archive and unarchive are idempotent. Archiving a project that is already archived is a no-op.
  • Before archiving, tell the person that an archived project is skipped by Jenkins validation (it is treated as not registered). Make them confirm that.
  • The helper has no delete. Do not offer one.

Key-class values show as ... plus the last four characters. Values of five characters or fewer show as ...***. Admob app and unit ids are not key-class and show in full. Ask for a key only when it is needed, and never repeat one.

Main session, inline. The helper is mechanical, but every write needs the person’s confirmation, so no sub-agent runs it.

  • Not for: deleting projects (no such route), build history or export, floor-probe tests, the Jenkins validator, or machine tokens.
  • The helper has been tested against a loopback mock of the API only. It has not been run against the live service. If the live exchange or the Access policy on the host refuses the studio bearer, the helper reports access_page or redirected (exit 3). Escalate that. Do not retry in a loop.
  • references/field-cheatsheet.md: every project and requirement field, its rule, and the merge behaviour.
  • references/error-table.md: exit codes, the codes the helper emits, and the fix for each.