Interact with live Smalltalk image (Cuis or Squeak). Use for evaluating Smalltalk code, browsing classes, viewing method source, defining classes/methods, querying hierarchy and categories.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install smalltalk或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install smalltalk⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/smalltalk/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: smalltalk version: 1.7.0 description: Interact with live Smalltalk image (Cuis or Squeak). Use for evaluating Smalltalk code, browsing classes, viewing method source, defining classes/methods, querying hierarchy and categories. metadata: {"clawdbot":{"emoji":"💎","requires":{"bins":["python3","xvfb-run"]}}} ---
Execute Smalltalk code and browse live Squeak/Cuis images via MCP.
Get the ClaudeSmalltalk repo first:
git clone https://github.com/CorporateSmalltalkConsultingLtd/ClaudeSmalltalk.git
This repo contains:
MCP-Server-Squeak.st)SQUEAK-SETUP.md, CLAWDBOT-SETUP.md)clawdbot/)# Check setup
python3 smalltalk.py --check
# Evaluate code
python3 smalltalk.py evaluate "3 factorial"
python3 smalltalk.py evaluate "Date today"
# Browse a class
python3 smalltalk.py browse OrderedCollection
# View method source (instance side)
python3 smalltalk.py method-source String asUppercase
# View method source (class side)
python3 smalltalk.py method-source "MCPServer class" version
python3 smalltalk.py method-source MCPServer version --class-side
# List classes (with optional prefix filter)
python3 smalltalk.py list-classes Collection
# Get class hierarchy
python3 smalltalk.py hierarchy OrderedCollection
# Get subclasses
python3 smalltalk.py subclasses Collection
# List all categories
python3 smalltalk.py list-categories
# List classes in a category
python3 smalltalk.py classes-in-category "Collections-Sequenceable"
# Define a new class
python3 smalltalk.py define-class "Object subclass: #Counter instanceVariableNames: 'count' classVariableNames: '' poolDictionaries: '' category: 'MyApp'"
# Define a method
python3 smalltalk.py define-method Counter "increment
count := (count ifNil: [0]) + 1.
^ count"
# Delete a method
python3 smalltalk.py delete-method Counter increment
# Delete a class
python3 smalltalk.py delete-class Counter
Stock image, ephemeral. Changes are discarded when daemon stops. User says: "load Smalltalk skill" or "invoke Smalltalk" — no special flags.
# Start playground daemon
nohup python3 smalltalk-daemon.py start > /tmp/daemon.log 2>&1 &
User supplies their own image/changes pair. Changes persist across sessions. User says: "load Smalltalk skill in dev mode with ~/MyProject.image"
# Start dev daemon with custom image
nohup python3 smalltalk-daemon.py start --dev --image ~/MyProject.image > /tmp/daemon.log 2>&1 &
Dev mode sets SMALLTALK_DEV_MODE=1 so the MCP server keeps the .changes file (instead of redirecting to /dev/null). The supplied image must have a matching .changes file alongside it.
# Check status
python3 smalltalk.py --daemon-status
# Stop daemon
python3 smalltalk-daemon.py stop
# Restart in dev mode
python3 smalltalk-daemon.py restart --dev --image ~/MyProject.image
| Command | Description | |---------|-------------| | --check | Verify VM/image paths and dependencies | | --daemon-status | Check if daemon is running | | --debug | Debug hung system (sends SIGUSR1, captures stack trace) | | evaluate | Execute Smalltalk code, return result | | browse | Get class metadata (superclass, ivars, instance methods and classMethods) | | method-source | View method source code (supports "Class class" syntax or --class-side flag) | | define-class | Create or modify a class | | define-method | Add or update a method | | delete-method | Remove a method | | delete-class | Remove a class | | list-classes [prefix] | List classes, optionally filtered | | hierarchy | Get superclass chain | | subclasses | Get immediate subclasses | | list-categories | List all system categories | | classes-in-category | List classes in a category | | explain | Explain Smalltalk code (requires ANTHROPIC_API_KEY or OPENAI_API_KEY) | | explain-method ] | Fetch method from image and explain it (or use --source/--source-file/--source-stdin to bypass daemon) | | audit-comment ] | Audit method comment vs implementation (or use --source/--source-file/--source-stdin to bypass daemon) | | audit-class | Audit all methods in a class (instance + class side) | | generate-sunit | Generate SUnit tests for methods and file into image |
| Variable | Description | |----------|-------------| | SQUEAK_VM_PATH | Path to Squeak/Cuis VM executable | | SQUEAK_IMAGE_PATH | Path to Smalltalk image with MCP server | | ANTHROPIC_API_KEY | API key for Anthropic Claude (preferred for LLM tools) | | ANTHROPIC_MODEL | Anthropic model (default: claude-opus-4-20250514) | | OPENAI_API_KEY | API key for OpenAI (fallback for LLM tools) | | OPENAI_MODEL | OpenAI model (default: gpt-4o) | | LLM_PROVIDER | Force LLM provider: anthropic or openai (auto-detected if not set) |
When Claude Code has a live Smalltalk image connected via MCP, explain-method and audit-comment can use pre-fetched source code instead of requiring a running daemon. Use --source, --source-file, or --source-stdin to pass the method source directly:
# Inline source (fetched via MCP, passed on command line)
python3 smalltalk.py explain-method SmallInteger + --source "+ aNumber <primitive: 1> ^ super + aNumber"
# Source from a file
python3 smalltalk.py audit-comment Integer factorial --source-file /tmp/factorial.st
# Source piped via stdin
echo "printString ^ self printStringLimitedTo: 50000" | python3 smalltalk.py explain-method Object printString --source-stdin
The three source flags are mutually exclusive. When none is provided, the daemon is used as before.
The generate-sunit command uses an LLM to generate SUnit test cases for Smalltalk methods and files them directly into the running image:
# Generate tests for a single method
python3 smalltalk.py generate-sunit "String>>asUppercase"
# Generate tests for multiple methods
python3 smalltalk.py generate-sunit "Random>>next" "Random>>nextInt:" "Random>>seed:"
# Generate tests for an entire class (all instance methods)
python3 smalltalk.py generate-sunit "OrderedCollection"
# Generate tests for class-side methods
python3 smalltalk.py generate-sunit "Date class>>today"
# Custom test class name
python3 smalltalk.py generate-sunit "String>>asUppercase" --class-name MyStringTests
# Overwrite existing test class
python3 smalltalk.py generate-sunit "String>>asUppercase" --force
# Run the generated tests
python3 smalltalk.py evaluate "StringGeneratedTest buildSuite run printString"
The generated TestCase uses standard SUnit assertions (assert:, assert:equals:, deny:, should:raise:) and is filed into a GeneratedSUnit-* category.
saveImage intentionally excluded for safety--dev --image PATH安装 Smalltalk 后,可以对 AI 说这些话来触发它
Help me get started with Smalltalk
Explains what Smalltalk does, walks through the setup, and runs a quick demo based on your current project
Use Smalltalk to interact with live Smalltalk image (Cuis or Squeak)
Invokes Smalltalk with the right parameters and returns the result directly in the conversation
What can I do with Smalltalk in my finance & investment workflow?
Lists the top use cases for Smalltalk, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/smalltalk/ 目录(个人级,所有项目可用),或 .claude/skills/smalltalk/(项目级)。重启 AI 客户端后,用 /smalltalk 主动调用,或让 AI 根据上下文自动发现并使用。
Smalltalk 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Smalltalk 可免费安装使用。请查阅仓库了解许可证信息。
Interact with live Smalltalk image (Cuis or Squeak). Use for evaluating Smalltalk code, browsing classes, viewing method source, defining classes/methods, querying hierarchy and categories.
Smalltalk 属于「Finance & Investment」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my finance & investment tasks using Smalltalk
Identifies repetitive steps in your workflow and sets up Smalltalk to handle them automatically