companion-onboarding

Officialneta-search/companion-onboarding
Use it in Cohub

Paste this into your agent's chat — it fetches the skill and follows it.

Use the skill: companion-onboarding. Run `npx -y @neta-art/neta-search-cli@latest skills use neta-search/companion-onboarding --via site` and follow what it prints. Read its complete output, redirecting it to a temporary file first if necessary, and resolve relative paths from the skill directory it prints.
Use in Neta Studio Open it in Neta Studio and see what people made with it.
Install from a terminal
npx -y @neta-art/neta-search-cli@latest skills use neta-search/companion-onboarding
Summary

Tell us who you want to talk to, and get a character you can chat with right away.

  • Starts with a short welcome that asks what kind of character you want to chat with, date, or have as company.
  • Gives you one ready-to-play roleplay with that character, so you can start talking immediately.
  • Works with a character you name or describe, or one from your world. If you say 'surprise me', it picks for you.
  • Afterward it offers to give the character a long-term memory of your chats. It only sets this up if you say yes.
  • Memory comes with two extra pages: one shows what the character remembers, the other is a diary-style journal. Replies come in your language.
SKILL.md
# Companion Onboarding · entry

This file does one thing: **pick a language, then hand you to that language's reception flow.**

The flow itself is not here. It lives in the language packs, one per language, under `template/skills/<lang>/companion-onboarding/` — the same files that get installed into a world, read in place. One spec, maintained once.

## What this skill delivers

- **The deliverable is one playable roleplay Work** — the `work_…` record that `create-companion-roleplay.mjs` writes (content `neta:roleplay:…`, titled from the companion's name), handed to the user as one interaction-components Work card whose `workId` is the one that script printed. It is not a web page or web Work (nothing under `works/webs/`), an image or a character card; the card is only what the roleplay is built on.
- If the character the user wants already has a companion roleplay in this world (`optional_characters` `[null]`, that character alone in `atomIds`), **that existing roleplay is the deliverable**: hand it over as it stands. Do not re-run the script on it (`--work-id` without new guidance overwrites its opening and memory).
- **"The character the user wants" is one the user named or described.** A companion roleplay already standing in the world is not their choice, and neither is being told to use this skill, to deliver what it delivers, or to name / pick / use "a character (or place) already here" without saying who — that asks for someone *from this world*, it does not hand the choice to you. Before you build or hand anything over, check: can you quote the user's own words that name or describe this character, or that say "you pick" / "surprise me" / "anyone is fine"? If not, ask first — the pack's Case A question: one sentence, 2–3 characters from this world as options, any other name welcome, no Work card and no existing roleplay pitched as ready — and end the turn there, before building or handing anything over. Do not argue yourself into "they effectively said you pick", and never settle it by taking whoever already has a roleplay. Only an explicit "you pick" makes it your call.
- Anything about memory — the memory workflow, the gate cron, the two memory web cards — is stage two and happens **only after the user says yes in this conversation**. A request like "a character who remembers me" is the reason to offer memory at delivery, not the yes itself.
- **Leave the world's settings and existing files alone.** Never change the world config — the `world/WORLD.md` frontmatter (visual style, language, portal or cover refs, anything else — it governs everything the world makes later), whether by `neta config set` or by hand, and never delete a file that was there before you came. If `atom add` refuses a character card (companion or player) because the world has no visual style yet, re-run the same `atom add` with `--no-cover` — the card is created text-only, which is all the roleplay needs. Do not set a visual style to get past it, and do not ask the user to approve one: a yes to a style is still a change to the whole world's settings.

## 1. Pick the language

Use the language you are actually speaking with the user right now. Normalize it to a language code (`zh-CN` → `zh`, `en_US` → `en`).

| Case | Pack to read | How the language is set |
| --- | --- | --- |
| `template/skills/<lang>/` exists | that one | it is the pack's language, already baked into the prompt |
| no pack for that language | `template/skills/en/` | follow the flow, but **write everything you create in the user's language**, and pass their language code to `--language` |

User speaks English, take `en`; Chinese, take `zh`. Do not pick from the world setting (`language` in `world/WORLD.md`) — that value may lag behind the current conversation.

Reply to the user in that language. This holds for every message of the run, above all the final handover — the Work card's surrounding text, the memory cards and the closing options — even though this file and the packs' scripts are partly in English.

## 2. Read the flow and follow it

```
<this skill dir>/template/skills/<lang>/companion-onboarding/SKILL.md
```

Read it now and follow the whole thing. It is written from the point of view of a world where the workflow is already installed, so two paths need substituting per the table below. Change nothing else.

| What the pack says | What you use here |
| --- | --- |
| `.agents/skills/companion-onboarding/OPENING.md` | `<this skill dir>/template/skills/<lang>/companion-onboarding/OPENING.md` |
| `node scripts/create-companion-roleplay.mjs` | `cd <world root> && node <this skill dir>/template/scripts/create-companion-roleplay.mjs` |

If the memory workflow was already installed in this world, `scripts/create-companion-roleplay.mjs` sits at the world root and the two paths are equivalent — either is fine.

The delivery step (step 6) also names two skills — **interaction-components** and **next-steps**. Those are not part of this bundle: they are platform skills, present in the world under their own names, so a pack's reference to them needs no substituting. Read them by name, and if the runtime turns out not to carry them, the pack's own prose fallback applies.

## 3. One extra rule when you fell back

Applies only when you landed on the `en` pack and the user is not speaking English: read every "write it in English" instruction in that pack as **"write it in the user's language"**. The character card, the premise and the first scene all follow the user, and `--language` carries the user's code. The scripts handle languages that have no skill pack; what is missing is the prompt, not the capability.

## Stage two

**No yes, no stage two.** Until the user agrees in this conversation, do not run `instantiate.mjs`, `install-memory-cron.mjs` or `install-memory-webworks.mjs`, and do not edit, re-register or republish memory pages already in the world (`works/webs/memory-*` — older installs may use `works/web/` — and their `meta.json`) — even when memory looks half-installed or its cards look stale or missing. Offer memory at delivery instead.

**Check the world's memory version first.** Before anything in stage two — and whenever the user asks about memory in a world that already has some — run `node <this skill dir>/instantiate.mjs --check-world --target <world root>` (read-only).

- `none` / `v2`: carry on.
- `v1` or `mixed`: this world's memory system is the older version. Do not install, do not copy files, do not run any memory script. Tell the user once, in their language and in world terms: the memory here is the older version; upgrading lets new characters get memory and keeps every memory already written. Ask whether to upgrade, then end the turn. On yes: `node <this skill dir>/instantiate.mjs --upgrade --target <world root>` and relay its result; on no: leave memory as it is — the existing roleplays still work. Do not raise it again in the same conversation.
- `instantiate.mjs` refuses on its own with `needs-upgrade` in a `v1` / `mixed` world; treat that the same way.

Once the user says yes to memory, follow `INSTALL.md` in this directory. `instantiate.mjs --language <the code you picked>` selects the language pack by the same rule used above, so what you chose here and what gets installed there agree by construction.

If the world already carries the V2 workflow (another companion has memory, `scripts/` sits at the world root), those files stay as they are: `instantiate.mjs` only adds what is missing and lists what it left alone under `keptExisting`. Do not copy or edit template files over them by hand. `--upgrade` is the V1 → V2 upgrade (on a V2 world it only refreshes scripts and skills) — run it only after the user said yes to upgrading.

Memory in V2 is per character and world-wide: what happens to the character in any roleplay is remembered, but memory is written only into roleplays the user agreed to — the companion roleplay of this install, plus any they later say yes to. The pack's stage two section covers both.

Stage two also publishes **two memory cards into the current world** — add-ons to the roleplay, which stays the deliverable: "\<name\> · Memory status" and "\<name\> · Memory journal" (「记忆状态」「记忆观察」 in `zh`). `instantiate.mjs` publishes them, and `install-memory-cron.mjs --all` then links the world-level gate into them. Stage two is not done until both are published **and handed to the user as two interaction-components Work cards** (Links, ids from `webworks.cards`), the same way step 6 hands over the roleplay. The checks, the failure handling and the card wording are in the pack's stage two section. Their titles, UI and covers come in `zh` or `en` only; any other language gets the English ones, so refer to them by the names shown on the canvas.

## Out of scope

- Changing world settings: the `world/WORLD.md` frontmatter (visual style, language, cover, anything else), by `neta config set` or by hand.
- Deleting any file that was in the world before this run, or editing files the run did not create — other characters' cards, other roleplays, other skills, `.neta/`.
- Anything beyond the deliverable before the user asks: no locations, lore, narrating, extra illustrations, and no stage two (memory install, gate cron, memory cards) without the user's yes in this conversation.
- Writing memory into a roleplay the user did not agree to (`memory-works.mjs set … --confirmed` only after their explicit yes), installing V2 memory into a V1 / mixed world, or upgrading a world without the user's yes.
- Rebuilding an existing companion roleplay the user already has (`--work-id` without new guidance), or editing a roleplay with `neta roleplay update`.