setup-connections
Set up and inspect AKARI Video connections: AI-service keys, which models are allowed, cost-approval policy, the tool and media-service state, and 3D settings. Use for first-time setup, adding a provider or key later, checking what is usable (「何が使える?」 'what can I use?'), setting a key such as fal (「fal の鍵を設定したい」), 3D settings (「3D の設定を使いたい」), connection checks, and gates before paid generation or external publication. Model selection belongs to the production skills (they read the ledger and preferences); this skill decides allowed models and the cost policy. Works with `.akari/connections.json` and a free, read-only doctor.(旧名: manage-connections)(旧名: connect)
- License 许可
- MIT
- 最近更新
- 2026-10-22
- Stars
- ★ 214
- Forks
- 25
01 前言 Front Matter
- name
- setup-connections
- description
- Set up and inspect AKARI Video connections: AI-service keys, which models are allowed, cost-approval policy, the tool and media-service state, and 3D settings. Use for first-time setup, adding a provider or key later, checking what is usable (「何が使える?」 'what can I use?'), setting a key such as fal (「fal の鍵を設定したい」), 3D settings (「3D の設定を使いたい」), connection checks, and gates before paid generation or external publication. Model selection belongs to the production skills (they read the ledger and preferences); this skill decides allowed models and the cost policy. Works with `.akari/connections.json` and a free, read-only doctor.(旧名: manage-connections)(旧名: connect)
02 资源文件 14
- 脚本bin/doctor.mjs29.5 KB
- 脚本bin/resolve-connections.mjs15.4 KB
- 脚本bin/resolve-packages.mjs4.8 KB
- 脚本bin/test/doctor-i18n.test.mjs3.9 KB
- 脚本bin/test/resolve-packages.test.mjs6.3 KB
- 参考文档dev-fixtures/resolve-packages-newest/README.md2.2 KB
- 脚本dev-fixtures/resolve-packages-newest/reproduce.mjs4.5 KB
- 脚本test/connectors-doctor.test.mjs2.5 KB
- 脚本test/direct-tts-doctor.test.mjs1.5 KB
- 脚本test/doctor-key-source.test.mjs2.5 KB
- 脚本test/fieldreport-report-location.test.mjs1.1 KB
- 脚本test/resolve-connections-defaults.test.mjs3.1 KB
- 脚本test/resolve-connections.test.mjs5.9 KB
- 脚本test/resolve-packages-newest.test.mjs6.3 KB
03 SKILL.md 正文
FORBIDDEN-level hard rules
Language: Respond in the user's language — conversation, questions, approval prompts, and the reports and records you write (including decision-log rows) follow the language the user writes in.
These rules always override detailed procedures.
- Never expose key values in git-tracked files, HTML, logs, or conversation. Always mask displays.
- Find keys only in environment variables and credentials.env (new location → old location), with env taking priority. Never search elsewhere or ask for keys in chat. Explain the location and KEY name; the human places them.
- Do not require keychain / external vault dependencies (consider only as optional future backends).
- Doctor is free and read-only; never test actual generation (pending ruling 2026-07-17).
- Do not perform paid operations before an estimate and cost approval (same pattern as plan-edit's Decision Communication Contract). Stop before execution if the budget cap is expected to be exceeded.
- Do not adopt real-time hook monitoring (PreToolUse, etc.). State is JSON; communication is the net git diff.
- Consumer skills must not use connections absent from connections.json, meaning the resolved registry in project → workspace → default order. This skill is the sole entry point; the 42/70-series contracts inherit this rule.
Routes: start from the user's wording
Setup is not only the first run. Adding a key later and checking the current state also land here.
| The user says | Start with |
|---|---|
| 「何が使える?」「何が使えるか知りたい」 | §What is usable now |
| 「fal の鍵を設定したい」「API キーを入れたい」 | §Steps in execution order 3–4 |
| 「3D の設定を使いたい」 | §What is usable now (the 3D row), then author-scene3d |
| 「追加した鍵が効いているか確かめたい」 | §Steps in execution order 2 (doctor) |
| 「有償で生成してよいか」 | §Steps 5–6 (allowed models, estimate, cost approval) |
What is usable now
- Run
akari connect list --jsonand report the two groups, "AKARI tools" and "media creation". States are "available", "key required", "preparing", and for the 3D setting alone "Blender required" when Blender is absent.enabled: falsemeans unused.credentialSourcenever contains a key value. - Keep the existing
generationOrderandfallbackOnFailure. By default, do not switch to another account automatically on failure. They live in~/.akari/connectors.json(override withAKARI_HOME); never write key values there. - Before paid generation, check this skill's allowed models, estimate, and cost approval (§Steps 5–6).
Real paths (do not invent a provider)
- fal still images go through generate-image and
akari generate still; fal video through generate-video andakari generate video/akari generate resume. - fal narration, Fish Audio, and Google AI narration go through generate-narration
and
akari narration generate. ElevenLabs (Scribe) and Groq transcription use analyze-footage's transcription path; do not offer the ElevenLabs card as narration. - 3D goes through author-scene3d (live Three.js by default; a bake uses
assets/scene3d/*/scene.pyand Blender). Report "available" when Blender is installed. - Recording and reusing generated assets follows the production skills and harvest-asset. Never fabricate provenance.
Steps in execution order
- Resolve project
.akari/connections.json→ workspace.akari/connections.json→ product-bundled defaults; inspect providers,models.default / allowed, andpolicy. Check resolution withnode <このスキルのディレクトリ>/bin/resolve-connections.mjs [プロジェクトルート](existing placeholders: this skill's directory and project root). Never use unregistered connections or models outside allowed. - Present the previous
doctorresult. Only when rechecking is explicitly requested, runnode <このスキルのディレクトリ>/bin/doctor.mjsfrom the project root (existing skill-directory placeholder). To check another project, pass its root or connections.json path as argument 1. Results run from a project root are written back to files corresponding to each provider's origin layer (project / workspace / default). - If neither env nor new/old credentials.env contains the required key, explain doctor's location, KEY name,
and acquisition URL to the human and stop. Do not acquire or write on their behalf.
Use
AKARI_CREDENTIALS_FILEto specify a replacement file only in tests. - To add a provider, the human adds 1
KEY=VALUEline to credentials.env; add 1 value-free entry to.akari/connections.json'sproviders. Forauth: env-key,envmust use${KEY_NAME}form. Honestly retainuncheckedfor providers lacking a safe doctor adapter. - For model permissions, establish
models.allowedfirst, then choosemodels.defaultfrom it. Declare per-task overrides at the next approval gate. - Before paid operations, follow the approval gate format: target, method, reason, alternatives, estimated cost, wait time, external transmission, provenance. Do not execute before cost approval; stop if the budget cap is unset or expected to be exceeded.
Doctor writes back connections.json's doctor block and generates a read-only connections-report.html in the project root.
Display credentials only as present (masked) or absent; never show HTTP response bodies or key values.
Application-wide tool and service settings live in ~/.akari/connectors.json (override the location with AKARI_HOME).
Doctor displays the enabled state, generation order, and automatic fallback settings without credential values.
Check each connection with akari connect list --json (the CLI verb akari connect is unchanged).
Model selection is not this skill's job
This skill owns the key references, models.allowed, the cost-approval policy, and the free read-only doctor.
Choosing which allowed model to use is the production skill's job: it reads the ledger (for example
akari narration engines --json, packages/schemas/gen-models.json) and the user's preferences, then declares the
choice at the approval gate. Do not pick a model here on the user's behalf, and do not list model names, prices, or
voices in this skill's body — those facts live in the ledger (data) and are read at use time.
Default generation models (defaults.generate)
- Optional
.akari/connections.jsonfieldsdefaults.generate.still/defaults.generate.videospecify default generation model IDs. - Resolve through the same 3 layers as providers (project > workspace > product-bundled defaults), but shallow-merge individual
still/videofields. - The product-bundled defaults are data: read them from the bundled registry (
packages/creator-root) and from the ledger below. Do not copy model IDs, prices, or voices into this skill body. - Model ID ledger:
packages/schemas/gen-models.json. - Check
effective.defaultsinnode <このスキルのディレクトリ>/bin/resolve-connections.mjs [プロジェクトルート](existing placeholders: this skill's directory and project root).
Key locations (environment variables and credentials.env)
Follow this table for additional TTS connections. Humans issue keys; never put values in the registry.
| provider | credentials.env name | Source | Doctor's free GET |
|---|---|---|---|
fish-audio |
FISH_AUDIO_API_KEY |
https://fish.audio/app/api-keys/ | /wallet/self/api-credit |
google-ai |
GEMINI_API_KEY |
https://aistudio.google.com/api-keys | /v1beta/models (x-goog-api-key header) |
- For
auth: env-keyproviders, doctor searches environment variables → new credentials.env → old credentials.env; env takes priority. - Reports use only 3 values:
env/credentials.env/未設定(machine output meaning unset). Show neither values nor last 4 characters. akari doctor'sfal_keyrow shows the same 3 values. Missing keys do not change verdict or exit code.- Use
AKARI_CREDENTIALS_FILEonly to substitute locations in tests. - Never ask the user to paste a key into chat. The human registers it from the connection screen into the existing
credentials.env; whenakari connect execpasses a key, scope it to the child process. Never write keys to arguments, logs, or deliverables.
Manage memory connections
The memory array in .akari/connections.json declares external reference-memory connections distinct from
generation providers. Canonical source:
contract-2026-07-25-memory-connection-v0.md (Japanese).
They are read-only, without credentials or billing; this skill centrally manages them in the same registry as providers.
- Add: Add 1 entry to
memory, minimally{ "name": "<kebab-case>", "root": "<ローカルパス>" }(existing placeholder: local path). Optional:entry(defaultINDEX.md),include/exclude,read_policy(defaultread-only). No secrets such as API keys inroot; it contains only routing information. - Remove: Remove the corresponding
memoryentry. There is no matching credentials.env line (memoryhas noauth/env). - Doctor display: Limit
memorychecks to lightweight checks separate fromprovidersHTTP/authentication tests: only existence ofrootandroot+entry, free and read-only. This inherits hard rule 4's free/read-only principle. However, schema design givesmemorynodoctorfield, since there is no persistent authentication state; v0doctor.mjsdoes not implement this path check. v0 establishes data/skill contracts; implementation is next. - Inaccessible
rootmust not stop the consuming skill when it attempts to read (plan-video / plan-edit opening, analyze-project context integration). See memory-connection-v0 §5 for degraded behavior.
Sources
- Canonical connection/settings management contract (2026-07-17): private internal records (
akari-video-internal). - First-run / no proxy acquisition discipline: ../setup-library/SKILL.md
- Paid-operation approval gates: ../plan-edit/approvals-and-generation.md
- Registry validation:
node packages/schemas/bin/validate-connections.mjs .akari/connections.json(monorepo only; not bundled with distributed projects).
04 同仓库更多 Skills
verify-project
Verify an AKARI Video project with the L0 / L1 / L2 verification ladder required by an AKARI Video task contract on the current Theia stack. Read when acceptance criteria specify levels such as L0 or L0+L1, to determine exactly what to run and how at each level.(旧名: verify)
verify-edit
Verify edit.json and optional analysis.json / captions.json / media with a deterministic CLI, then finish QA with frame inspection and reporting after PASS. Use immediately after writing or modifying edit.json, before export, and after applying review feedback.(旧名: edit-lint)
setup-remote
Set up remote access to approval reports and previews from another device such as a phone, and send footage to the workspace. Use doctor to assess Tailscale, guide installation and login (human actions), expose the preview server (default 4567) and approval report helper over tailnet-only HTTPS with tailscale serve, connect Taildrop reception to workspace inbox/, and verify access from another device. Use for requests to view reports on a phone, approve remotely, send footage from a phone, or set up remote access. Public internet exposure (funnel) is outside the default scope.
setup-project
Set up an AKARI Video project headlessly. Recursively copy `templates/project-default/`, record the template version, initialize git only when safe, and generate an HTML creation report. No app launch is needed. Use to create a video project or fill in an existing folder as an AKARI Video project.(旧名: create-project)
setup-library
Use for first-time AKARI Video setup or when the current project needs more usable assets. This first-run skill checks ffmpeg / whisper-cli (and can install with approval), reads the bundled catalog with akari assets to propose a starter pack, obtains explicit human approval, then acquires, places, validates, and updates INDEX entries. It also covers the audio library (BGM and sound effects): bulk acquisition of first-party AKARI Sounds from GitHub Releases, a free-source candidate HTML list with drop-folder matching or assisted acquisition for missing families, and keep/drop decisions in the listening gallery. Use for requests such as "I want more BGM" or "add sound effects to the library".(旧名: setup-audio-library)
setup-chat-approval
Set up Telegram notifications at approval gates and return approvals with a button tap. Use doctor to assess state, guide BotFather token issuance and credentials.env registration (human actions), identify the chat ID, register the connection, and verify real-device notification and button approval. Use for requests to approve in chat, receive phone notifications, or configure a Telegram bot. Free-text instructions and agent startup are outside scope (separate contract).