Problem问题 Philosophy理念 Features功能 CLI ← ClawNet← ClawNet 主站
EN 中文
GitHub

Context is fragile.
Package it.

上下文很脆弱。
打包它。

An open standard for bundling everything an AI agent needs — requirements, credentials, constraints, acceptance criteria — into a single .nut file.

一个开放标准,将 AI agent 所需的一切 — 需求、凭证、约束、验收标准 — 打包到一个 .nut 文件中。

$ Read https://chatchat.space/nutshell-skill.md
requirements.md
credentials/
architecture.md
acceptance/
.nut
One-Click Skill
一键教会 Agent

Teach Your Agent

让你的 Agent 学会 nutshell

Three ways to get started — pick the one that fits your workflow.

三种上手方式,选择最适合你的。

Paste → 粘贴 → Read https://chatchat.space/nutshell-skill.md and help me use nutshell. 阅读 https://chatchat.space/nutshell-skill.md 并帮我使用 nutshell。
$ curl -fsSL https://chatchat.space/nutshell/install.sh | sh
$ go install github.com/ChatChatTech/nutshell/cmd/nutshell@latest

Works with Claude Code, Github Copilot, Antigravity, OpenClaw, and any agent that can fetch URLs.

适用于 Claude Code、Github Copilot、Antigravity、OpenClaw 及任何能抓取 URL 的 Agent。

The Problem
核心问题

Context Scatters

上下文散落各处

AI agents are remarkably capable. Yet they consistently fail at the same thing: obtaining complete context. Every session starts from scratch.

AI Agent 能力出众,但始终在同一件事上失败:获取完整上下文。每次会话都从零开始。

Context Drift

上下文漂移

Information mutates across re-tellings. The agent's understanding silently diverges from reality with each new conversation.

信息在反复转述中变异。Agent 的理解在每次新对话中悄然偏离现实。

Security Exposure

安全暴露

Credentials shared in plaintext chat. No encryption, no expiration, no audit trail. Every conversation is a potential leak.

凭证以明文分享在聊天中。无加密、无过期、无审计轨迹。每次对话都是潜在泄露。

No Reproducibility

不可复现

If the agent fails, there's no way to replay the task with identical context. Debugging becomes archaeology.

Agent 失败后无法用相同上下文重放任务。调试变成考古。

Philosophy
设计理念

Harness Engineering

Harness 工程

In every engineering discipline, a harness is the layer that connects, protects, and orchestrates components — without doing the work itself. nutshell standardizes what goes into the context window.

在每个工程学科中,harness 是连接、保护和编排组件的层 — 它本身不做具体工作。nutshell 标准化了进入上下文窗口的内容。

"The biggest barrier to getting value from AI is your own ability to context and workflow engineer the models."

— Jerry Liu, LlamaIndex

"The secret sauce is all in the model. The harness should be the thinnest possible wrapper."

— Boris Cherny, Anthropic

nutshell takes a pragmatic position: good context improves every model. A .nut bundle is model-agnostic, harness-agnostic, and compounds across sessions.

nutshell 采取务实立场:好的上下文能提升每个模型。.nut 包与模型无关、与 harness 无关,且跨会话累积。

nutshell.json
"task": { "title": "Build REST API" },
"harness": { "agent_type_hint": "execution" },
"credentials": { "vault": "credentials/vault.age" }
Context Strata
// Immutable workspace snapshot
context/requirements.md
context/architecture.md
files/src/api/handler.go
Acceptance Criteria
# Verification
tests/acceptance.sh
All endpoints return 200
Coverage > 80%
Capabilities
核心功能

Built for the Real World

为真实场景而生

Every feature exists because scattered context caused real failures. Zero external dependencies, pure Go.

每个功能都源于散落上下文导致的真实失败。零外部依赖,纯 Go 实现。

Reverse Management

反向管理

nutshell check tells the human what's missing — inverting the dynamic where agents ask 20 clarifying questions. The bundle manages you.

nutshell check 告诉人类缺少什么 — 反转了 Agent 问 20 个澄清问题的模式。让包来管理你。

Credential Security

凭证安全

Scoped, encrypted credentials with age/SOPS/Vault support. Each credential has expiration, rate limits, and endpoint restrictions.

作用域受限的加密凭证,支持 age/SOPS/Vault。每个凭证都有过期时间、速率限制和端点限制。

Immutable Bundles

不可变包

SHA-256 hashes at file level and bundle level. Once packed, the .nut file guarantees content integrity. Path traversal protection on unpack.

文件级和包级 SHA-256 哈希。打包后 .nut 文件保证内容完整性。解包时防止路径穿越攻击。

Request → Delivery Chain

请求 → 交付链

Bundle types (request, delivery, template, checkpoint) form a complete audit trail. Diff two bundles to see exactly what changed.

包类型(request、delivery、template、checkpoint)形成完整审计轨迹。Diff 两个包,精确查看变更。

Agent SDK

Programmatic Go API: nutshell.Open() reads manifests, files, and context. Repack bundles. Works in any agent framework.

Go 编程 API:nutshell.Open() 读取清单、文件和上下文。重新打包。适用于任何 Agent 框架。

Context Budget

上下文预算

The context_budget_hint field prevents context window overload. Warnings fire above 50% fill ratio. Compression built in.

context_budget_hint 字段防止上下文窗口过载。超过 50% 填充率时发出警告。内置压缩。

JSON Schema

Full schema output via nutshell schema. IDE auto-completion and real-time validation for nutshell.json in VS Code.

通过 nutshell schema 输出完整 Schema。VS Code 中自动补全和实时验证 nutshell.json。

Platform Extensions

平台扩展

Optional integrations for ClawNet P2P, GitHub Actions, Linear, and more. Extensions never break the core format.

可选集成 ClawNet P2P、GitHub Actions、Linear 等。扩展永不破坏核心格式。

Toolchain
工具链

Pack it up.

打包就好。

17 commands. Zero dependencies. As natural as creating a git commit.

17 条命令,零依赖。像创建 git commit 一样自然。

nutshell init --dir api-refactor
Initialized nutshell.json and context/ in api-refactor/
nutshell set task.title "Migrate auth to RS256"
Set task.title = "Migrate auth to RS256"
nutshell check --dir api-refactor
Missing: context/requirements.md, credentials/vault
No acceptance criteria defined
Status: incomplete
nutshell pack -o api-refactor.nut
Packed 12 files (8.4 KB) → api-refactor.nut
sha256:a1b2c3d4e5f6...
nutshell inspect api-refactor.nut --json
{ "task": "Migrate auth to RS256", "files": 12, "type": "request" }
Workflow
工作流

How It Works

工作流程

A complete handoff cycle between humans and agents, with nothing lost in translation.

人与 Agent 之间完整的交接循环,信息零丢失。

1

Initialize

初始化

Create a bundle directory with manifest and context folder.

创建包目录,包含清单和上下文文件夹。

nutshell init
2

Fill Context

填充上下文

Add requirements, files, credentials. Let check tell you what's missing.

添加需求、文件、凭证。让 check 告诉你缺少什么。

nutshell check
3

Pack & Send

打包发送

Compress into an integrity-verified bundle. Hand to any agent.

压缩为完整性验证的包,交给任何 Agent。

nutshell pack
4

Deliver

交付

Agent unpacks, executes, and packs a delivery bundle back.

Agent 解包、执行,然后打包交付包返回。

nutshell deliver

Stop re-explaining context.

别再重复解释上下文了。

Open source, zero-dependency, and ready for production. Package your next task in a shell.

开源、零依赖、生产就绪。用 nutshell 打包你的下一个任务。