t1k:web:core:thirdparty-project
| Field | Value |
|---|---|
| Module | core |
| Version | 1.26.1 |
| Effort | medium |
| 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
How to invoke
Section titled “How to invoke”/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.
Decision Tree
Section titled “Decision Tree”| Intent | Path |
|---|---|
| “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 |
Hard Rules
Section titled “Hard Rules”- Writes default to a dry-run. Only
--applychanges 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_TOKENif set, otherwisegh auth token. If neither works, stop and tell the person to rungh 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.
Helper
Section titled “Helper”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.
| Command | Writes | Input |
|---|---|---|
contract | no | none. Returns the live ad formats, networks, analytics providers and key-class paths |
projects [--archived] [--limit N] | no | none |
project <id> | no | none |
requirements <id> <android|ios> | no | none. Key values come back masked |
create --file <path|-> | yes, with --apply | project JSON (see the field cheat-sheet) |
update <id> --file <path|-> | yes | a subset of the project fields |
archive <id> / unarchive <id> | yes | none |
set-requirements <id> <android|ios> --file <path|-> | yes | { "ads": {...}, "analytics": {...} }, merged into the stored requirement |
Workflow for Every Write
Section titled “Workflow for Every Write”- Gather. Ask the person for every value you do not have. For an existing project, read the current state first (
projectorrequirements). - Write the JSON to a temporary file outside the repository, or pipe it with
--file -. Keep it to the fields that change. - Dry-run. Run the command without
--apply. Read thechangesarray (orwouldSendfor create). - 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.
- Apply only on “Apply”: rerun the same command with
--apply. Report the result, includingrevisionBeforetorevisionAfterfor requirements. - On a non-zero exit, read
codeandfixand 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.
Create
Section titled “Create”- Required:
displayName,bundleId,platform(android,iosorboth). 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
--applycontacts the server. bundle_id_takenmeans the project already exists. Find its id withprojects, then useupdate.
Update
Section titled “Update”- Send only the fields that change. An empty patch is refused.
- A
project_changedanswer is retried once by the helper, which re-reads first. If it fails again, tell the person and stop. - Changing
platformmay affect requirements that are already saved. Say so in the summary.
Set Requirements
Section titled “Set Requirements”- Run
contractbefore 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.
requiredNetworksandadUnitsare replaced as whole lists. An analytics provider object replaces that provider, andnullremoves 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
Section titled “Archive”- 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.
Masking
Section titled “Masking”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.
Executed by
Section titled “Executed by”Main session, inline. The helper is mechanical, but every write needs the person’s confirmation, so no sub-agent runs it.
Scope and Limits
Section titled “Scope and Limits”- 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_pageorredirected(exit 3). Escalate that. Do not retry in a loop.
References
Section titled “References”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.