Skip to content

t1k:lib-create

FieldValue
Modulet1k-studio-library
Version2.8.52
Efforthigh
ToolsAgent, Bash, Edit, Glob, Grep, Read, Skill, Write

Keywords: create library repo, gap library, new private repo, new stdlib package, new upm package, plan-only, repo creation, scaffold library

/t1k:lib-create

The only path by which a new studio library comes into being. This skill is preview-first and PLAN-ONLY — a repo creation is visible to the whole org the moment it lands, so nothing here runs it. It writes a plan; the MAIN SESSION reviews each step with the user and runs it.

  1. Final name chosen. Unity TheOne.<Area> + com.theone.<area>; Cocos @playablelabs/<layer>-<name>. Name-deciding reference: references/naming.md. No name, no plan — a rename later orphans any enrolled row, and the indexer has no rename path.
  2. Registry entry drafted in the owning kit, PR exists. The row is added the same session, so resolve finds the destination immediately after creation. Engine with no owning kit (no theonekit-<engine> kit exists — check t1k-lib-registry/references/engines.json, which lists every valid engine value): draft the row with engine: "any" in the core kit’s t1k-libraries.json fragment and file the PR there, then surface the gap (a kit owner or an engines.json addition is a maintainer decision). Using an engine value that is not in engines.json fails the registry ENGINE validation — never ship a row the validator rejects.
  3. A NEW reuse verdict with the two-line search record. t1k-corpus-scout. Phase 07’s 07.0/07.1 evidence gates apply to gap libraries.
  4. --private. New repos are ALWAYS private. --public is refused by the planner, not merely discouraged.

Any failure → stop and surface it. There is no partial create.

Owner — the studio org by default, and it is not a literal

Section titled “Owner — the studio org by default, and it is not a literal”

Every owner/name target resolves its owner through the ONE shared reader (scripts/lib/repo-owner.cjs, shared with the other repo-creating flows), whose default is the configured repoCreation.defaultOwner — The1Studio:

Terminal window
bun .claude/scripts/lib/repo-owner.cjs --remote TheOne.Camera
# {"owner":"The1Studio","personal":false,"reason":"configured default","remote":"git@github.com:The1Studio/TheOne.Camera.git"}

A personal account is refused unless the user asked for it AND repoCreation.allowPersonalOwner is true. This is not cosmetic: a personal repo cannot grant a collaborator the admin role (GitHub answers 422 Cannot assign <user> permission of admin), so a repo created under a personal account must be transferred before anyone else can own it. --private is unchanged by this — the owner and the visibility are separate.

Terminal window
# 1. plan (writes ONLY a plan document to the scratchpad — nothing runs)
bun .claude/skills/t1k-lib-create/scripts/t1k-lib-plan.cjs \
plan create-repo inputs.json
# PLAN-WRITTEN <action-id> <content-hash> <plan-path>

That is the whole job of this skill for the create step. The content hash is a traceability value, not an authorization — read the plan document’s own disclaimer field. What happens next:

  1. Relay the plan (path, hash, step table) to the spawner and STOP. A sub-agent has no AskUserQuestion and never runs a write itself.
  2. The MAIN SESSION reviews each step with the user (AskUserQuestion) and, only on explicit approval, runs that exact gh repo create <owner/name> --private command itself — prefer running the plan’s forwardArgv array directly (e.g. via execFileSync), never through a shell. If a step must be pasted into a terminal, use the plan’s forward / forwardShellQuoted field, not a hand-typed re-join of the argv — it is individually shell-quoted so pasting it reproduces the exact argv array rather than letting the shell re-split or re-interpret a free-text value (title, -f message=..., etc.).
  3. Verify (read-back, not trust): gh api repos/The1Studio/<name> --jq .private must print true, and the scaffold files must be present.

Topics are NOT planned here. They come after the doc pass, through t1k-lib-enroll. Adding a topic before the docs exist enrolls a repo whose corpus entries are empty.

SituationRollbackReversible?
Repo just created, no consumersgh repo archive <owner/name> — create-repo’s own rollback step (planned, then run by hand on approval; see references/rollback.md)yes
Cocos, before first publishrevert the scaffold PRyes
Cocos, after first publishbun deprecateirreversible

gh repo delete is not an allowed action kind and never will be. Deleting a repo is a manual user action; the plan document names it in rollback text only.

  • references/naming.md — the name-deciding reference for both engines
  • references/checklist.md — the pre-create checklist and what the plan document contains
  • references/rollback.md — rollback per situation, and the indexer’s missing un-enroll path

Runs in t1k-lib-steward (or inline). The plan script writes only a plan document; the HARD-GATE decisions stay reasoning-tier.

StepAgent
Run scripts/t1k-lib-plan.cjs to write the plant1k-lib-steward
Check the reuse verdict against prior artt1k-corpus-scout