t1k:lib-create
| Field | Value |
|---|---|
| Module | t1k-studio-library |
| Version | 2.8.52 |
| Effort | high |
| Tools | Agent, 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
How to invoke
Section titled “How to invoke”/t1k:lib-createCreate a Library Repo or Package
Section titled “Create a Library Repo or Package”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.
HARD-GATE — all four, in order
Section titled “HARD-GATE — all four, in order”- 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. - Registry entry drafted in the owning kit, PR exists. The row is added the
same session, so
resolvefinds the destination immediately after creation. Engine with no owning kit (notheonekit-<engine>kit exists — checkt1k-lib-registry/references/engines.json, which lists every valid engine value): draft the row withengine: "any"in thecorekit’st1k-libraries.jsonfragment and file the PR there, then surface the gap (a kit owner or anengines.jsonaddition is a maintainer decision). Using an engine value that is not inengines.jsonfails the registryENGINEvalidation — never ship a row the validator rejects. - A
NEWreuse verdict with the two-line search record.t1k-corpus-scout. Phase 07’s 07.0/07.1 evidence gates apply to gap libraries. --private. New repos are ALWAYS private.--publicis 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:
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.
# 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:
- Relay the plan (path, hash, step table) to the spawner and STOP. A
sub-agent has no
AskUserQuestionand never runs a write itself. - The MAIN SESSION reviews each step with the user (
AskUserQuestion) and, only on explicit approval, runs that exactgh repo create <owner/name> --privatecommand itself — prefer running the plan’sforwardArgvarray directly (e.g. viaexecFileSync), never through a shell. If a step must be pasted into a terminal, use the plan’sforward/forwardShellQuotedfield, 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.). - Verify (read-back, not trust):
gh api repos/The1Studio/<name> --jq .privatemust printtrue, 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.
Rollback (documented, never auto-run)
Section titled “Rollback (documented, never auto-run)”| Situation | Rollback | Reversible? |
|---|---|---|
| Repo just created, no consumers | gh 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 publish | revert the scaffold PR | yes |
| Cocos, after first publish | bun deprecate | irreversible |
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.
Detail
Section titled “Detail”references/naming.md— the name-deciding reference for both enginesreferences/checklist.md— the pre-create checklist and what the plan document containsreferences/rollback.md— rollback per situation, and the indexer’s missing un-enroll path
Executed by
Section titled “Executed by”Runs in t1k-lib-steward (or inline). The plan script writes only a plan document; the HARD-GATE decisions stay reasoning-tier.
| Step | Agent |
|---|---|
Run scripts/t1k-lib-plan.cjs to write the plan | t1k-lib-steward |
| Check the reuse verdict against prior art | t1k-corpus-scout |