/claw
启动 NanoClaw 智能体 (Agent) REPL — 一个由 claude CLI 驱动的持久化、会话感知 (session-aware) 的 AI 助手。
> /plugin marketplace add xu-xiang/everything-claude-code-zh > /plugin install everything-claude-code@everything-claude-code
How it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/claw
Context preview
What this command does when you run it.
启动 NanoClaw 智能体 (Agent) REPL — 一个由 claude CLI 驱动的持久化、会话感知 (session-aware) 的 AI 助手。
Command definition
claw.mddescription: 启动 NanoClaw 智能体 (Agent) REPL — 一个由 claude CLI 驱动的持久化、会话感知 (session-aware) 的 AI 助手。
Claw 命令
启动一个交互式 AI 智能体 (Agent) 会话,该会话会将对话历史记录持久化保存到磁盘,并可选择加载 ECC 技能 (Skill) 上下文。
使用方法
node scripts/claw.js
或通过 npm:
npm run claw
环境变量
| 变量 | 默认值 | 描述 | |----------|---------|-------------| | `CLAW_SESSION` | `default` | 会话名称 (字母数字 + 连字符) | | `CLAW_SKILLS` | *(空)* | 以逗号分隔的技能 (Skill) 名称,用于加载系统上下文 |
REPL 命令
在 REPL 内部,直接在提示符处输入这些命令:
/clear 清除当前会话历史 /history 打印完整对话历史 /sessions 列出所有已保存的会话 /help 显示可用命令 exit 退出 REPL
工作原理
1. 读取 `CLAW_SESSION` 环境变量以选择命名的会话 (默认: `default`) 2. 从 `~/.claude/claw/{session}.md` 加载对话历史记录 3. 可选地从 `CLAW_SKILLS` 环境变量加载 ECC 技能 (Skill) 上下文 4. 进入阻塞式的提示词 (Prompt) 循环 — 每个用户消息都会连同完整历史记录发送到 `claude -p` 5. 响应会被追加到会话文件中,以便在重启后实现持久化
会话存储
会话以 Markdown 文件形式存储在 `~/.claude/claw/` 中:
~/.claude/claw/default.md ~/.claude/claw/my-project.md
每一轮对话的格式如下:
### [2025-01-15T10:30:00.000Z] 用户 What does this function do? --- ### [2025-01-15T10:30:05.000Z] 助手 This function calculates... ---
示例
# 启动默认会话 node scripts/claw.js # 命名会话 CLAW_SESSION=my-project node scripts/claw.js # 带有技能 (Skill) 上下文 CLAW_SKILLS=tdd-workflow,security-review node scripts/claw.js
🌐 Language / 语言 / 語言 为 AI 智能体(Agent)框架打造的性能优化系统。源自 Anthropic 黑客松获胜作品。 这不仅仅是配置文件。它是一个完整的系统:包含技能(Skills)、本能(Instincts)、内存优化、持续学习、安全扫描以及研究优先的开发模式。这些生产级的智能体(Agents)、钩子(Hooks)、命令(Commands)、规则(Rules)以及 MCP 配置,是在构建真实产品的 10 个多月高强度日常使用中演化而来的。 适用于 Claude Code, Codex,
Repo: xu-xiang/everything-claude-code-zh
Other commands on everything-claude-code.
- /build-fix
通过最小化、安全的改动,逐步修复构建(Build)和类型(Type)错误。
Open command - /checkpoint
在工作流(Workflow)中创建或验证检查点。
Open command - /code-review
对未提交的更改进行全面的安全和质量审查:
Open command - /e2e
使用 Playwright 生成并运行端到端测试。创建测试旅程、运行测试、捕获截图/视频/追踪,并上传产物。
Open command - /eval
管理评测驱动开发(eval-driven development)工作流。
Open command - /evolve
分析直觉(Instincts)并建议或生成进化的结构
Open command

