AGENT SKILL

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

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.

  1. Never expose key values in git-tracked files, HTML, logs, or conversation. Always mask displays.
  2. 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.
  3. Do not require keychain / external vault dependencies (consider only as optional future backends).
  4. Doctor is free and read-only; never test actual generation (pending ruling 2026-07-17).
  5. 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.
  6. Do not adopt real-time hook monitoring (PreToolUse, etc.). State is JSON; communication is the net git diff.
  7. 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

  1. Run akari connect list --json and 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: false means unused. credentialSource never contains a key value.
  2. Keep the existing generationOrder and fallbackOnFailure. By default, do not switch to another account automatically on failure. They live in ~/.akari/connectors.json (override with AKARI_HOME); never write key values there.
  3. 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 and akari 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.py and 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

  1. Resolve project .akari/connections.json → workspace .akari/connections.json → product-bundled defaults; inspect providers, models.default / allowed, and policy. Check resolution with node <このスキルのディレクトリ>/bin/resolve-connections.mjs [プロジェクトルート] (existing placeholders: this skill's directory and project root). Never use unregistered connections or models outside allowed.
  2. Present the previous doctor result. Only when rechecking is explicitly requested, run node <このスキルのディレクトリ>/bin/doctor.mjs from 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).
  3. 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_FILE to specify a replacement file only in tests.
  4. To add a provider, the human adds 1 KEY=VALUE line to credentials.env; add 1 value-free entry to .akari/connections.json's providers. For auth: env-key, env must use ${KEY_NAME} form. Honestly retain unchecked for providers lacking a safe doctor adapter.
  5. For model permissions, establish models.allowed first, then choose models.default from it. Declare per-task overrides at the next approval gate.
  6. 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.json fields defaults.generate.still / defaults.generate.video specify default generation model IDs.
  • Resolve through the same 3 layers as providers (project > workspace > product-bundled defaults), but shallow-merge individual still / video fields.
  • 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.defaults in node <このスキルのディレクトリ>/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-key providers, 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's fal_key row shows the same 3 values. Missing keys do not change verdict or exit code.
  • Use AKARI_CREDENTIALS_FILE only 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; when akari connect exec passes 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 (default INDEX.md), include/exclude, read_policy (default read-only). No secrets such as API keys in root; it contains only routing information.
  • Remove: Remove the corresponding memory entry. There is no matching credentials.env line (memory has no auth/env).
  • Doctor display: Limit memory checks to lightweight checks separate from providers HTTP/authentication tests: only existence of root and root+entry, free and read-only. This inherits hard rule 4's free/read-only principle. However, schema design gives memory no doctor field, since there is no persistent authentication state; v0 doctor.mjs does not implement this path check. v0 establishes data/skill contracts; implementation is next.
  • Inaccessible root must 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

AkariLabs
AkariLabs/akari-video

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)

★ 214
AkariLabs
AkariLabs/akari-video

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)

★ 214
AkariLabs
AkariLabs/akari-video

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.

★ 214
AkariLabs
AkariLabs/akari-video

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)

★ 214
AkariLabs
AkariLabs/akari-video

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)

★ 214
AkariLabs
AkariLabs/akari-video

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).

★ 214