Open source · MIT licensed · Bring your own relay开源项目 · MIT 许可 · 自带模型中继

Code with context.
Ship with evidence.
以上下文编码。
证据交付。

Skein is a context-first coding agent for the terminal. It maps the change surface before editing, keeps every consequential action visible, and only calls work verified when deterministic checks prove it.

Skein 是一款上下文优先的终端编码智能体:动笔之前先摸清变更面,每一个有后果的动作都摆在明处;只有确定性检查通过,工作才会被标记为 verified。

npm install -g @skein-code/cli

Node.js 22.16+ · macOS / Linux

skein · ~/work/api LIVE

⌁ SKEIN · local context · checkpoint on

skein "fix the webhook retry bug"

◇ context local · 12 spans · grounded

✓ read_file src/billing/webhook.ts

✓ apply_patch src/billing/webhook.ts

✓ run_command npx vitest run test/billing

⌁ Skein — completion: verified

evidence: vitest passed · typecheck clean

01 Context before tools上下文先于工具

02 Trust stays visible信任全程可见

03 Risky work is reversible风险操作可回退

04 Automation stays open自动化保持开放

The whole run, not just the answer交付完整运行过程,而不只是答案

Understand. Act. Verify. Recover.理解。执行。验证。恢复。

Skein treats the model as one part of an inspectable runtime. Deterministic evidence — not confident prose — decides whether work is done.

Skein 把模型视为可审计运行时的一个组成部分。判定工作是否完成的,是确定性证据——而不是听起来自信的文字。

  1. 01

    Map the change surface摸清变更面

    A local BM25, path, symbol, and import-graph index packs grounded source spans before the first substantive model turn.

    本地 BM25、路径、符号与导入图索引,在第一轮实质模型调用之前就打包好有据可查的源码片段。

    Local by default默认本地
  2. 02

    Make intent visible意图全程可见

    Read, write, shell, Git, and network permissions stay separate. Every consequential tool action is shown before it runs.

    读取、写入、Shell、Git 与网络权限彼此独立,每个有后果的工具动作在执行前都清晰展示。

    Explicit permissions权限显式
  3. 03

    Require current evidence只认当下证据

    Tests, typechecks, builds, configured checks, or diff validation gate the verified completion state — model prose never does.

    只有测试、类型检查、构建、配置检查或 diff 校验才能授予 verified 完成状态——模型的文字永远不能。

    Fail closed失败即关闭
  4. 04

    Keep the way back留好退路

    Pre-write checkpoints and durable local sessions make every run inspectable and reversible without rewriting Git history.

    写前检查点与持久本地会话,让每次运行可审计、可回退,而不必改写 Git 历史。

    Recoverable可恢复
5Independent permission gates — read · write · shell · git · network五道独立权限门禁——读 · 写 · Shell · Git · 网络
09Stable headless exit codes CI can gate onCI 可直接依赖的稳定退出码契约
100%Local, offline-capable code retrieval本地化、可离线的代码检索
0Prompt or source text retained in receipts回执中保留的提示词与源码文本

One auditable workspace一个可审计的工作区

Open where it matters.在关键处保持开放

Choose the relay, inspect the context, control the tools, and drive the same runtime interactively or from CI.

中继自选、上下文可查、工具受控——同一个运行时,既能交互使用,也能接入 CI。

Model choice模型选择

Your relay. Your protocol.你的中继,你的协议。

Connect OpenAI Responses, OpenAI Chat, Anthropic Messages, or Gemini — always chosen explicitly. Skein never guesses the protocol from a URL or a model name, and never retries across protocols at your expense.

显式接入 OpenAI Responses、OpenAI Chat、Anthropic Messages 或 Gemini。Skein 绝不根据 URL 或模型名猜测协议,也绝不跨协议重试让你重复计费。

OpenAI Responses OpenAI Chat Anthropic Messages Gemini

Context上下文

Retrieval you can inspect.检索过程可检视。

Offline-capable local indexing, explicit @file pins, freshness checks, and span-level provenance for everything the model sees.

可离线的本地索引、显式 @file 固定、新鲜度校验——模型看到的每个片段都有来源可查。

Automation自动化

Human calm. Machine strict.对人从容,对机器严格。

Use the composer-first TUI, or run headless with quiet text, JSON, or streaming JSON — the same runtime either way.

既可用以输入框为中心的 TUI,也可无头运行输出文本、JSON 或流式 JSON——同一个运行时。

textjsonstream-json

Teams团队

Experts without hidden writers.专家协作,不藏写手。

Route bounded read-only experts through APIs or installed coding CLIs. Writable work stays behind an explicit, reviewed writer lane.

通过 API 或已安装的编码 CLI 调度受限只读专家;可写工作始终留在显式、受审的写入通道。

Sessions会话

Resume the work, not just the chat.恢复的是工作,不只是聊天。

Tasks, changed files, usage, tool outcomes, context sources, and verification state persist locally — resumable and forkable.

任务、变更文件、用量、工具结果、上下文来源与验证状态都持久保存在本地——可恢复、可分叉。

Extensions扩展

Extensible, but gated.可扩展,但有门禁。

MCP servers activate lazily behind fingerprint-bound trust, workspace skills fail closed on content drift, and model-initiated background jobs always need live human approval.

MCP 服务按指纹信任懒加载,工作区技能在内容漂移时直接失效关闭,模型发起的后台任务永远需要真人现场批准。

Memory记忆

Remember with receipts.记忆亦有凭据。

Layered working memory compacts only when it pays for itself, and durable memories require your explicit approval before they persist.

分层工作记忆只在收益为正时才压缩;持久记忆必须经你明确批准才会保存。

Trust is a runtime property信任是运行时属性

The model cannot promote itself.模型无法给自己升权

Permissions, path boundaries, verification, and recovery are enforced outside model prose. Project-local executable configuration stays untrusted until you explicitly opt in.

权限、路径边界、验证与恢复都在模型文字之外强制执行。项目本地的可执行配置默认不受信,直到你显式选择信任。

  • Separate capability gates能力门禁彼此独立Read, write, shell, Git, and network are evaluated independently, with command allow/deny rules.读、写、Shell、Git、网络独立评估,并叠加命令允许/拒绝规则。
  • Evidence-gated completion完成状态以证据为门A current deterministic check after the last mutation is required for the verified state.最后一次修改之后,必须有当前的确定性检查通过,才有 verified。
  • Pre-write checkpoints写前检查点Restore any agent edit without touching the repository's Git history.恢复任何智能体编辑,而不触碰仓库的 Git 历史。
  • Content-free receipts回执不含内容Usage and runtime decisions are recorded as hashes and counts — never prompt or source text.用量与运行时决策仅以哈希和计数记录——绝不保留提示词或源码文本。
Read the architecture阅读架构文档

Built under its own rules用自己的规则打造

This site is a Skein dogfood project.这个网站本身就是 Skein 的 dogfood 项目。

Skein's local Context Engine grounded every product claim on this page, and its read-only expert runtime audited the copy against the real repository. Gaps the audit exposed became tracked fixes before the site could ship.

Skein 的本地 Context Engine 为页面上的每一条产品声明提供依据,其只读专家运行时对照真实仓库审校了全部文案。审校暴露的缺口,先变成被跟踪的修复项,网站才被允许上线。

“Prototype visuals are useful. Prototype claims are not evidence.”

「原型的视觉有用,原型的声明不是证据。」

Dogfood review findingDogfood 审校结论

Start with your existing relay用你现有的中继开始

From install to first task.从安装到第一个任务

Skein stores the credential's environment-variable name — never the credential itself.

Skein 只保存凭据的环境变量名——绝不保存凭据本身。

Install
# Node.js 22.16 or newer
npm install -g @skein-code/cli
skein --version

# Or the guarded installer: checks Node first, pins exact versions.
curl -fsSL https://raw.githubusercontent.com/lixiang12345/skein/main/scripts/install.sh | sh

Official account login is intentionally out of scope: primary connections use explicit third-party or local relay contracts. The guide covers connections, everyday commands, CI, and recovery in depth.

有意不做官方账号登录:主连接使用显式的第三方或本地中继契约。使用指南完整覆盖连接、日常命令、CI 与恢复。

Straight answers有一说一

Before you install.安装之前。

Does Skein send my repository to a retrieval service?Skein 会把我的仓库发给检索服务吗?

No. The code index is built and stored locally, and retrieval works offline. Model prompts still contain the context selected for your configured endpoint, so your relay's data policy remains important.

不会。代码索引在本地构建与存储,检索可离线运行。模型提示中仍会包含为你所配置端点挑选的上下文,所以中继的数据政策依然重要。

Which model providers can I use?我能用哪些模型服务?

OpenAI Responses, OpenAI Chat, Anthropic Messages, and Gemini as native providers, plus compatible relay endpoints that speak the OpenAI or Anthropic protocols. Every protocol and authentication header is selected explicitly.

原生支持 OpenAI Responses、OpenAI Chat、Anthropic Messages 与 Gemini,另支持任何讲 OpenAI 或 Anthropic 协议的兼容中继端点。协议与认证头都显式选定。

Can Skein run in CI?Skein 能跑在 CI 里吗?

Yes. Print mode emits text, JSON, or streaming JSON following a published schema, and stable exit codes distinguish verified, unverified, blocked, cancelled, and needs-review outcomes. The guide lists the full contract.

能。打印模式输出文本、JSON 或流式 JSON,遵循已发布的 schema;稳定退出码区分 verified、unverified、blocked、cancelled 与 needs-review。指南里有完整契约。

Can the model bypass denied tools?模型能绕过被拒绝的工具吗?

No. Tool categories, command rules, workspace boundaries, and completion checks are enforced by the runtime outside model output — no flag or model review can stand in for a human on live approval gates.

不能。工具类别、命令规则、工作区边界与完成检查都由运行时在模型输出之外强制执行——任何 flag 或模型评审都不能替代真人批准门。

How do external coding CLIs fit in?外部编码 CLI 怎么参与?

Installed Codex, Claude, or Grok CLIs can act as bounded read-only experts. External writer access is never silently enabled; writable delegation stays behind Skein's reviewed writer lane.

已安装的 Codex、Claude 或 Grok CLI 可作为受限只读专家。外部写权限绝不会被悄悄开启;可写委托始终留在受审的写入通道之后。

Carry one inspectable thread握着一条可审计的线

Know what changed.
Know why it is done.
知道改了什么。
知道凭什么算完成